From acf3e3394be9833c4f2715720f805146a5f3365a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 16 Jun 2024 02:49:16 +0000 Subject: [PATCH] Use -Oz rather than -O3, which seems more robust --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1371807..39c3af5 100755 --- a/install.sh +++ b/install.sh @@ -18,9 +18,9 @@ $(birdc show route table flowspec6 primary all)" echo "const uint8_t COMPILE_TIME_RAND[] = { $(dd if=/dev/urandom of=/dev/stdout bs=1 count=8 2>/dev/null | hexdump -e '4/1 "0x%02x, "') };" > rand.h STATS_RULES="$(echo "$RULES" | ./genrules.py --8021q=drop-vlan --v6frag=ignore-parse-if-rule --ihl=parse-options)" -clang $CLANG_ARGS -g -std=c99 -pedantic -Wall -Wextra -Wno-pointer-arith -Wno-unused-variable -Wno-unused-function -O3 -emit-llvm -c xdp.c -o xdp.bc +clang $CLANG_ARGS -g -std=c99 -pedantic -Wall -Wextra -Wno-pointer-arith -Wno-unused-variable -Wno-unused-function -Oz -emit-llvm -c xdp.c -o xdp.bc if [ "$2" != "" ]; then - clang $4 -g -std=c99 -pedantic -Wall -Wextra -Wno-pointer-arith -O3 -emit-llvm -c "$2" -o wrapper.bc + clang $4 -g -std=c99 -pedantic -Wall -Wextra -Wno-pointer-arith -Oz -emit-llvm -c "$2" -o wrapper.bc llvm-link xdp.bc wrapper.bc | llc -O3 -march=bpf -mcpu=probe -filetype=obj -o xdp else cat xdp.bc | llc -O3 -march=bpf -mcpu=probe -filetype=obj -o xdp -- 2.39.5