[Bug target/63610] OSX 10.10 (Yosemite) segfault in MPIR testsuite with -O0 or -O1

vbraun.name at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 23 13:22:00 GMT 2014


--- Comment #4 from Volker Braun <vbraun.name at gmail dot com> ---
I got my hands on a gcc 4.9.1 binary build made on OSX 10.9 and this one works.
Diffing the log shows that this is due to different linker flags, my binary
build calls 

libtool: link: gcc -std=gnu99 -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o
.libs/libmpir.11.dylib  [...]

whereas the Yosemite-bootstrapped gcc calls

libtool: link: gcc -std=gnu99 -dynamiclib -Wl,-flat_namespace -Wl,-undefined
-Wl,suppress -o .libs/libmpir.11.dylib [...]

Relinking with the previous linker flags fixes the segfault. This is most
likely due to incorrect aclocal.m4 case check

      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined
${wl}suppress' ;;

not taking 10.10 properly into account.

More information about the Gcc-bugs mailing list