Skip to content

Conversation

@dther
Copy link
Contributor

@dther dther commented Jun 1, 2020

GCC 10 changes default C compilation behaviour. In particular:

GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking.

Adding -fcommon to CFLAGS in the Makefile fixes #40.
I wonder whether some minor refactoring would be a better solution, but I doubt any performance benefits would be worth the effort.

dther added 2 commits June 1, 2020 12:33
A gcc-10 changes the default behaviour from -fcommon to -fno-common,
which causes linking errors in some build processes.

Fixes mpereira#40.
@mpereira
Copy link
Owner

mpereira commented Jun 1, 2020

Thanks @dther. I tested it on macOS and it still works.

@mpereira mpereira merged commit 5bbaafd into mpereira:master Jun 1, 2020
@mpereira
Copy link
Owner

mpereira commented Jun 1, 2020

@dther v1.3.0 released with your change. Thanks again!

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.

Building fails in Fedora 32

2 participants