The diff adds support for dl_iterate_phdr from FreeBSD 7.0 libc, and also uses --as-needed when linking to libgcc_s. The main spec source is the FreeBSD spec from their cvs. The extras for dl_iterate_phdr adapted (they set -D__GLIBC__=3 on the cmdline/Makefile) on the code/config. This is only for i[3456]86 tho. Don't have the hardware to complete/test the x64/sparc64 (missing) parts.
Created attachment 16152 [details] patch against gcc-4.3.1
Patches go to gcc-patches@.
My bad, sent. http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01988.html
I followed the discussion pointed to by the URL in comment #3, but I could not find if the final version of the patch has been accepted or rejected. Is this PR still relevant or should it be closed?
Hi, there is no final version of this patch, it's current state is incomplete, but good enough to work for Gentoo/FreeBSD-x86 which is were we actively use it. Lacking other architectures (x64, sparc) to test this and make this a proper "add new feature" patch (it's not /really/ a bugfix, just adds dl_iterate_phdr support from FreeBSD's-7 and above libc) was the showstopper here. Feel free to close as you see fit, or perhaps continue on bug 33417. Just for reference, the patches we are using are here: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.2/gentoo/90_all_gcc-freebsd.patch?rev=1.1&view=markup http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.2/gentoo/91_all_gcc-freebsd.patch?rev=1.1&view=markup
Alternate patch was generated and installed on mainline (4.5) to address lack of support for dl_iterate_phdr from FreeBSD 7.0 libc.