------- Comment #6 from mrs at apple dot com  2009-09-22 18:56 -------
I wonder if we could just trim out the symbols from libgcc that are in
libSystem, and arrange for gcc's installed libgcc to be found first. 
Advantage, simplicity, less target specific work, easy to understand. 
Downside, OS upgrades require recompiling the world, to the extent there are
new symbols in libgcc that are then added to libSystem in later OS releases. 
ld has magic in it that can appear and disappear symbols from a dylib depending
upon which OS is targeted.  Target old OSes, all the usual symbols are there,
target newer OSes, large swaths disappear (but are found anyway in libSystem).

Also, all this fun stuff it relevant to darwin10 and later only (not darwin9). 
I'm not a fan of yet more compile flags in general.  I'd rather have a nice
design that covers the bases, that doesn't really need yet more flags.

The hiding trick goes something like:

    #define NOT_HERE_BEFORE_10_6(sym) \
        extern const char sym##_tmp3 __asm("$ld$hide$os10.3$_" #sym ); \
            __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39888

Reply via email to