Hello, dpkg-1.17.1 mangles CFLAGS and LDFLAGS up to the point where application is no longer compilable: i686-pc-linux-gnu-gcc -march=native -m32 -O0 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -pipe -frecord-gcc-switches -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning,--as-needed -pipe -o dpkg-deb build.o extract.o info.o main.o ../lib/dpkg/libdpkg.a ../lib/compat/libcompat.a -lz -llzma -lbz2 i686-pc-linux-gnu-gcc: error: unrecognized command line option ‘-fpredictive-commoning,--as-needed’ From config.log: ac_cv_env_LDFLAGS_value='-march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -Wl,-O1,--as-needed -pipe' turns to: LDFLAGS='-march=native -m32 -O2 -funswitch-loops -fpredictive-commoning,--as-needed -pipe' which is obviously invalid. Proposed patch removes CFLAGS and LDFLAGS mangling and allows application to compile.
Created attachment 356554 [details] build.log
Created attachment 356556 [details] environment
Created attachment 356558 [details] config.log
Created attachment 356560 [details, diff] dpkg-1.17.1-flags.patch Disable flags mangling thus both respecting Gentoo build policy and allowing app to compile.
Comment on attachment 356560 [details, diff] dpkg-1.17.1-flags.patch I don't see how this helps. The ebuild already does this: econf ... \ --disable-compiler-optimisations \ --disable-compiler-warnings \ --disable-linker-optimisations \ ... In fact all the ebuilds currently in the tree already do this.
Comment on attachment 356560 [details, diff] dpkg-1.17.1-flags.patch Oh, right. m4/dpkg-compiler.m4 and dpkg-linker.4 do the mangling, and an option like --disable-compiler-warnings is interpreted as doing whatever it can to not optimise...
Fixed in -r1. Thanks for the (partial) patch.