Compare commits

...

2 Commits

Author SHA1 Message Date
Jarred Sumner
1f78da47ca Update cmake/targets/BuildBun.cmake
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
2024-10-23 18:21:09 -07:00
Jarred Sumner
e73ba34777 Don't wrap fcntl on arm64 2024-10-22 16:59:44 -07:00
2 changed files with 9 additions and 3 deletions

View File

@@ -846,6 +846,12 @@ else()
set(LLD_NAME lld-${LLVM_VERSION_MAJOR})
endif()
if(ARCH STREQUAL "x64")
set(x86_64_WRAP_FCNTL "-Wl,--wrap=fcntl -Wl,--wrap=fcntl64")
else()
set(x86_64_WRAP_FCNTL "")
endif()
target_link_options(${bun} PUBLIC
-fuse-ld=${LLD_NAME}
-fno-pic
@@ -859,8 +865,7 @@ else()
-Wl,--wrap=cosf
-Wl,--wrap=exp
-Wl,--wrap=expf
-Wl,--wrap=fcntl
-Wl,--wrap=fcntl64
${x86_64_WRAP_FCNTL}
-Wl,--wrap=fmod
-Wl,--wrap=fmodf
-Wl,--wrap=fstat

View File

@@ -94,7 +94,6 @@ __asm__(".symver tanf,tanf@GLIBC_2.2.5");
__asm__(".symver cosf,cosf@GLIBC_2.17");
__asm__(".symver exp,exp@GLIBC_2.17");
__asm__(".symver expf,expf@GLIBC_2.17");
__asm__(".symver fcntl,fcntl@GLIBC_2.17");
__asm__(".symver fmod,fmod@GLIBC_2.17");
__asm__(".symver fmodf,fmodf@GLIBC_2.17");
__asm__(".symver log,log@GLIBC_2.17");
@@ -128,8 +127,10 @@ float BUN_WRAP_GLIBC_SYMBOL(log2f)(float);
float BUN_WRAP_GLIBC_SYMBOL(logf)(float);
float BUN_WRAP_GLIBC_SYMBOL(sinf)(float);
float BUN_WRAP_GLIBC_SYMBOL(tanf)(float);
#if defined(__x86_64__)
int BUN_WRAP_GLIBC_SYMBOL(fcntl)(int, int, ...);
int BUN_WRAP_GLIBC_SYMBOL(fcntl64)(int, int, ...);
#endif
void BUN_WRAP_GLIBC_SYMBOL(sincosf)(float, float*, float*);
}