sysroot and cross-compiler based build WIP

This commit is contained in:
Justin C. Miller
2019-01-17 00:51:45 -08:00
parent 591ca7c83c
commit 523d0b3b8c
17 changed files with 664 additions and 14 deletions

47
scons/target_env.scons Normal file
View File

@@ -0,0 +1,47 @@
Import('env')
env = env.Clone()
env.Append(
CCFLAGS = [
'-nodefaultlibs',
'-nostdinc',
'-nostdlib',
#'-nolibc',
'-ffreestanding',
'-fno-omit-frame-pointer',
'-isystem', 'sysroot/include',
'-mcmodel=large',
'-fno-PIC',
],
LINKFLAGS = [
'-g',
'-nostdlib',
#'-znocombreloc',
#'-Bsymbolic',
'-nostartfiles',
],
LIBS = [
#'c++',
#'c++abi',
'unwind',
],
CXXFLAGS = [
#'-nostdlibinc',
'-fno-exceptions',
'-fno-rtti',
'-D_LIBCPP_NO_EXCEPTIONS',
'-D_LIBCPP_HAS_NO_THREADS',
'-D__ELF__',
'-mcmodel=large',
],
)
Return('env')
# vim: ft=python et