OpenAoE / vblade

The Minimal Userland AoE Target
GNU General Public License v2.0
51 stars 16 forks source link

Fix linkage of global identifiers #15

Closed ghost closed 3 years ago

ghost commented 4 years ago

Align the code to the standard and modern compilers.

Signed-off-by: Andreas Kölbl koelblandreas@freenet.de

dfandrich commented 4 years ago

Looks like an alternate take on PR#13.

ghost commented 3 years ago

I don't know how this is information is valuable to someone reading the doc. The old code would still compile when using -fcommon as flag.

ecashin commented 3 years ago

When was that option first sorted in gcc? If it was long enough ago, and there's no disadvantage to using it, then you're right. The documentation will help people understand why we use the option if they're using an old gcc or trying to use their own favorite compiler instead of gcc.

ghost commented 3 years ago

You are right, we should leave the compile flag out in order to avoid confusion and enhance cross-compiler-portability as -fno-common serves ANSI-C-like behaviour. I don't think the flag has more functionality behind than to make its own usage obvious. The oldest reference I found was an 18 year old Changelog entry to compile gcc itself with that flag.

ecashin commented 3 years ago

18 years is long enough!