Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linkage of global identifiers #15

Merged
merged 1 commit into from Nov 28, 2020
Merged

Fix linkage of global identifiers #15

merged 1 commit into from Nov 28, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 9, 2020

Align the code to the standard and modern compilers.

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

Align the code to the standard and modern compilers.

Signed-off-by: Andreas Kölbl <koelblandreas@freenet.de>
@dfandrich
Copy link

dfandrich commented Nov 14, 2020

Looks like an alternate take on PR#13.

Copy link
Contributor

@ecashin ecashin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update the documentation with information about what version of gcc introduced this option and how to build differently when using an older gcc?
Sorry I am not responsive lately, but I'll try to keep an eye out for your response.

@ghost
Copy link
Author

ghost commented Nov 28, 2020

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
Copy link
Contributor

ecashin commented Nov 28, 2020

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
Copy link
Author

ghost commented Nov 28, 2020

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
Copy link
Contributor

ecashin commented Nov 28, 2020

18 years is long enough!

@ecashin ecashin merged commit 5df3d49 into OpenAoE:master Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants