This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[build] Disable dl_iterate_phdr on Solaris 10


Mainline bootstrap is currently failing on Solaris 10 Update 10 with GNU ld.
cc1 etc. are failing to link in stage2 like this:

/var/gcc/regression/trunk/10-gcc-gas-gld/build/./prev-gcc/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
/vol/gcc/src/hg/trunk/local/libgcc/unwind-dw2-fde-dip.c:451: undefined reference to `dl_iterate_phdr'
collect2: error: ld returned 1 exit status
make[3]: *** [lto1] Error 1

This happens because most of the Solaris 11 linker changes have been
backported to Solaris 10 Update 10, dl_iterate_phdr support among them.
Unfortunately, the function is only available in libdl there, not in
libc as on Solaris 11.  At first I thought about linking with -ldl if
this condition is detected during configure, but decided against it for
two reasons:

* dl_iterate_phdr is referenced from both libgcc_eh.a and libgcc_s.so.1,
  so every executable and shared library would have to be linked with
  -ldl.  Such a change is certainly not stage4 material.

* Even if it were installed (perhaps in 4.8 stage1), it would break
  compatibility between Solaris 10 updates, which I consider a bad
  thing.

Therefore I'm disabling the check for dl_iterate_phdr in target headers
before Solaris 11 to avoid this situation.  This fixes the bootstrap
with gld.

If Sun ld is in use, bootstrap isn't broken because the requisite ld
version isn't detected due to differences in linker version numbering
between OS releases.

Bootstrapped without regressions on i386-pc-solaris2.10 with as/ld,
gas/ld, and gas/gld.

Installed on mainline.

	Rainer


2012-01-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (gcc_cv_target_dl_iterate_phdr): Only check on
	Solaris 11+.
	* configure: Regenerate.



-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]