commit 64ffc553406551bb7a52f44e0562328265184f27
parent 3381635c6fefb931b6e709777390929a389abdaf
Author: evenfri <evenfri256@gmail.com>
Date: Sat, 8 Aug 2026 04:24:05 +0800
update wrappers
Diffstat:
4 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/wrappers/cc b/wrappers/cc
@@ -1,3 +1,17 @@
#!/bin/sh
+if [ ! -z "$not_use_libc" ]; then
+ inc=$(/usr/bin/cc -print-file-name=include)
+
+ exec /usr/bin/cc -c \
+ -fstack-protector-all \
+ -mstack-protector-guard=global \
+ -nostdlib \
+ -nostdinc \
+ -ffreestanding \
+ -fno-builtin \
+ -isystem "$inc" \
+ "$@"
+fi
+
exec /usr/bin/cc -c "$@"
diff --git a/wrappers/fcc b/wrappers/fcc
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-INC=$(/usr/bin/cc -print-file-name=include)
-
-exec /usr/bin/cc -c \
- -fstack-protector-all \
- -mstack-protector-guard=global \
- -nostdlib \
- -nostdinc \
- -ffreestanding \
- -fno-builtin \
- -isystem "$INC" \
- "$@"
diff --git a/wrappers/fld b/wrappers/fld
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-libc="$LIBC/libc.a"
-
-exec /usr/bin/ld -m elf_x86_64 \
- -nostdlib \
- -static \
- -e _start \
- "$@" \
- "$libc"
diff --git a/wrappers/ld b/wrappers/ld
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec /usr/bin/ld -lc -m elf_x86_64 "$@"