# HG changeset patch # User Florian Westphal # Date 1250289223 -7200 # Node ID b4128f070989faa2c1d266007120ff399a746480 # Parent 41d4fc0fdd98677c38a23f0f12832ac709e84654 SConscript: fix build on pyton 2.6 based systems diff -r 41d4fc0fdd98 -r b4128f070989 SConscript --- a/SConscript Fri Apr 10 21:20:25 2009 +0200 +++ b/SConscript Sat Aug 15 00:33:43 2009 +0200 @@ -151,6 +151,9 @@ # We need a special linker script to set up some variables for # initialisation in Linux +# Using Program and -shared is a hacky way to make a shared library in SCons +# without requiring -fPIC (which cannot be used, as inline assembler uses +# registers that cannot be used when with -fPIC). link_flags = '-Wl,-O1 -shared -Wl,-O1 -Wl,-T' + curdir + linker_script ext_cflags = '' as_flags = '-D__ASSEMBLY__' @@ -166,6 +169,8 @@ # ----------------------------------------------------------------------------- env = default_env.Clone(CCFLAGS=cflags, CPPPATH=include_path, + LINKFLAGS = link_flags, + ASFLAGS = as_flags, GLB_CCFLAGS=glb_cflags, GLB_LIST=curdir + '/global_list.txt') sim_env = default_env.Clone(CCFLAGS='-g -Wall -O2 ' + ext_cflags, @@ -175,10 +180,6 @@ objects.extend([sim_env.SharedObject(s) for s in sim_sources]) objects.extend(asm_sources) -# Using Program and -shared is a hacky way to make a shared library in SCons -# without requiring -fPIC. -env['LINKFLAGS'] += link_flags -env['ASFLAGS'] += as_flags output = env.Program(source=objects, target='lib%s.so' % stackname) Install(dir = "..", source = output)