You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crypto++ 5.6.3 and above use GCC's init_priority in an effort to tame the C++ Static Initialization Order Fiasco. Its an optional feature that is disabled by default under 5.6.3. It can be enabled with CXXFLAGS="-DCRYPTOPP_INIT_PRIORITY=250" (or similar).
OS X has about 6 projects that provide Unix and Linux tools on OS X. The projects are called "ports' and they include:
Fink
Gentoo/Alt
Homebrew
MacPorts
Pkgsrc
Rudix
Some of the ports provide GCC, but they do not enable init_priority support and subsequently fail the compile. The compiler appears to be acting as a proxy for the linker, and assume init_priority is an error because the OS X linker does not offer a pubic interface to control the order. Or maybe more correctly, Apple did not respond to a GNU/Binutils bug report on the subject. (Its not clear if the linker would actually fail a link if the metadata was present).
As far as we know, Fink will accept init_priority, and MacPorts will reject init_priority. We don't know what the other ports are doing. Additionally, other compilers are OK, like Apple's GCC and Clang.
We attempted to acquire metrics to help gauge the impact of disabling init_priority among a ports collection, but MacPorts does not test its compilers. Also see Does MacPorts provide its Test/QA results online?
_Strategies_
We don't have a strategy for dealing with GCC-compatible compilers that refuse to compile a program. The two strategies being considered are:
disable init_priority for all non-Apple GCC compilers
disable init_priority for port compilers that refuse to compile the program
Strategy 1 disables init_priority for all GCC compilers since Apple no longer provides GCC. For example, if we detect any port like Fink (and not just a problematic port like MacPorts), then the code disables init_priority.
Strategy 2 disables init_priority on a per-need basis. For example, if we detect a problematic port like MacPorts (and not just any port like Fink), then the code disables init_priority.
The text was updated successfully, but these errors were encountered:
noloader
changed the title
Need a strategy for dealing with OS X ported programs
Need a strategy for dealing with OS X ported compilers
Oct 31, 2015
_Background_
Crypto++ 5.6.3 and above use GCC's
init_priority
in an effort to tame the C++ Static Initialization Order Fiasco. Its an optional feature that is disabled by default under 5.6.3. It can be enabled withCXXFLAGS="-DCRYPTOPP_INIT_PRIORITY=250"
(or similar).OS X has about 6 projects that provide Unix and Linux tools on OS X. The projects are called "ports' and they include:
Some of the ports provide GCC, but they do not enable
init_priority
support and subsequently fail the compile. The compiler appears to be acting as a proxy for the linker, and assumeinit_priority
is an error because the OS X linker does not offer a pubic interface to control the order. Or maybe more correctly, Apple did not respond to a GNU/Binutils bug report on the subject. (Its not clear if the linker would actually fail a link if the metadata was present).As far as we know, Fink will accept
init_priority
, and MacPorts will rejectinit_priority
. We don't know what the other ports are doing. Additionally, other compilers are OK, like Apple's GCC and Clang.We attempted to acquire metrics to help gauge the impact of disabling
init_priority
among a ports collection, but MacPorts does not test its compilers. Also see Does MacPorts provide its Test/QA results online?_Strategies_
We don't have a strategy for dealing with GCC-compatible compilers that refuse to compile a program. The two strategies being considered are:
init_priority
for all non-Apple GCC compilersinit_priority
for port compilers that refuse to compile the programStrategy 1 disables
init_priority
for all GCC compilers since Apple no longer provides GCC. For example, if we detect any port like Fink (and not just a problematic port like MacPorts), then the code disablesinit_priority
.Strategy 2 disables
init_priority
on a per-need basis. For example, if we detect a problematic port like MacPorts (and not just any port like Fink), then the code disablesinit_priority
.The text was updated successfully, but these errors were encountered: