This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: PATCH: Enable PIC for mips*-*-*


On Sat, Nov 17, 2001 at 12:40:00AM -0200, Alexandre Oliva wrote:
> On Oct 23, 2001, "H . J . Lu" <hjl@lucon.org> wrote:
> 
> > On Mon, Oct 22, 2001 at 09:53:44PM -0700, Eric Christopher wrote:
> >> > This patch enables PIC for mips*-*-*.
> >> > 
> >> 
> >> *reads further on thread*
> >> 
> >> Is it not possible to fix libtool instead?
> 
> > Yes. This is the one:
> 
> > http://sources.redhat.com/ml/binutils/2001-10/msg00406.html
> 
> That patch is wrong on two accounts: you can't assume file_magic is
> enough, and you're removing the comment that explains the reasoning,

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. If I read it correctly, ARM was
using file_magic before my change. Can you tell me what is wrong to
remove that comment? For all I know, this change only affects Linux.


> 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.



H.J.


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