This is the mail archive of the gcc@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]

Re: A config patch


>   > I was just informed that -fpic has to be used to compile libc.so
>   > for glibc on Linux/alpha. If it is really the case, one of my patch
>   > should be backed out and my Alpha PIC patch to config should be
>   > used at least for ELF/alpha.
> So is it really the case?  You don't seem certain.
> 
> jeff
> 

I am fairly certain that this patch is correct. I have to compile
shared glibc with -fPIC on linux/alpha to get a working dynamic
linker binary. The same is true for libstdc++.so.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Sun Sep  7 14:18:46 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* mh-elfalphapic, mt-elfalphapic: New.

--- /dev/null	Wed Dec 31 16:00:00 1969
+++ config/mh-elfalphapic	Sun Sep  7 14:17:07 1997
@@ -0,0 +1 @@
+PICFLAG=-fPIC
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ config/mt-elfalphapic	Sun Sep  7 14:17:07 1997
@@ -0,0 +1 @@
+PICFLAG_FOR_TARGET=-fPIC

Sun Sep  7 14:27:56 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
	
	* Makefile.in (local-distclean): Also remove mh-frag mt-frag.

	* configure.in (host_makefile_frag, target_makefile_frag):
	Handle multiple config files.
	(skipdirs): Add target-librx for Linux.
	(alpha-*-linux*): Add config/mh-elfalphapic to
	${host_makefile_frag} and config/mt-elfalphapic to
	${target_makefile_frag}

Index: Makefile.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- Makefile.in	1997/08/26 00:20:39	1.1.1.1
+++ Makefile.in	1997/08/26 05:16:55
@@ -893,7 +893,7 @@
 	-rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
 
 local-distclean:
-	-rm -f Makefile config.status config.cache
+	-rm -f Makefile config.status config.cache mh-frag mt-frag
 	-if [ "$(TARGET_SUBDIR)" != "." ]; then \
 	  rm -rf $(TARGET_SUBDIR); \
 	else true; fi
Index: configure.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/configure.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 configure.in
--- configure.in	1997/09/02 15:52:48	1.1.1.2
+++ configure.in	1997/09/07 21:22:10
@@ -107,42 +107,114 @@
 # Work in distributions that contain no compiler tools, like Autoconf.
 if [ -d ${srcdir}/config ]; then
 case "${host}" in
-  m68k-hp-hpux*)	  host_makefile_frag=config/mh-hp300 ;;
-  m68k-apollo-sysv*)      host_makefile_frag=config/mh-apollo68 ;;
-  m68k-apollo-bsd*)       host_makefile_frag=config/mh-a68bsd ;;
-  m88k-dg-dgux*)	  host_makefile_frag=config/mh-dgux ;;
-  m88k-harris-cxux*)	  host_makefile_frag=config/mh-cxux ;;
-  m88k-motorola-sysv*)    host_makefile_frag=config/mh-delta88;;
-  mips*-dec-ultrix*)      host_makefile_frag=config/mh-decstation ;;
-  mips*-nec-sysv4*)	  host_makefile_frag=config/mh-necv4 ;;
-  mips*-sgi-irix6*)	  host_makefile_frag=config/mh-irix6 ;;
-  mips*-sgi-irix5*)	  host_makefile_frag=config/mh-irix5 ;;
-  mips*-sgi-irix4*)       host_makefile_frag=config/mh-irix4 ;;
-  mips*-sgi-irix3*)       host_makefile_frag=config/mh-sysv ;;
-  mips*-*-sysv4*)	  host_makefile_frag=config/mh-sysv4 ;;
-  mips*-*-sysv*)	  host_makefile_frag=config/mh-riscos ;;
-  i[3456]86-*-dgux*)	  host_makefile_frag=config/mh-dgux386 ;;
-  i[3456]86-ncr-sysv4.3)  host_makefile_frag=config/mh-ncrsvr43 ;;
-  i[3456]86-ncr-sysv4*)   host_makefile_frag=config/mh-ncr3000 ;;
-  i[3456]86-*-sco3.2v5*)  host_makefile_frag=config/mh-sysv ;;
-  i[3456]86-*-sco*)       host_makefile_frag=config/mh-sco ;;
-  i[3456]86-*-isc*)	  host_makefile_frag=config/mh-sysv ;;
-  i[3456]86-*-solaris2*)  host_makefile_frag=config/mh-sysv4 ;;
-  i[3456]86-*-aix*)	  host_makefile_frag=config/mh-aix386 ;;
-  i[3456]86-*-go32*)	  host_makefile_frag=config/mh-go32 ;;
-  i[3456]86-*-msdosdjgpp*) host_makefile_frag=config/mh-go32 ;;
-  *-cygwin32*)	  	  host_makefile_frag=config/mh-cygwin32 ;;
-  *-windows*)	  	  host_makefile_frag=config/mh-windows ;;
-  vax-*-ultrix2*)         host_makefile_frag=config/mh-vaxult2 ;;
-  *-*-solaris2*)          host_makefile_frag=config/mh-solaris ;;
-  m68k-sun-sunos*)	  host_makefile_frag=config/mh-sun3 ;;
-  *-hp-hpux[78]*)         host_makefile_frag=config/mh-hpux8 ;;
-  *-hp-hpux*)             host_makefile_frag=config/mh-hpux ;;
-  *-*-hiux*)              host_makefile_frag=config/mh-hpux ;;
-  rs6000-*-lynxos*)	  host_makefile_frag=config/mh-lynxrs6k ;;
-  *-*-lynxos*)	  	  host_makefile_frag=config/mh-lynxos ;;
-  *-*-sysv4*)             host_makefile_frag=config/mh-sysv4 ;;
-  *-*-sysv*)              host_makefile_frag=config/mh-sysv ;;
+  m68k-hp-hpux*)
+    host_makefile_frag="${host_makefile_frag} config/mh-hp300"
+    ;;
+  m68k-apollo-sysv*)
+    host_makefile_frag="${host_makefile_frag} config/mh-apollo68"
+    ;;
+  m68k-apollo-bsd*)
+    host_makefile_frag="${host_makefile_frag} config/mh-a68bsd"
+    ;;
+  m88k-dg-dgux*)
+    host_makefile_frag="${host_makefile_frag} config/mh-dgux"
+    ;;
+  m88k-harris-cxux*)
+    host_makefile_frag="${host_makefile_frag} config/mh-cxux"
+    ;;
+  m88k-motorola-sysv*)
+    host_makefile_frag="${host_makefile_frag} config/mh-delta88"
+    ;;
+  mips*-dec-ultrix*)
+    host_makefile_frag="${host_makefile_frag} config/mh-decstation"
+    ;;
+  mips*-nec-sysv4*)
+    host_makefile_frag="${host_makefile_frag} config/mh-necv4"
+    ;;
+  mips*-sgi-irix6*)
+    host_makefile_frag="${host_makefile_frag} config/mh-irix6"
+    ;;
+  mips*-sgi-irix5*)
+    host_makefile_frag="${host_makefile_frag} config/mh-irix5"
+    ;;
+  mips*-sgi-irix4*)
+    host_makefile_frag="${host_makefile_frag} config/mh-irix4"
+    ;;
+  mips*-sgi-irix3*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv"
+    ;;
+  mips*-*-sysv4*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
+    ;;
+  mips*-*-sysv*)
+    host_makefile_frag="${host_makefile_frag} config/mh-riscos"
+    ;;
+  i[3456]86-*-dgux*)
+    host_makefile_frag="${host_makefile_frag} config/mh-dgux386"
+    ;;
+  i[3456]86-ncr-sysv4.3)
+    host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43"
+    ;;
+  i[3456]86-ncr-sysv4*)
+    host_makefile_frag="${host_makefile_frag} config/mh-ncr3000"
+    ;;
+  i[3456]86-*-sco3.2v5*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv"
+    ;;
+  i[3456]86-*-sco*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sco"
+    ;;
+  i[3456]86-*-isc*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv"
+    ;;
+  i[3456]86-*-solaris2*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
+    ;;
+  i[3456]86-*-aix*)
+    host_makefile_frag="${host_makefile_frag} config/mh-aix386"
+    ;;
+  i[3456]86-*-go32*)
+    host_makefile_frag="${host_makefile_frag} config/mh-go32"
+    ;;
+  i[3456]86-*-msdosdjgpp*)
+    host_makefile_frag="${host_makefile_frag} config/mh-go32"
+    ;;
+  *-cygwin32*)
+    host_makefile_frag="${host_makefile_frag} config/mh-cygwin32"
+    ;;
+  *-windows*)
+    host_makefile_frag="${host_makefile_frag} config/mh-windows"
+    ;;
+  vax-*-ultrix2*)
+    host_makefile_frag="${host_makefile_frag} config/mh-vaxult2"
+    ;;
+  *-*-solaris2*)
+    host_makefile_frag="${host_makefile_frag} config/mh-solaris"
+    ;;
+  m68k-sun-sunos*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sun3"
+    ;;
+  *-hp-hpux[78]*)
+    host_makefile_frag="${host_makefile_frag} config/mh-hpux8"
+    ;;
+  *-hp-hpux*)
+    host_makefile_frag="${host_makefile_frag} config/mh-hpux"
+    ;;
+  *-*-hiux*)
+    host_makefile_frag="${host_makefile_frag} config/mh-hpux"
+    ;;
+  rs6000-*-lynxos*)
+    host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k"
+    ;;
+  *-*-lynxos*)
+    host_makefile_frag="${host_makefile_frag} config/mh-lynxos"
+    ;;
+  *-*-sysv4*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
+    ;;
+  *-*-sysv*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv"
+    ;;
 esac
 fi
 
@@ -186,31 +258,49 @@
 esac
 
 if [ x${shared} = xyes ]; then
-  waugh=
   case "${host}" in
-    hppa*)		waugh=config/mh-papic ;;
-    i[3456]86-*)	waugh=config/mh-x86pic ;;
-    sparc64-*)		waugh=config/mh-sparcpic ;;
-    powerpc*-*)		waugh=config/mh-ppcpic ;;
-    *)			waugh=config/mh-${host_cpu}pic ;;
+    hppa*)
+      host_makefile_frag="${host_makefile_frag} config/mh-papic"
+      ;;
+    i[3456]86-*)
+      host_makefile_frag="${host_makefile_frag} config/mh-x86pic"
+      ;;
+    sparc64-*)
+      host_makefile_frag="${host_makefile_frag} config/mh-sparcpic"
+      ;;
+    powerpc*-*)
+      host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
+      ;;
+    alpha-*-linux*)
+      host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic"
+      ;;
+    *)
+      host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
+      ;;
   esac
-  if [ -f ${srcdir}/${waugh} ]; then
-    if [ -n "${host_makefile_frag}" ] ; then
-      cat ${srcdir}/${host_makefile_frag} > mh-frag
-      cat ${srcdir}/${waugh} >> mh-frag
-      host_makefile_frag=mh-frag
-    else
-      host_makefile_frag=${waugh}
-    fi
-  fi
+fi
+
+rm -f mh-frag
+if [ -n "${host_makefile_frag}" ] ; then
+  for f in ${host_makefile_frag}
+  do
+    cat ${srcdir}/$f >> mh-frag
+  done
+  host_makefile_frag=mh-frag
 fi
 
 # per-target:
 
 case "${target}" in
-  v810*)		target_makefile_frag=config/mt-v810 ;;
-  i[3456]86-*-netware*) target_makefile_frag=config/mt-netware ;;
-  powerpc-*-netware*)   target_makefile_frag=config/mt-netware ;;
+  v810*)
+    target_makefile_frag="${target_makefile_frag} config/mt-v810"
+    ;;
+  i[3456]86-*-netware*)
+    target_makefile_frag="${target_makefile_frag} config/mt-netware"
+    ;;
+  powerpc-*-netware*)
+    target_makefile_frag="${target_makefile_frag} config/mt-netware"
+    ;;
 esac
 
 skipdirs=
@@ -453,6 +543,10 @@
     # but don't build gdb
     noconfigdirs="$noconfigdirs gdb target-libg++ target-libstdc++ target-libio target-librx"
     ;;
+  *-*-linux*)
+    # linux has rx in libc
+    skipdirs="$skipdirs target-librx"
+    ;;
   *-*-cygwin32)
     target_configdirs="$target_configdirs target-winsup"
     noconfigdirs="$noconfigdirs expect target-libgloss"
@@ -754,11 +848,31 @@
 
 if [ x${shared} = xyes ]; then
   case "${target}" in
-    hppa*)		target_makefile_frag=config/mt-papic ;;
-    i[3456]86-*)	target_makefile_frag=config/mt-x86pic ;;
-    powerpc*-*)		target_makefile_frag=config/mt-ppcpic ;;
-    *)			target_makefile_frag=config/mt-${target_cpu}pic ;;
+    hppa*)
+      target_makefile_frag="${target_makefile_frag} config/mt-papic"
+      ;;
+    i[3456]86-*)
+      target_makefile_frag="${target_makefile_frag} config/mt-x86pic"
+      ;;
+    powerpc*-*)
+      target_makefile_frag="${target_makefile_frag} config/mt-ppcpic"
+      ;;
+    alpha-*-linux*)
+      target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic"
+      ;;
+    *)
+      target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic"
+      ;;
   esac
+fi
+
+rm -f mt-frag
+if [ -n "${target_makefile_frag}" ] ; then
+  for f in ${target_makefile_frag}
+  do
+    cat ${srcdir}/$f >> mt-frag
+  done
+  target_makefile_frag=mt-frag
 fi
 
 # post-target:


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