2 # This script set linux specific flags (GNU GCC)
7 # Set release/debug flags
9 env.AppendUnique(CCFLAGS = ['-Os'])
10 env.AppendUnique(CPPDEFINES = ['NDEBUG'])
11 env.AppendUnique(LINKFLAGS = ['-s'])
13 env.AppendUnique(CCFLAGS = ['-g'])
16 target_arch = env.get('TARGET_ARCH')
17 if target_arch in ['x86']:
18 env.AppendUnique(CCFLAGS = ['-m32'])
19 env.AppendUnique(LINKFLAGS = ['-m32'])
20 elif target_arch in ['x86_64']:
21 env.AppendUnique(CCFLAGS = ['-m64'])
22 env.AppendUnique(LINKFLAGS = ['-m64'])
23 elif target_arch.find('v7a-hard') > 0:
24 env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
25 env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
26 env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
27 env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
28 elif target_arch.find('v7a') > 0:
29 env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
30 elif target_arch.find('arm64') > 0:
31 env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
33 env.AppendUnique(CPPFLAGS = ['-march=armv5te'])