diff --git a/SConscript b/SConscript index a515844f56658ebfffda32e089fa56e281bac917..87df81f468b4198f8dc0ecace9f4f0c31f24f8cb 100644 --- a/SConscript +++ b/SConscript @@ -5,24 +5,28 @@ import tarfile Import('env') if env.GetOption('clean'): - if os.path.exists("third_party/ELFIO"): - shutil.rmtree("third_party/ELFIO") - if os.path.exists("include/elfio"): - shutil.rmtree("include/elfio") + if os.path.exists(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/ELFIO"): + print 'Removing third_party/ELFIO' + shutil.rmtree(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/ELFIO") + if os.path.exists(os.environ['SECURITY_TRANSFORMS_HOME']+"/include/elfio"): + print 'Removing include/elfio' + shutil.rmtree(os.environ['SECURITY_TRANSFORMS_HOME']+"/include/elfio") else: - ELFIO_DIR="third_party/ELFIO/" + ELFIO_DIR=os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/ELFIO/" if not os.path.exists(ELFIO_DIR): os.makedirs(ELFIO_DIR) # make directory - tgz=tarfile.open("third_party/elfio-2.2.tar.gz", "r:gz") + tgz=tarfile.open(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/elfio-2.2.tar.gz", "r:gz") print 'Extracting elfio tarball' tgz.list(verbose=False) tgz.extractall(ELFIO_DIR) - shutil.copytree(ELFIO_DIR+"elfio-2.2/elfio", "include/elfio") - shutil.copy("third_party/elfio.hpp", "include/elfio/elfio.hpp") + shutil.copytree(ELFIO_DIR+"elfio-2.2/elfio", os.environ['SECURITY_TRANSFORMS_HOME']+"/include/elfio") + shutil.copy(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/elfio.hpp", os.environ['SECURITY_TRANSFORMS_HOME']+"/include/elfio/elfio.hpp") else: assert os.path.isdir(ELFIO_DIR) +print 'env=' +print env.Dump() libbea=SConscript("beaengine/SConscript", variant_dir='scons_build/beaengine') libMEDSannotation=SConscript("libMEDSannotation/SConscript", variant_dir='scons_build/libMEDSannotation') libxform=SConscript("xform/SConscript", variant_dir='scons_build/libxform') diff --git a/SConstruct b/SConstruct index 75d708e91ee27c97bc1439494bc61a72fe3d0e3a..7fc65b6fd6a0b1f5318862f49cb568ffae218869 100644 --- a/SConstruct +++ b/SConstruct @@ -5,9 +5,9 @@ import sys env=Environment() # default build options -env.Replace(CFLAGS="-fPIC") -env.Replace(CCFLAGS="-fPIC") -env.Replace(LDFLAGS="-fPIC") +env.Replace(CFLAGS="-fPIC -w ") +env.Replace(CXXFLAGS="-fPIC -w ") +env.Replace(LINKFLAGS="-fPIC -w ") # parse arguments env.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME']) @@ -18,11 +18,13 @@ env.Replace(debug=ARGUMENTS.get("debug",0)) if int(env['debug']) == 1: print "Setting debug mode" env.Append(CFLAGS=" -g") - env.Append(CCFLAGS=" -g") + env.Append(CXXFLAGS=" -g") + env.Append(LINKFLAGS=" -g") else: print "Setting release mode" env.Append(CFLAGS=" -O3") - env.Append(CCFLAGS=" -O3") + env.Append(CXXFLAGS=" -O3") + env.Append(LINKFLAGS=" -O3") # set 32/64 bit build properly print "env[64bit]="+str(env['do_64bit_build']) @@ -31,13 +33,15 @@ if env['do_64bit_build'] is None: elif int(env['do_64bit_build']) == 1: print 'Using 64-bit compilation size.' env.Append(CFLAGS=" -m64") - env.Append(CCFLAGS=" -m64") - env.Append(LDFLAGS=" -m64") + env.Append(CXXFLAGS=" -m64") + env.Append(LINKFLAGS=" -m64") + env.Append(SHLINKFLAGS=" -m64") else: print 'Using 32-bit compilation size.' env.Append(CFLAGS=" -m32") - env.Append(CCFLAGS=" -m32") - env.Append(LDFLAGS=" -m32") + env.Append(CXXFLAGS=" -m32") + env.Append(LINKFLAGS=" -m32") + env.Append(SHLINKFLAGS=" -m32") Export('env') diff --git a/beaengine/SConscript b/beaengine/SConscript index bc99129773880f60fab8f1a7bdaab33a77ceb4c6..a8d8b964763a84bf363f1c091d99f50c0969fcdd 100644 --- a/beaengine/SConscript +++ b/beaengine/SConscript @@ -12,6 +12,10 @@ cpppath=''' ./include/ ./beaengineSources/Includes/ ''' + +#print 'myenv[cflags]='+str(myenv['CFLAGS']) +#print 'myenv=\n' +#print myenv.Dump() myenv=myenv.Clone(CPPPATH=Split(cpppath)) lib=myenv.Library("BeaEngine_s_d", Split(files)) diff --git a/xform/constant_hash.h b/xform/constant_hash.h index 562726e1962760c46139fda2f44425d9395f2837..b439b9f860f3ff24950059dc53b15ff1e51c1729 100644 --- a/xform/constant_hash.h +++ b/xform/constant_hash.h @@ -33,7 +33,7 @@ typedef enum constant_hash_field constant_hash_field_t; extern Hashtable *constants_hash; struct constant_hash_key { - int pc; + app_iaddr_t pc; int the_const; constant_hash_field_t field; };