Skip to content
Snippets Groups Projects
Commit dd595ff7 authored by Nick Zavaritsky's avatar Nick Zavaritsky
Browse files

Fix build (-fno-common)

A 'tentative definition' in C language is a global variable definition
missing both a storage class and an initializer, ex: int foo.
Traditionally it get's translated into a common symbol, allowing for
multiple definitions in different translation units to coexist.

Normally multiple definitions aren't allowed; unless they are common
symbols.  In the later case a linker picks one arbitrarily.

-fno-common alters tentative definitions translation, resulting in
a more strict and conformant semantics, multiple definitions are no
longer allowed.

This change was motivated by the OSX linker not handling common symbols
in static libraries
(https://stackoverflow.com/questions/19398742/os-x-linker-unable-to-find-symbols-from-a-c-file-which-only-contains-variables)
parent 4d49c40d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment