From a1998f2f7ce4153d670e2e5cb5018366517cc1ca Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 20 Aug 2023 16:20:03 +0100 Subject: Get things at least compiling under Linux Nothing really works yet, but at least test.h and fastspin are fixed and some of the issues with RTTI and libdl and stuff are maybe kind of sorted, subject to more testing later. The main issue now seems to be the cvar interface not quite lining up and crashing pretty much immediately. That'll probably take a lot more debugging to figure out, which likely still won't be a priority for quite a while. --- compile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'compile') diff --git a/compile b/compile index a94d8b1..ce45ced 100755 --- a/compile +++ b/compile @@ -14,18 +14,18 @@ esac mkdir -p .build/include -: "${CC:=clang --target=-i686-pc-linux-gnu -fuse-ld=lld}" -: "${HOSTCC:=clang -fuse-ld=lld}" +: "${CC:=clang --target=-i686-pc-linux-gnu}" +: "${HOSTCC:=clang}" warnings="-Wall -pedantic -Wno-parentheses -Wno-missing-braces \ -Wno-gnu-zero-variadic-macro-arguments" dbg=0 if [ "$dbg" = 1 ]; then - cflags="-Og -g3" - ldflags="-Og -g3" + cflags="-O0 -g3" + ldflags="-O0 -g3" else - cflags="-O2" + cflags="-O2 -fvisibility=hidden" ldflags="-O2 -s" fi @@ -38,14 +38,14 @@ cc() { if [ "$_mn" = " -DMODULE_NAME=con_" ]; then _mn=" -DMODULE_NAME=con" elif [ "$_mn" = "-DMODULE_NAME=sst" ]; then _mn=; fi # note: using typeof and bool from C23 - see detailed comment in compile.bat - $CC -m32 -c -flto -fpic $cflags $warnings -I.build/include \ + $CC -m32 -c -flto -fpic -fno-ident $cflags $warnings -I.build/include \ -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64$_mn \ -Dtypeof=__typeof -include stdbool.h -o ".build/${_bn%%.c}.o" "src/$1" } ld() { - $CC -m32 -shared -flto -fpic -fno-ident -fuse-ld=lld $ldflags \ - -L.build -ldl -ltier0 -lvstdlib -o sst.so$objs + $CC -shared -flto -fpic -fuse-ld=lld $ldflags -L.build -ldl \ + -ltier0 -lvstdlib -o sst.so$objs } src="\ -- cgit v1.2.3