X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/baca54322c66983205edecd2ebb00d997878be50..c043fa535514a76091be87a45ad472a505f9dd33:/lunaix-os/usr/LBuild diff --git a/lunaix-os/usr/LBuild b/lunaix-os/usr/LBuild index a637308..05a1246 100644 --- a/lunaix-os/usr/LBuild +++ b/lunaix-os/usr/LBuild @@ -1,41 +1,52 @@ -sources([ +src.c += ( "testp", "ls", "signal_demo", "cat", "stat", "test_pthread", - "maze" -]) + "file_test", + "maze", + "mkdir", + "rm", + "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