[Bug target/78336] powerpc-darwin bootstrap broken (probably by 241930)

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Nov 13 14:29:00 GMT 2016


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

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to David Edelsohn from comment #3)
> So the problem is the reference to ASM_OUTPUT_DEF in rs6000_asm_weaken_decl,
> despite the fact that the function never will be called on Darwin. 
> Previously the ASM_WEAKEN_DECL macro was protected by RS6000_WEAK and now
> the function -- with the reference to ASM_OUTPUT_DEF -- is defined
> regardless.
> 
> The solutions include:
> 
> 1) Bracket rs6000_asm_weaken_decl with #if RS6000_WEAK to match the previous
> logic.
> 
> 2) Bracket rs6000_asm_weaken_decl with #ifdef ASM_OUTPUT_DEF.
> 
> 3) Bracket the call to ASM_OUTPUT_DEF with #ifdef ASM_OUTPUT_DEF.
> 
> 4) Create a no-op definition of ASM_OUTPUT_DEF on Darwin in darwin.h,
> similar to xcoff.h.

3 seems neatest with maybe #else gcc_unreachable() or an assert.

4 won't work (as stated above creating a NO-op ASM_OUTPUT_DEF causes a change
in the logic in varasm.c).

5) rename the use of ASM_OUTPUT_DEF in rs6000_asm_weaken_decl to
RS6000_ASM_OUTPUT_DEF and equate that in rs6000.h and set it to gcc_unreachable
in darwin.h


More information about the Gcc-bugs mailing list