X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/ec4ff182252b6d7b3cb81f4fa783c5348a6c30fd..c043fa535514a76091be87a45ad472a505f9dd33:/lunaix-os/usr/LBuild diff --git a/lunaix-os/usr/LBuild b/lunaix-os/usr/LBuild index 320bbeb..05a1246 100644 --- a/lunaix-os/usr/LBuild +++ b/lunaix-os/usr/LBuild @@ -1,4 +1,4 @@ -sources([ +src.c += ( "testp", "ls", "signal_demo", @@ -9,38 +9,44 @@ sources([ "maze", "mkdir", "rm", - "testfork", "fragfile", -]) +) -compile_opts([ +flag.cc += ( "-ffreestanding", - "-fno-pie" -]) + "-fno-pie", + "-Werror" +) -linking_opts([ +flag.ld += ( "-nostdlib", "-nolibc", "-z noexecstack", "-no-pie", -]) +) -linking_opts([ +flag.ld += ( "-Wl,--build-id=none" -]) +) -if config("arch") == "x86_64": - compile_opts([ - "-m64", - "-fno-unwind-tables", - "-fno-asynchronous-unwind-tables", - "-mcmodel=large" - ]) - linking_opts([ - "-m64", - ]) -else: - compile_opts("-m32") - linking_opts("-m32") +match env.ARCH: + case "x86_64": + flag.cc += ( + "-m64", + "-fno-unwind-tables", + "-fno-asynchronous-unwind-tables", + "-mcmodel=large", + "-DCONFIG_ARCH_X86_64" + ) + flag.ld += ( + "-m64", + ) + case "i386": + flag.cc += "-m32", "-DCONFIG_ARCH_X86_32" + flag.ld += "-m32" -compile_opts("-mno-sse") \ No newline at end of file +flag.cc += "-mno-sse" + +flag.cc += ( + "-Wno-discarded-qualifiers" +) \ No newline at end of file