commit 6a90fedd0ebd1ac7546c2e535035aba64e422da5
parent e3ca3473ebbafdcbf01c0a59a9db06027be90b95
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Thu, 30 Apr 2026 18:58:40 +0200
libc: Accept -O in gcc-scc
The gcc-scc wrapper is designed to accept the same
set of flags than scc but the -O level flag was missed.
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/libc/gcc-scc.sh b/src/libc/gcc-scc.sh
@@ -2,12 +2,15 @@
set -e
-while getopts gr:a:s:o:c o
+while getopts gr:O:a:s:o:c o
do
case $o in
g)
g=-g
;;
+ O)
+ opti=-O1
+ ;;
r)
root=$OPTARG
;;
@@ -52,7 +55,7 @@ OpenBSD)
esac
includes="-nostdinc -I$inc -I$arch_inc -I$sys_inc -I$sys_arch_inc"
-cflags="-std=c99 -w -fno-pie -fno-stack-protector -ffreestanding -static"
+cflags="$opti -std=c99 -w -fno-pie -fno-stack-protector -ffreestanding -static"
ldflags="-z nodefaultlib -static -L$lib"
if test ${onlycc:-0} -eq 1