From 156e745be9f6a1b19b0f8e2a931148786d7acad4 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Wed, 23 Jul 2025 06:47:21 -0400 Subject: 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. --- bin/9c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/9c b/bin/9c index 195fec81..656ba84d 100755 --- a/bin/9c +++ b/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" -- cgit v1.2.3