Compare commits

..

2 commits

Author SHA1 Message Date
fef
cd797b107c
toolchain: don't flag init calls static
This will omit them from the final build, obviously
2021-07-19 14:08:23 +02:00
fef
4f027726c6
build: use correct path variables 2021-07-19 13:12:59 +02:00
2 changed files with 3 additions and 3 deletions

View file

@ -13,10 +13,10 @@
#define __neo_section(name) __attribute__(( __section__(#name) ))
#define __neo_init(fn) \
__neo_section(.init_array) static void (*__neo_init_##fn)(void) = fn
__neo_section(.init_array) void (*__neo_init_##fn)(void) = fn
#define __neo_fini(fn) \
__neo_section(.fini_array) static void (*__neo_fini_##fn)(void) = fn
__neo_section(.fini_array) void (*__neo_fini_##fn)(void) = fn
#ifdef __cplusplus
# define __restrict

View file

@ -2,7 +2,7 @@
add_library(neo STATIC)
target_link_options(neo INTERFACE -T${CMAKE_CURRENT_SOURCE_DIR}/src/neo.ld)
target_link_options(neo INTERFACE -T${CMAKE_SOURCE_DIR}/src/neo.ld)
execute_process(COMMAND uname -m OUTPUT_VARIABLE HOST_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
string(TOLOWER "${HOST_ARCH}" HOST_ARCH)