Adrian Schröter wrote on 2009-08-21:
All what happens is that these flags get added there. But if you do not have something like
export CFLAGS="$RPM_OPT_FLAGS" before running configure/make it will have no effect. You can see also in the build log when executing the export command which flags are inside.
With or without that additional specfile content (I tried both ways), whatever Optflags are set in the project DO get applied to all the SuSE or x86_64 builds, but from what I can tell they are NOT applied to the RH4/RH5 i586 platform/arch combination. It seems to be only that specific combination that's a problem. With an unmodified prjconf, my build logs look like the following (note the -mcpu/-mtune options). RH5/i586: + cd log4shib-1.0.3 + CFLAGS='-O2 -g -march=i386 -mcpu=i686' + export CFLAGS + CXXFLAGS='-O2 -g -march=i386 -mcpu=i686' + export CXXFLAGS + FFLAGS='-O2 -g -march=i386 -mcpu=i686' + export FFLAGS + ./configure ... OpenSUSE 11.1/i586: + cd log4shib-1.0.3 + CFLAGS='-march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' + export CFLAGS + CXXFLAGS='-march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' + export CXXFLAGS + FFLAGS='-march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' + export FFLAGS + ./configure ... ----- If I modify the prjconf and set Optflags i586 so that -mtune=generic is used in place of -mcpu=i586: RH5/i586: (same as unmodified case, not using my settings) + cd log4shib-1.0.3 + CFLAGS='-O2 -g -march=i386 -mcpu=i686' + export CFLAGS + CXXFLAGS='-O2 -g -march=i386 -mcpu=i686' + export CXXFLAGS + FFLAGS='-O2 -g -march=i386 -mcpu=i686' + export FFLAGS + ./configure ... OpenSUSE 11.1/i586: (different from unmodified case, using my settings) + cd log4shib-1.0.3 + CFLAGS='-march=i586 -mtune=generic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' + export CFLAGS + CXXFLAGS='-march=i586 -mtune=generic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' + export CXXFLAGS + FFLAGS='-march=i586 -mtune=generic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' + export FFLAGS + ./configure ... ---- So, something's different about Red Hat i386 vs. other builds. Something seems to hardwire the option set for that combination, or I'm still missing something obvious... -- Scott -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org