How to override dpkg-buildflags CFLAGS?

前端 未结 1 1539
北恋
北恋 2020-12-31 10:10

I got a package with:

$ apt-get source 

and now I am trying to build it with:

$ dpkg-buildpackage -uc -us -         


        
相关标签:
1条回答
  • 2020-12-31 10:30

    the package you are trying to rebuild, sets (read: overrides) the *FLAGS with hardening-specifics flags retrieved from dpkg-buildflags.

    if you need to override those flags for your own purposes, you should tell dpkg-buildflags to provide the flags you want, rather than the (hardening) defaults. looking at man dpkg-buildflags, you find the section about environment variables, esp. see DEB_flag_SET and DEB_flag_APPEND

    so this should do the trick (fill in your own *FLAGS):

    $ DEB_CPPFLAGS_SET="-I/foo/bar/baz" DEB_CFLAGS_SET="-g -O6" DEB_LDFLAGS_SET="-L/fruzzel/frazzel/" dpkg-buildpackage -uc -us -j8 -rfakeroot
    
    0 讨论(0)
提交回复
热议问题