diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-04-10 11:25:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-04-10 13:15:49 -0400 |
commit | 8f5ce115d51d31756b6911310a0deb1bafba46c0 (patch) | |
tree | ae18654c49ab6afd5454d57caad4a48151691171 | |
parent | 35656951c896281a1ca581fdc63daecb1681a2d4 (diff) | |
download | bfs-8f5ce115d51d31756b6911310a0deb1bafba46c0.tar.xz |
config/cc.sh: Pass all the flags when running the compiler
-rwxr-xr-x | config/cc.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/config/cc.sh b/config/cc.sh index 04b142a..7e5c0d5 100755 --- a/config/cc.sh +++ b/config/cc.sh @@ -5,8 +5,12 @@ # Run the compiler and check if it succeeded -printf '$ %s' "$XCC" >&2 -printf ' %q' "$@" >&2 -printf ' -o /dev/null\n' >&2 +set -eux -$XCC "$@" -o /dev/null +$XCC \ + $BFS_CPPFLAGS $XCPPFLAGS ${EXTRA_CPPFLAGS:-} \ + $BFS_CFLAGS $XCFLAGS ${EXTRA_CFLAGS:-} \ + $XLDFLAGS ${EXTRA_LDFLAGS:-} \ + "$@" \ + $XLDLIBS ${EXTRA_LDLIBS:-} $BFS_LDLIBS \ + -o /dev/null |