Create a toolenv for newfs
This commit is contained in:
parent
344c104ceb
commit
fe1f411bdc
@ -48,6 +48,8 @@ if 'CPPFLAGS' in os.environ:
|
||||
if 'LDFLAGS' in os.environ:
|
||||
env.Append(LINKFLAGS = SCons.Util.CLVar(os.environ['LDFLAGS']))
|
||||
|
||||
toolenv = env.Clone()
|
||||
|
||||
env.Append(CFLAGS = [ "-Wshadow", "-Wno-typedef-redefinition" ])
|
||||
env.Append(CPPFLAGS = [ "-target", "x86_64-freebsd-freebsd-elf",
|
||||
"-fno-builtin", "-fno-stack-protector",
|
||||
@ -151,6 +153,7 @@ if not env["CCVERSION"].startswith("15."):
|
||||
conf.Finish()
|
||||
|
||||
Export('env')
|
||||
Export('toolenv')
|
||||
|
||||
|
||||
# Program start/end
|
||||
|
@ -1,14 +1,17 @@
|
||||
import sys
|
||||
|
||||
Import('toolenv')
|
||||
Import('env')
|
||||
|
||||
newfs_env = env.Clone()
|
||||
if (env["TOOLCHAINBUILD"] == "TRUE"):
|
||||
newfs_env = toolenv.Clone()
|
||||
|
||||
src = [
|
||||
"newfs_o2fs.c"
|
||||
]
|
||||
|
||||
if newfs_env["TOOLCHAINBUILD"] != "TRUE":
|
||||
if env["TOOLCHAINBUILD"] != "TRUE":
|
||||
newfs_env.Append(LINKFLAGS = ['-nostdlib'])
|
||||
newfs_env.Append(CPPFLAGS = ['-nostdinc'])
|
||||
newfs_env.Append(LIBPATH = ['#build/lib/libc'], LIBS = ['c'])
|
||||
|
Loading…
Reference in New Issue
Block a user