• DEB_BUILD_MAINT_OPTIONS per debian/rules target?

    From Harald Welte@21:1/5 to All on Fri Jul 31 09:10:01 2020
    Hi!

    I've been unsuccessful in having different 'hardening' settings for different parts of the build process of one package. In this specific example,
    part of the build is Linux host programs, where "hardening=+all" should be enabled. The other part of the same package build is cross-compiling USB device
    firmware using gcc-arm-none-eabi. As the target does not support stack smashing
    protection, I need to specify hardening=-stackprotector

    The specific package in question can be found at https://build.opensuse.org/package/show/network:osmocom:nightly/simtrace2
    a build log showing the problem when hardening=+all is enabled for the full project:
    https://build.opensuse.org/build/network:osmocom:nightly/xUbuntu_20.04/x86_64/simtrace2/_log

    I've so far tried:
    * introducing override_dh_autobuild which depends on different Makefile targets * use target-specific 'export' statements
    * pass DEB_BUILD_MAINT_OPTIONS as make variable to explicit 'make fw' and 'make utils'
    * some other variations of the above

    However, I failed. With pure open source projects for (OSHW or not) peripherals,
    I think the situation is not so uncommon: Building host tools and cross-compiling
    device firmware in the same upstream package.

    How to best solve this?

    Thanks!

    p.s.: I'm not subscribed to this list, please keep me in Cc of any responses.

    --
    - Harald Welte <laforge@gnumonks.org> http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option."
    (ETSI EN 300 175-7 Ch. A6)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)