diff --git a/include/bx/sem.h b/include/bx/semaphore.h similarity index 100% rename from include/bx/sem.h rename to include/bx/semaphore.h diff --git a/include/bx/spscqueue.h b/include/bx/spscqueue.h index 6f4265f..8d0434d 100644 --- a/include/bx/spscqueue.h +++ b/include/bx/spscqueue.h @@ -9,7 +9,7 @@ #include "bx.h" #include "cpu.h" #include "mutex.h" -#include "sem.h" +#include "semaphore.h" #include "uint32_t.h" #include diff --git a/include/bx/thread.h b/include/bx/thread.h index 8e3ef23..e057244 100644 --- a/include/bx/thread.h +++ b/include/bx/thread.h @@ -7,7 +7,7 @@ #define BX_THREAD_H_HEADER_GUARD #include "bx.h" -#include "sem.h" +#include "semaphore.h" #if BX_CONFIG_SUPPORTS_THREADING diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 3d4fa46..e8cc6e0 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -730,6 +730,31 @@ function toolchain(_buildDir, _libDir) buildoptions { "-mfpmath=sse", } +--[[ + defines { "BX_CRT_NONE" } + + buildoptions { + "-nostdlib", + "-nodefaultlibs", + "-nostartfiles", + "-Wa,--noexecstack", + "-ffreestanding", + + "-mpreferred-stack-boundary=4", + "-mstackrealign", + } + + linkoptions { + "-nostdlib", + "-nodefaultlibs", + "-nostartfiles", + "-Wa,--noexecstack", + "-ffreestanding", + + "-mpreferred-stack-boundary=4", + "-mstackrealign", + } +--]] configuration { "linux-gcc* or linux-clang*" } buildoptions { diff --git a/src/sem.cpp b/src/semaphore.cpp similarity index 99% rename from src/sem.cpp rename to src/semaphore.cpp index 69bc3cb..a3718fc 100644 --- a/src/sem.cpp +++ b/src/semaphore.cpp @@ -3,7 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#include +#include #if BX_CONFIG_SUPPORTS_THREADING