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:
Dan Cross
2025-07-23 06:47:21 -04:00
parent 1e6e30e91e
commit 156e745be9
39 changed files with 330 additions and 184 deletions

View File

@@ -690,6 +690,7 @@ threadrwakeup(Rendez *r, int all, ulong pc)
static int threadargc;
static char **threadargv;
#pragma weak mainstacksize
int mainstacksize;
extern int _p9usepwlibrary; /* getgrgid etc. smash the stack - tell _p9dir just say no */
static void