[opensuse-buildservice] Setting Optflags in remote builds?
Related to my question about getting -fPIC to work on Red Hat 5, I'm not having any success using osc meta prjconf to create a custom set of Optflag settings to use for non-local builds. I guess I interpreted the documentation as implying that that was the whole point of creating a custom build config. http://en.opensuse.org/Build_Service/prjconf Is there some kind of delay involved? An additional step to enable them? No way to do it at all? What I specifically did was check out my project, then run osc meta prjconf <project> -e and put just a set of Optflag lines into the file copied from the settings in the osc default config I found. If the build service was using these settings to begin with, I'd be ok, but it's using stale values. Anyway, then I triggered a rebuild of an affected package, but it's still using the same Optflags as before. -- Scott -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Donnerstag, 20. August 2009 22:56:46 schrieb Scott Cantor:
Related to my question about getting -fPIC to work on Red Hat 5, I'm not having any success using osc meta prjconf to create a custom set of Optflag settings to use for non-local builds. I guess I interpreted the documentation as implying that that was the whole point of creating a custom build config.
http://en.opensuse.org/Build_Service/prjconf
Is there some kind of delay involved? An additional step to enable them?
no
No way to do it at all?
What I specifically did was check out my project, then run osc meta prjconf <project> -e and put just a set of Optflag lines into the file copied from the settings in the osc default config I found. If the build service was using these settings to begin with, I'd be ok, but it's using stale values.
Anyway, then I triggered a rebuild of an affected package, but it's still using the same Optflags as before.
Do you use $RPM_OPT_FLAGS at all in your package/spec file ? 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. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Adrian Schröter wrote on 2009-08-21:
Do you use $RPM_OPT_FLAGS at all in your package/spec file ?
No, I assumed that since the flags being used weren't "as typical" for Red Hat 5 that something automatic was happening.
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.
Right, I saw the wrong flags in the log (that's how I knew it wasn't using the right flags). I'll correct my specfiles, thanks very much. -- Scott -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
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
participants (2)
-
Adrian Schröter
-
Scott Cantor