This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Enable PIC for mips*-*-*
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: Eric Christopher <echristo at cygnus dot com>, binutils at sourceware dot cygnus dot com, gcc-patches at gcc dot gnu dot org
- Date: 17 Nov 2001 02:04:34 -0200
- Subject: Re: PATCH: Enable PIC for mips*-*-*
- Organization: GCC Team, Red Hat
- References: <20011021101857.A4495@lucon.org><Pine.LNX.4.21.0110222152570.8335-100000@twigboy.cygnus.com><20011022215716.A2604@lucon.org><oradxmjf27.fsf@free.redhat.lsd.ic.unicamp.br><20011116195358.A12477@lucon.org>
On Nov 17, 2001, "H . J . Lu" <hjl@lucon.org> wrote:
> Here is my patch:
> # This must be Linux ELF.
> linux-gnu*)
> - case $host_cpu in
> - alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
> - lt_cv_deplibs_check_method=pass_all ;;
> - *)
> - # glibc up to 2.1.1 does not perform some relocations on ARM
> - lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared
> object|dynamic lib )'] ;;
> - esac
> + lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared
> object|dynamic lib )']
> lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
> ;;
> I removed
> # glibc up to 2.1.1 does not perform some relocations on ARM
> since all Linux use file_magic now.
Yup. And then you add code to the file_magic branch in ltmain.sh to
compensate the effect of what used to be pass_all, which was right,
and which is why your patch was wrong.
What you want for mips is to add it to the first branch of the case,
such that deplibs_check_method=pass_all for mips too, if this is
indeed correct for mips.
>> and linking archives into shared libraries is wrong on a number of
>> platforms, and the way to tell libtool about it is use a different
>> setting in deplibs_check_method.
> Feel free to get it right. My Linux binutils works fine under Linux.
But it won't build correctly with --enable-shared on other platforms
that don't accept PDC in shared libraries.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me