diff options
author | 2022-12-06 15:48:41 -0800 | |
---|---|---|
committer | 2022-12-06 15:48:41 -0800 | |
commit | 4dd2cb33b7603983f2ae9df425b8c0369acc9b61 (patch) | |
tree | fab0e58a36b26db8caf809d2b856e66f9952f3b1 | |
parent | 31f025fa02c1c206944effe4395c841fc9e6b2fb (diff) | |
download | bun-4dd2cb33b7603983f2ae9df425b8c0369acc9b61.tar.gz bun-4dd2cb33b7603983f2ae9df425b8c0369acc9b61.tar.zst bun-4dd2cb33b7603983f2ae9df425b8c0369acc9b61.zip |
Ban statx
Diffstat (limited to '')
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | src/bun.js/bindings/glibc-versions-hack.cpp | 16 |
2 files changed, 26 insertions, 1 deletions
@@ -442,7 +442,8 @@ WRAP_SYMBOLS_ON_LINUX = -Wl,--wrap=fcntl -Wl,--wrap=fcntl64 -Wl,--wrap=stat64 -W -Wl,--wrap=fstat64 \ -Wl,--wrap=fstatat64 \ -Wl,--wrap=mknod \ - -Wl,--wrap=mknodat + -Wl,--wrap=mknodat \ + -Wl,--wrap=statx PLATFORM_LINKER_FLAGS = $(BUN_CFLAGS) \ -fuse-ld=lld \ @@ -1595,6 +1596,7 @@ $(DEBUG_OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp -fno-exceptions \ -fno-rtti \ -ferror-limit=1000 \ + -DBUN_DEBUG \ $(EMIT_LLVM_FOR_DEBUG) \ -g3 -c -o $@ $< @@ -1609,6 +1611,7 @@ $(DEBUG_OBJ_DIR)/%.o: $(SRC_DIR)/webcore/%.cpp -fno-rtti \ -ferror-limit=1000 \ $(EMIT_LLVM_FOR_DEBUG) \ + -DBUN_DEBUG \ -g3 -c -o $@ $< .PHONY: src/io/%.cpp @@ -1619,6 +1622,7 @@ $(DEBUG_OBJ_DIR)/%.o: src/io/%.cpp -fno-exceptions \ -fno-rtti \ -ferror-limit=1000 \ + -DBUN_DEBUG \ $(EMIT_LLVM_FOR_DEBUG) \ -g3 -c -o $@ $< @@ -1634,6 +1638,7 @@ $(DEBUG_OBJ_DIR)/%.o: $(SRC_DIR)/sqlite/%.cpp -fno-rtti \ -ferror-limit=1000 \ $(EMIT_LLVM_FOR_DEBUG) \ + -DBUN_DEBUG \ -g3 -c -o $@ $< # $(DEBUG_OBJ_DIR) is not included here because it breaks @@ -1647,6 +1652,7 @@ $(DEBUG_OBJ_DIR)/%.o: $(SRC_DIR)/node_os/%.cpp -fno-rtti \ -ferror-limit=1000 \ $(EMIT_LLVM_FOR_DEBUG) \ + -DBUN_DEBUG \ -g3 -c -o $@ $< # $(DEBUG_OBJ_DIR) is not included here because it breaks @@ -1660,6 +1666,7 @@ $(DEBUG_OBJ_DIR)/%.o: src/bun.js/builtins/%.cpp -fno-rtti \ -ferror-limit=1000 \ $(EMIT_LLVM_FOR_DEBUG) \ + -DBUN_DEBUG \ -g3 -c -o $@ $< .PHONY: src/bun.js/modules/%.cpp @@ -1671,6 +1678,7 @@ $(DEBUG_OBJ_DIR)/%.o: src/bun.js/modules/%.cpp -fno-rtti \ -ferror-limit=1000 \ $(EMIT_LLVM_FOR_DEBUG) \ + -DBUN_DEBUG \ -g3 -c -o $@ $< @@ -1684,6 +1692,7 @@ $(DEBUG_OBJ_DIR)/webcrypto/%.o: src/bun.js/bindings/webcrypto/%.cpp -fno-rtti \ -ferror-limit=1000 \ $(EMIT_LLVM_FOR_DEBUG) \ + -DBUN_DEBUG \ -g3 -c -o $@ $< diff --git a/src/bun.js/bindings/glibc-versions-hack.cpp b/src/bun.js/bindings/glibc-versions-hack.cpp index 5da0b41fb..345321b94 100644 --- a/src/bun.js/bindings/glibc-versions-hack.cpp +++ b/src/bun.js/bindings/glibc-versions-hack.cpp @@ -17,6 +17,22 @@ #endif #endif +#if defined(__x86_64__) +// force older pow +__asm__(".symver pow,pow@GLIBC_2.2.5"); +#endif + +// ban statx, for now +extern "C" int __wrap_statx(int fd, const char* path, int flags, + unsigned int mask, struct statx* buf) +{ + errno = ENOSYS; +#ifdef BUN_DEBUG + abort(); +#endif + return -1; +} + extern "C" int __real_fcntl(int fd, int cmd, ...); extern "C" double __real_pow(double x, double y); extern "C" double __real_exp(double x); |