all: remove need for -fcommon
Use `extern` where appropriate so that we can remove `-fcommon` on macOS and others. On macOS, `-fcommon` generates a number of linker warnings. I've tested building on macOS, Linux, FreeBSD, NetBSD, OpenBSD and illumos. I am not in a position to test on AIX or other more esoteric platforms, however.
This commit is contained in:
4
bin/9c
4
bin/9c
@@ -23,7 +23,7 @@ usegcc()
|
||||
-Wno-deprecated-declarations \
|
||||
-fno-omit-frame-pointer \
|
||||
-fsigned-char \
|
||||
-fcommon \
|
||||
-fno-common \
|
||||
-std=gnu11 \
|
||||
"
|
||||
# want to put -fno-optimize-sibling-calls here but
|
||||
@@ -85,7 +85,7 @@ useclang()
|
||||
-Wno-unused-but-set-variable \
|
||||
-fsigned-char \
|
||||
-fno-caret-diagnostics \
|
||||
-fcommon \
|
||||
-fno-common \
|
||||
"
|
||||
cflags="$cflags -g"
|
||||
cflags="$cflags $CC9FLAGS"
|
||||
|
||||
Reference in New Issue
Block a user