https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767
--- Comment #8 from Jeffrey Walton <noloader at gmail dot com> --- (In reply to Iain Sandoe from comment #7) > (In reply to Dominique d'Humieres from comment #4) > > I see the problem after having updated to Xcode 8.0. I am currently testing > > the following patch > > > /* The .text section is generated in varasm.c */ > > DEF_SECTION (text_coal_section, SECTION_CODE|SECTION_NO_ANCHOR, > > - ".section __TEXT,__textcoal_nt,coalesced,pure_instructions", 0) > > + ".section __TEXT,__text,coalesced,pure_instructions", 0) > > actually, we need to come up with a patch that simply emits the text/etc. > section whenever it would have emitted the text_coal/etc. one.. So rather > than adjusting section definitions - we need to change which ones are > selected in config/darwin.c > > .. but this should be conditional on a new enough linker to support it, or > we will break support for folks on ancient systems. Is this repeatable > without xcode8? Yes, it is repeatable with Xcode 8. Someone else mentioned they duplicatd with it. > I have some patches in progress to detect the linker features at > configuration time, be careful here. You use the new linker when -wa,-q is present. The new linker is the one in Clang Integrated Assembler. You use the old Apple ld when -Wa,-q is _not_present. Or maybe mor correctly, you just use ld. > so that we don't need to rely on guessing from the host > system version. I _think_ you can detect which linker at runtime with something like the following: IS_GAS := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler") Now, ld returns the string "GNU assembler". Clang returns the string "clang: error: unsupported argument '--version' to option 'Wa,'". The LLVM folks may have fixed it in https://llvm.org/bugs/show_bug.cgi?id=24200. A quick check with Clang-3.8 using MacPort compiler shows its not fixed: $ /opt/local/bin/clang-mp-3.8 -xc -c /dev/null -Wa,--version -o/dev/null 2>&1 clang: error: unsupported argument '--version' to option 'Wa,' > If this is not detectable by a linker feature, them perhaps > we can determine the earliest linker that can manage without the separate > sections (most likely considerably older than the one from Xcode8). I don't know about some of the other options available to you. Maybe the "safety valve" should be another option? I'm already doing "-Wa,-q"; another `-Wa,-x` won't other me. Jeff