|
|
@ -26,14 +26,17 @@ thneed_src = [ |
|
|
|
"runners/thneedmodel.cc", |
|
|
|
"runners/thneedmodel.cc", |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use_thneed = not GetOption('no_thneed') |
|
|
|
|
|
|
|
|
|
|
|
if arch == "aarch64" or arch == "larch64": |
|
|
|
if arch == "aarch64" or arch == "larch64": |
|
|
|
libs += ['gsl', 'CB'] |
|
|
|
libs += ['gsl', 'CB'] |
|
|
|
libs += ['gnustl_shared'] if arch == "aarch64" else ['pthread', 'dl'] |
|
|
|
libs += ['gnustl_shared'] if arch == "aarch64" else ['pthread', 'dl'] |
|
|
|
|
|
|
|
|
|
|
|
common_src += thneed_src |
|
|
|
if use_thneed: |
|
|
|
dlsym_offset = get_dlsym_offset() |
|
|
|
common_src += thneed_src |
|
|
|
lenv['CXXFLAGS'].append("-DUSE_THNEED") |
|
|
|
dlsym_offset = get_dlsym_offset() |
|
|
|
lenv['CXXFLAGS'].append(f"-DDLSYM_OFFSET={dlsym_offset}") |
|
|
|
lenv['CXXFLAGS'].append("-DUSE_THNEED") |
|
|
|
|
|
|
|
lenv['CXXFLAGS'].append(f"-DDLSYM_OFFSET={dlsym_offset}") |
|
|
|
else: |
|
|
|
else: |
|
|
|
libs += ['pthread'] |
|
|
|
libs += ['pthread'] |
|
|
|
|
|
|
|
|
|
|
@ -58,7 +61,7 @@ else: |
|
|
|
common_model = lenv.Object(common_src) |
|
|
|
common_model = lenv.Object(common_src) |
|
|
|
|
|
|
|
|
|
|
|
# build thneed model |
|
|
|
# build thneed model |
|
|
|
if arch == "aarch64" or arch == "larch64": |
|
|
|
if use_thneed and arch in ("aarch64", "larch64"): |
|
|
|
compiler = lenv.Program('thneed/compile', ["thneed/compile.cc"]+common_model, LIBS=libs) |
|
|
|
compiler = lenv.Program('thneed/compile', ["thneed/compile.cc"]+common_model, LIBS=libs) |
|
|
|
cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} ../../models/supercombo.dlc ../../models/supercombo.thneed --binary" |
|
|
|
cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} ../../models/supercombo.dlc ../../models/supercombo.thneed --binary" |
|
|
|
|
|
|
|
|
|
|
@ -75,4 +78,3 @@ lenv.Program('_modeld', [ |
|
|
|
"modeld.cc", |
|
|
|
"modeld.cc", |
|
|
|
"models/driving.cc", |
|
|
|
"models/driving.cc", |
|
|
|
]+common_model, LIBS=libs) |
|
|
|
]+common_model, LIBS=libs) |
|
|
|
|
|
|
|
|
|
|
|