https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87380

--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to m...@gcc.gnu.org from comment #14)
> You can test it if you can dump the ar symbol table, with a assembled .s
> file.  Nothing needs to work except the assembler and ar and the tool to
> dump the symbol table.  In the olden days, there was no entry for the weak
> symbol.  I was wondering around trying to recall which tool dumps the ar
> symbol table, no well; it seems like I used to know how to dump it, but
> haven't in years.

otool -Sv
 * but that's broken on llvm-based toolchains (still listed but doesn't work)
 * someone with some spare cycles might file a radar or fix it upstream
 * however, that won't help people with machines stuck on 10.11 etc (like my
8core xeon).

xcrun otool-classic -Sv foo.a would also work (for as long as Apple package
otool-classic).

==== however

Back to [xc2.5] i686-darwin8, the symbol is present for
 ar cru foo.a bar.o
 ranlib foo.a
 otool -Sv foo.a

Will try on a ppc-darwin8 system at some point.

So, at present, my inclination is to (not a patch, just the intent):

gcc/config/darwin.h:

#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0

gcc/config/rs6000/darwin7.h:

#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1

Since the original bug is against powerpc-darwin7 and we don't have anyone on
this thread able to test if it was fixed there;

As noted, I have my doubts whether xc1.5 is able to build current GCC (ISTR
that odcctools was required at some point - and, if that's so, then someone
trying to build for really ancient darwin is probably better off making a newer
cctools and ld64).

Reply via email to