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]

Re: [patch 2.95.3 branch]: Make ARM compiler recognize recent binutils


On Thursday, 21 December 2000, 16:26:27 +0000, bernds@redhat.com wrote:

[...]
> What about the addition of EXTRA_MULTILIB_PARTS?  Please resend the patch in
> the form in which it should be installed.

OK, here we go.

Cheers.

l8er
manfred


Fri Sep 10 11:43:07 1999  Philip Blundell <pb@futuretv.com>

	* configure.in, config/arm/linux-oldld.h,
	config/arm/linux-elf26.h, config/arm/linux-elf.h: Backport latest
	ARM GNU/Linux config from mainline.
	* configure: Regenerate.

diff -rupN -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-2.95.3.orig/gcc/config/arm/linux-elf.h gcc-2.95.3/gcc/config/arm/linux-elf.h
--- gcc-2.95.3.orig/gcc/config/arm/linux-elf.h	Wed Dec 20 13:59:36 2000
+++ gcc-2.95.3/gcc/config/arm/linux-elf.h	Thu Dec 21 17:37:16 2000
@@ -28,13 +28,30 @@ Boston, MA 02111-1307, USA.  */
 /* We have libgcc2.  */
 #define HAVE_ATEXIT
 
-/* Default is to use APCS-32 mode.  */
 #ifndef SUBTARGET_DEFAULT_APCS26
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)
-#define SUBTARGET_EXTRA_LINK_SPEC	\
+/* Default is to use APCS-32 mode.  */
+# define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)
+# ifdef SUBTARGET_OLD_LINKER
+#  define SUBTARGET_EXTRA_LINK_SPEC	\
 	" %{mapcs-26:-m elf32arm26} %{!mapcs-26:-m elf32arm}"
-#define SUBTARGET_EXTRA_ASM_SPEC	\
+# else	/* new linker */
+#  define SUBTARGET_EXTRA_LINK_SPEC	\
+	" %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p"
+# endif
+# define SUBTARGET_EXTRA_ASM_SPEC	\
 	" %{mapcs-26:-mapcs-26} %(!mapcs-26:-mapcs-32}"
+# define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+#else	/* default is APCS-26 */
+# define TARGET_DEFAULT (ARM_FLAG_SHORT_BYTE)
+# ifdef SUBTARGET_OLD_LINKER
+#  define SUBTARGET_LINK_SPEC	\
+	" %{mapcs-32:-m elf32arm} %{!mapcs-32:-m elf32arm26}"
+# else	/* new linker */
+#  define SUBTARGET_LINK_SPEC	\
+	" %{mapcs-32:-m armelf_linux} %{!mapcs-32:-m armelf_linux26} -p"
+# endif
+# define SUBTARGET_EXTRA_ASM_SPEC	\
+	" %{mapcs-32:-mapcs-32} %(!mapcs-32:-mapcs-26}"
 #endif
 
 /* This was defined in linux.h.  Define it here also. */
diff -rupN -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-2.95.3.orig/gcc/config/arm/linux-elf26.h gcc-2.95.3/gcc/config/arm/linux-elf26.h
--- gcc-2.95.3.orig/gcc/config/arm/linux-elf26.h	Sat Dec 19 10:11:45 1998
+++ gcc-2.95.3/gcc/config/arm/linux-elf26.h	Thu Dec 21 12:43:01 2000
@@ -1,6 +1,7 @@
-/* Definitions for 26-bit ARM running Linux-based GNU systems using ELF
-   Copyright (C) 1998 Free Software Foundation, Inc.
-   Contributed by Philip Blundell <philb@gnu.org>
+/* Definitions for ARM running Linux-based GNU systems 
+   using ELF and 26-bit APCS.
+   Copyright (C) 1999 Free Software Foundation, Inc.
+   Contributed by Philip Blundell <Philip.Blundell@pobox.com>
 
 This file is part of GNU CC.
 
@@ -19,14 +20,5 @@ along with this program; see the file CO
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+/* Tell linux-elf.h to default to 26-bit mode.  */
 #define SUBTARGET_DEFAULT_APCS26
-
-#define SUBTARGET_LINK_SPEC	\
-	" %{mapcs-32:-m elf32arm} %{!mapcs-32:-m elf32arm26}"
-
-#define SUBTARGET_EXTRA_ASM_SPEC	\
-	" %{mapcs-32:-mapcs-32} %(!mapcs-32:-mapcs-26}"
-
-#define TARGET_DEFAULT (ARM_FLAG_SHORT_BYTE)
-
-#include "arm/linux-elf.h"
diff -rupN -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-2.95.3.orig/gcc/config/arm/linux-elf26.h gcc-2.95.3/gcc/config/arm/linux-elf26.h
--- gcc-2.95.3.orig/gcc/config/arm/linux-oldld.h	Tue Nov  7 16:06:25 2000
+++ gcc-2.95.3/gcc/config/arm/linux-oldld.h
@@ -0,0 +1,27 @@
+/* Definitions for ARM running Linux-based GNU systems 
+   using ELF with old binutils.
+   Copyright (C) 1999 Free Software Foundation, Inc.
+   Contributed by Philip Blundell <Philip.Blundell@pobox.com>
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Unfortunately, owing to various historical accidents, version 2.9.4
+   and newer of GNU binutils are not quite compatible with the old 
+   (2.9.1-based) toolset.  This tells linux-elf.h to generate specs
+   appropriate for the older versions.  */
+#define SUBTARGET_OLD_LINKER
diff -rupN -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-2.95.3.orig/gcc/configure.in gcc-2.95.3/gcc/configure.in
--- gcc-2.95.3.orig/gcc/configure.in	Tue Jan 11 09:21:04 2000
+++ gcc-2.95.3/gcc/configure.in	Thu Dec 21 12:43:01 2000
@@ -756,15 +756,31 @@ changequote([,])dnl
 		tmake_file=arm/t-linux
 		gnu_ld=yes
 		;;
-	arm*-*-linux-gnu*)		# ARM GNU/Linux with ELF
+	arm*-*-linux-gnuoldld*)		# ARM GNU/Linux with old ELF linker
 		xm_file=arm/xm-linux.h
 		xmake_file=x-linux
+		tm_file="arm/linux-oldld.h arm/linux-elf.h"
 		case $machine in
 		armv2*-*-*)
-			tm_file=arm/linux-elf26.h
+			tm_file="arm/linux-elf26.h $tm_file"
+			;;
+		esac
+		tmake_file="t-linux arm/t-linux"
+		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+		gnu_ld=yes
+		case x${enable_threads} in
+		x | xyes | xpthreads | xposix)
+			thread_file='posix'
 			;;
-		*)
-			tm_file=arm/linux-elf.h
+		esac
+		;;
+	arm*-*-linux-gnu*)		# ARM GNU/Linux with ELF
+		xm_file=arm/xm-linux.h
+		xmake_file=x-linux
+		tm_file="arm/linux-elf.h"
+		case $machine in
+		armv2*-*-*)
+			tm_file="arm/linux-elf26.h $tm_file"
 			;;
 		esac
 		tmake_file="t-linux arm/t-linux"
diff -rupN -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-2.95.3.orig/gcc/configure gcc-2.95.3/gcc/configure
--- gcc-2.95.3.orig/gcc/configure	Sat Jul  8 16:04:38 2000
+++ gcc-2.95.3/gcc/configure	Thu Dec 21 12:43:01 2000
@@ -3194,15 +3194,31 @@ for machine in $build $host $target; do
 		tmake_file=arm/t-linux
 		gnu_ld=yes
 		;;
-	arm*-*-linux-gnu*)		# ARM GNU/Linux with ELF
+	arm*-*-linux-gnuoldld*)		# ARM GNU/Linux with old ELF linker
 		xm_file=arm/xm-linux.h
 		xmake_file=x-linux
+		tm_file="arm/linux-oldld.h arm/linux-elf.h"
 		case $machine in
 		armv2*-*-*)
-			tm_file=arm/linux-elf26.h
+			tm_file="arm/linux-elf26.h $tm_file"
+			;;
+		esac
+		tmake_file="t-linux arm/t-linux"
+		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+		gnu_ld=yes
+		case x${enable_threads} in
+		x | xyes | xpthreads | xposix)
+			thread_file='posix'
 			;;
-		*)
-			tm_file=arm/linux-elf.h
+		esac
+		;;
+	arm*-*-linux-gnu*)		# ARM GNU/Linux with ELF
+		xm_file=arm/xm-linux.h
+		xmake_file=x-linux
+		tm_file="arm/linux-elf.h"
+		case $machine in
+		armv2*-*-*)
+			tm_file="arm/linux-elf26.h $tm_file"
 			;;
 		esac
 		tmake_file="t-linux arm/t-linux"

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