Skip to content
Snippets Groups Projects
Commit 21238bb1 authored by jdh8d's avatar jdh8d
Browse files

Updates to build with -std=c++1x

Former-commit-id: fdf95593a96612edf5fe393c4d116f39503816d4
parent 23f7351d
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
......@@ -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')
......
......@@ -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))
......
......@@ -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;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment