[opensuse-packaging] Help with scons langauage needed
From then SConstruct of libzzub:
gcc = env['CC'] == 'gcc' cl = env['CC'] == 'cl' if gcc: #env['CXXFLAGS'] += ['--no-rtti'] if env['DEBUG'] == False: env.Append(CCFLAGS=[ '-O3', '-fomit-frame-pointer', '-funroll-loops', '-DNDEBUG', ]) else: env.Append(CCFLAGS=[ '-g', '-DDEBUG', '-D_DEBUG', ]) if env['SSE2'] == True: if not x86_64: env.Append(CCFLAGS=[ '-march=i686', ]) env.Append(CCFLAGS=[ '-mfpmath=sse', '-msse2', ]) elif env['SSE'] == True: if not x86_64: env.Append(CCFLAGS=[ '-march=i686', ]) env.Append(CCFLAGS=[ '-mfpmath=sse', '-msse', ]) How do I splice in RPM_OPT_FLAGS? Thanks in advance Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 04/22/2010 03:19 PM, Philipp Thomas wrote:
From then SConstruct of libzzub:
gcc = env['CC'] == 'gcc' cl = env['CC'] == 'cl'
if gcc: #env['CXXFLAGS'] += ['--no-rtti'] if env['DEBUG'] == False: env.Append(CCFLAGS=[ '-O3', '-fomit-frame-pointer', '-funroll-loops', '-DNDEBUG', ]) else: env.Append(CCFLAGS=[ '-g', '-DDEBUG', '-D_DEBUG', ]) if env['SSE2'] == True: if not x86_64: env.Append(CCFLAGS=[ '-march=i686', ]) env.Append(CCFLAGS=[ '-mfpmath=sse', '-msse2', ]) elif env['SSE'] == True: if not x86_64: env.Append(CCFLAGS=[ '-march=i686', ]) env.Append(CCFLAGS=[ '-mfpmath=sse', '-msse', ])
How do I splice in RPM_OPT_FLAGS?
Thanks in advance Philipp
Have you tried "export CCFLAGS="RPM_OPT_FLAGS" in the spec file, it works with most scons builds but not always. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Dave Plater (davejplater@gmail.com) [20100422 15:43]:
Have you tried "export CCFLAGS="RPM_OPT_FLAGS" in the spec file, it works with most scons builds but not always.
Doesn't work with this package. For now I'm appending %optflags verbatim, i.e. : @@ -169,6 +169,17 @@ if gcc: '-mfpmath=sse', '-msse', ]) + env.Append(CCFLAGS=[ + '-Wall', + '-fmessage-length=0', + '-O2', + '-D_FORTIFY_SOURCE=2', + '-fstack-protector', + '-funwind-tables', + '-fasynchronous-unwind-tables', + '-g', + '-pipe', + ]) if cl: env.Append(CCFLAGS=[ -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 04/22/2010 04:39 PM, Philipp Thomas wrote:
* Dave Plater (davejplater@gmail.com) [20100422 15:43]:
Have you tried "export CCFLAGS="RPM_OPT_FLAGS" in the spec file, it works with most scons builds but not always.
Doesn't work with this package. For now I'm appending %optflags verbatim, i.e. :
@@ -169,6 +169,17 @@ if gcc: '-mfpmath=sse', '-msse', ]) + env.Append(CCFLAGS=[ + '-Wall', + '-fmessage-length=0', + '-O2', + '-D_FORTIFY_SOURCE=2', + '-fstack-protector', + '-funwind-tables', + '-fasynchronous-unwind-tables', + '-g', + '-pipe', + ])
if cl: env.Append(CCFLAGS=[
I was trying myself and I came to the same conclusion. I had a similar problem a while back with openCOLLADA and had to patch two individual SConscript files after searching through the scons website and drawing a blank. Have a look at the graphics blender project, CCFLAGS works with that scon build, at least to pass -fno-strict-aliasing. I would be interested to know if you work out a foolproof method for passing build flags in scons builds but I have a feeling that the SConstruct file has to be rewritten in some cases. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Thursday 22 April 2010 On Thursday 22 April 2010 17:19:28 Philipp Thomas wrote:
How do I splice in RPM_OPT_FLAGS?
I think, you can try scons CXXFLAGS='%{optflags}' -- WBR, Kyrill -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Dave Plater
-
Dave Plater
-
Kyrill Detinov
-
Philipp Thomas