public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations.
@ 2008-05-04 11:26 David Miller
  2008-05-18 13:20 ` Matthias Klose
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-05-04 11:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: jakub, tcallawa, debian-gcc


This patch rolls up some issues with sparc*-*-linux* configurations
I've wanted to cure for years.  The biggest two problems were:

1) Lack of use of config/linux.h, resulting in chronic problems
   because config/sparc/linux{,64}.h was not updated or updated
   incorrectly.

2) Distributions patch gcc in various ways for Sparc in order to
   get a biarch compiler defaulting to 32-bit output.

And those are both cured here.  The latter is addressed by fixing the
ASM_CPU_DEFAULT_SPEC define in config/sparc/linux64.h, which should
have been ASM_CPU64_DEFAULT_SPEC, and also adding support for
"--enable-target=all" to sparc-*-linux* just like for powerpc and
x86.

I've regstrapped this using:

sparc-*-linux*
sparc-*-linux* + --enable-targets=all
sparc64-*-linux*

Committed to mainline.

gcc/

	* config.gcc (sparc*-*-*): Always set need_64bit_hwint to yes.
	(sparc*-*-linux*): Use linux.h in tm_file.
	(sparc-*-linux*): If 'enabled_targets' is 'all', build a bi-arch
	compiler defaulting to 32-bit.
	(sparc*-*-*): Remove explicit target settings of need_64bit_hwint,
	no longer needed.
	* config/sparc/linux.h: Remove definitions now obtained
	properly from linux.h
	* config/sparc/linux64.h: Likewise.
	(ASM_CPU_DEFAULT_SPEC): Change this to ASM_CPU64_DEFAULT_SPEC, we
	don't want this setting for 32-bit builds in a biarch compiler.
	* doc/install.texi: Add sparc-linux to list of targets
	supporting --enable-targets=all.

libcpp/

	* configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
	* configure: Regenerate.

Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 134926)
+++ gcc/doc/install.texi	(working copy)
@@ -1201,7 +1201,8 @@
 option enables the 32-bit target to be a bi-arch compiler, which is
 useful when you want a bi-arch compiler that defaults to 32-bit, and
 you are building a bi-arch or multi-arch binutils in a combined tree.
-Currently, this option only affects powerpc-linux and x86-linux.
+Currently, this option only affects sparc-linux, powerpc-linux and
+x86-linux.
 
 @item --enable-secureplt
 This option enables @option{-msecure-plt} by default for powerpc-linux.
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 134926)
+++ gcc/config.gcc	(working copy)
@@ -358,13 +358,10 @@
 score*-*-*)
 	cpu_type=score
 	;;
-sparc64*-*-*)
+sparc*-*-*)
 	cpu_type=sparc
 	need_64bit_hwint=yes
 	;;
-sparc*-*-*)
-	cpu_type=sparc
-	;;
 spu*-*-*)
 	cpu_type=spu
 	need_64bit_hwint=yes
@@ -2357,9 +2354,15 @@
 	use_fixproto=yes
 	;;
 sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
-	tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
+	if test x$enable_targets = xall; then
+		tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
+		tmake_file="${tmake_file} sparc/t-linux64 sparc/t-crtfm"
+	else
+		tm_file="${tm_file} sparc/linux.h"
+		tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
+	fi
 	;;
 sparc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
@@ -2396,7 +2399,6 @@
 	  "":yes:* | yes:yes:* ) thread_file=posix ;;
 	  "":*:yes | yes:*:yes ) thread_file=solaris ;;
 	esac
-	need_64bit_hwint=yes
 	;;
 sparc-*-solaris2*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
@@ -2437,7 +2439,6 @@
 		fi
 		tm_file="${tm_file} tm-dwarf2.h"
 		tmake_file="$tmake_file sparc/t-sol2-64"
-		need_64bit_hwint=yes
 		test x$with_cpu != x || with_cpu=v9
 		;;
 	esac
@@ -2488,10 +2489,9 @@
 		x) with_cpu=ultrasparc ;;
 		*) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
 	esac
-	need_64bit_hwint=yes
 	;;
 sparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
-	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
+	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h sparc/linux64.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
 	;;
Index: gcc/config/sparc/linux.h
===================================================================
--- gcc/config/sparc/linux.h	(revision 134926)
+++ gcc/config/sparc/linux.h	(working copy)
@@ -22,39 +22,12 @@
 #define TARGET_OS_CPP_BUILTINS()		\
   do						\
     {						\
-      builtin_define_std ("unix");		\
-      builtin_define_std ("linux");		\
-      builtin_define ("__gnu_linux__");		\
-      builtin_assert ("system=linux");		\
-      builtin_assert ("system=unix");		\
-      builtin_assert ("system=posix");		\
+      LINUX_TARGET_OS_CPP_BUILTINS();		\
       if (TARGET_LONG_DOUBLE_128)       	\
 	builtin_define ("__LONG_DOUBLE_128__");	\
     }						\
   while (0)
 
-/* Don't assume anything about the header files.  */
-#define NO_IMPLICIT_EXTERN_C
-
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
-/* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
-   the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-   provides part of the support for getting C++ file-scope static
-   object constructed before entering `main'.  */
-   
-#undef  STARTFILE_SPEC
-#if defined HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-#endif
-
 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
    the GNU/Linux magical crtend.o file (see crtstuff.c) which
    provides part of the support for getting C++ file-scope static
@@ -63,8 +36,8 @@
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC \
-  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
-   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
+   %{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
 
 /* This is for -profile to use -lc_p instead of -lc.  */
 #undef	CC1_SPEC
@@ -75,10 +48,6 @@
 %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 "
 
-/* The GNU C++ standard library requires that these macros be defined.  */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc GNU/Linux with ELF)");
 
@@ -98,12 +67,6 @@
 #define CPP_SUBTARGET_SPEC \
 "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
 
-#undef LIB_SPEC
-#define LIB_SPEC \
-  "%{pthread:-lpthread} \
-   %{shared:-lc} \
-   %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
-
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
@@ -121,16 +84,7 @@
 /* If ELF is the default format, we should not use /lib/elf.  */
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-#if UCLIBC_DEFAULT
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
-#else
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
-#endif
-#define LINUX_DYNAMIC_LINKER \
-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
 
-
 #undef  LINK_SPEC
 #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
   %{!mno-relax:%{!r:-relax}} \
@@ -191,10 +145,6 @@
 
 #undef DITF_CONVERSION_LIBFUNCS
 #define DITF_CONVERSION_LIBFUNCS 1
-
-#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-#endif
 \f
 #ifdef HAVE_AS_TLS
 #undef TARGET_SUN_TLS
@@ -203,31 +153,10 @@
 #define TARGET_GNU_TLS 1
 #endif
 \f
-/* Don't be different from other Linux platforms in this regard.  */
-#define HANDLE_PRAGMA_PACK_PUSH_POP
-
 /* We use GNU ld so undefine this so that attribute((init_priority)) works.  */
 #undef CTORS_SECTION_ASM_OP
 #undef DTORS_SECTION_ASM_OP
 
-/* Determine whether the entire c99 runtime is present in the
-   runtime library.  */
-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
-
-/* Whether we have sincos that follows the GNU extension.  */
-#define TARGET_HAS_SINCOS (OPTION_GLIBC)
-
-#define TARGET_POSIX_IO
-
-#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-
-/* Use --as-needed -lgcc_s for eh support.  */
-#ifdef HAVE_LD_AS_NEEDED
-#define USE_LD_AS_NEEDED 1
-#endif
-
 #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h"
 
 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to
Index: gcc/config/sparc/linux64.h
===================================================================
--- gcc/config/sparc/linux64.h	(revision 134926)
+++ gcc/config/sparc/linux64.h	(working copy)
@@ -19,27 +19,18 @@
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define TARGET_OS_CPP_BUILTINS()			\
-  do							\
-    {							\
-      builtin_define_std ("unix");			\
-      builtin_define_std ("linux");			\
-      builtin_define ("_LONGLONG");			\
-      builtin_define ("__gnu_linux__");			\
-      builtin_assert ("system=linux");			\
-      builtin_assert ("system=unix");			\
-      builtin_assert ("system=posix");			\
-      if (TARGET_ARCH32 && TARGET_LONG_DOUBLE_128)	\
-	builtin_define ("__LONG_DOUBLE_128__");		\
-    }							\
+#define TARGET_OS_CPP_BUILTINS()		\
+  do						\
+    {						\
+      LINUX_TARGET_OS_CPP_BUILTINS();		\
+      if (TARGET_ARCH64)			\
+        builtin_define ("_LONGLONG");		\
+      if (TARGET_ARCH32				\
+          && TARGET_LONG_DOUBLE_128)		\
+	builtin_define ("__LONG_DOUBLE_128__");	\
+    }						\
   while (0)
 
-/* Don't assume anything about the header files.  */
-#define NO_IMPLICIT_EXTERN_C
-
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
     || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
     || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 \
@@ -54,42 +45,22 @@
    + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
 #endif
 
-#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-Av9a"
+/* This must be v9a not just v9 because by default we enable
+   -mvis.  */
+#undef ASM_CPU64_DEFAULT_SPEC
+#define ASM_CPU64_DEFAULT_SPEC "-Av9a"
 
-/* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
-   the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-   provides part of the support for getting C++ file-scope static
-   object constructed before entering `main'.  */
-   
-#undef  STARTFILE_SPEC
-
-#ifdef HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared:%{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbeginS.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared:%{pg|p:gcrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbeginS.o%s}"
-#endif
-
 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
    the GNU/Linux magical crtend.o file (see crtstuff.c) which
    provides part of the support for getting C++ file-scope static
    object constructed before entering `main', followed by a normal
    GNU/Linux "finalizer" file, `crtn.o'.  */
 
-#undef  ENDFILE_SPEC
-
+#undef	ENDFILE_SPEC
 #define ENDFILE_SPEC \
   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
    %{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
 
-/* The GNU C++ standard library requires that these macros be defined.  */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc64 GNU/Linux with ELF)");
 
@@ -122,12 +93,6 @@
 %{pthread:-D_REENTRANT} \
 "
 
-#undef LIB_SPEC
-#define LIB_SPEC \
-  "%{pthread:-lpthread} \
-   %{shared:-lc} \
-   %{!shared: %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
-
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
@@ -146,17 +111,6 @@
 
 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-#if UCLIBC_DEFAULT
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
-#else
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
-#endif
-#define LINUX_DYNAMIC_LINKER32 \
-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-#define LINUX_DYNAMIC_LINKER64 \
-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
 
 #ifdef SPARC_BI_ARCH
 
@@ -203,7 +157,7 @@
 
 #undef	CC1_SPEC
 #if DEFAULT_ARCH32_P
-#define CC1_SPEC "\
+#define CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
 %{mcypress:-mcpu=cypress} \
 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
@@ -214,7 +168,7 @@
   %{!mno-vis:%{!mcpu=v9:-mvis}}} \
 "
 #else
-#define CC1_SPEC "\
+#define CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
 %{mcypress:-mcpu=cypress} \
 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
@@ -324,10 +278,6 @@
 
 #undef DITF_CONVERSION_LIBFUNCS
 #define DITF_CONVERSION_LIBFUNCS 1
-
-#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-#endif
 \f
 #ifdef HAVE_AS_TLS
 #undef TARGET_SUN_TLS
@@ -336,31 +286,10 @@
 #define TARGET_GNU_TLS 1
 #endif
 \f
-/* Don't be different from other Linux platforms in this regard.  */
-#define HANDLE_PRAGMA_PACK_PUSH_POP
-
 /* We use GNU ld so undefine this so that attribute((init_priority)) works.  */
 #undef CTORS_SECTION_ASM_OP
 #undef DTORS_SECTION_ASM_OP
 
-/* Determine whether the entire c99 runtime is present in the
-   runtime library.  */
-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
-
-/* Whether we have sincos that follows the GNU extension.  */
-#define TARGET_HAS_SINCOS (OPTION_GLIBC)
-
-#define TARGET_POSIX_IO
-
-#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-
-/* Use --as-needed -lgcc_s for eh support.  */
-#ifdef HAVE_LD_AS_NEEDED
-#define USE_LD_AS_NEEDED 1
-#endif
-
 #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h"
 
 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to
Index: libcpp/configure
===================================================================
--- libcpp/configure	(revision 134926)
+++ libcpp/configure	(working copy)
@@ -8329,9 +8329,7 @@
 	powerpc*-*-* | \
 	rs6000*-*-* | \
 	s390*-*-* | \
-	sparc64*-*-* | ultrasparc-*-freebsd* | \
-	sparcv9-*-solaris2* | \
-	sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
+	sparc*-*-* | \
 	spu-*-* | \
 	sh[123456789lbe]*-*-* | sh-*-*)
 		need_64bit_hwint=yes ;;
Index: libcpp/configure.ac
===================================================================
--- libcpp/configure.ac	(revision 134926)
+++ libcpp/configure.ac	(working copy)
@@ -126,9 +126,7 @@
 	powerpc*-*-* | \
 	rs6000*-*-* | \
 	s390*-*-* | \
-	sparc64*-*-* | ultrasparc-*-freebsd* | \
-	sparcv9-*-solaris2* | \
-	sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
+	sparc*-*-* | \
 	spu-*-* | \
 	sh[123456789lbe]*-*-* | sh-*-*)
 		need_64bit_hwint=yes ;;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations.
  2008-05-04 11:26 [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations David Miller
@ 2008-05-18 13:20 ` Matthias Klose
  2008-05-19  8:17   ` David Miller
  2008-05-19 22:23   ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Matthias Klose @ 2008-05-18 13:20 UTC (permalink / raw)
  To: David Miller; +Cc: gcc-patches, jakub, tcallawa, debian-gcc

David Miller writes:
> 
> This patch rolls up some issues with sparc*-*-linux* configurations
> I've wanted to cure for years.  The biggest two problems were:
> 
> 1) Lack of use of config/linux.h, resulting in chronic problems
>    because config/sparc/linux{,64}.h was not updated or updated
>    incorrectly.
> 
> 2) Distributions patch gcc in various ways for Sparc in order to
>    get a biarch compiler defaulting to 32-bit output.
> 
> And those are both cured here.  The latter is addressed by fixing the
> ASM_CPU_DEFAULT_SPEC define in config/sparc/linux64.h, which should
> have been ASM_CPU64_DEFAULT_SPEC, and also adding support for
> "--enable-target=all" to sparc-*-linux* just like for powerpc and
> x86.
> 
> I've regstrapped this using:
> 
> sparc-*-linux*
> sparc-*-linux* + --enable-targets=all
> sparc64-*-linux*

Building GCC-4.3 with this patch (compared to the patch previously
used by debian [1]), I get differing symbol versions for the Debian build
on sparc in libgcc1. Both builds are configured --with-long-double-128.

The 32bit version has symbols where the symbol version did change from
GCC_LDBL_4.0.0 to GCC_4.0.0, the 64bit version some symbols version
did change from GLIBC_2.2 to GLIBC_2.0.

  Matthias

[1] http://svn.debian.org/wsvn/gcccvs/branches/sid/gcc-4.3/debian/patches/sparc-biarch.dpatch?op=file&rev=0&sc=0

The diff is <current debian version> <version with posted patch>.

dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: some symbols disappeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libgcc1/DEBIAN/symbols doesn't match completely debian/libgcc1.symbols.sparc
--- dpkg-gensymbolsApyTYK	2008-05-17 10:05:36.000000000 +0000
+++ dpkg-gensymbolslI2rwx	2008-05-17 10:05:36.000000000 +0000
@@ -7,8 +7,8 @@
  GCC_4.0.0@GCC_4.0.0 1:4.1.1-21
  GCC_4.2.0@GCC_4.2.0 1:4.1.1-21
  GCC_4.3.0@GCC_4.3.0 1:4.3
- GCC_LDBL_3.0@GCC_LDBL_3.0 1:4.2.1-4
- GCC_LDBL_4.0.0@GCC_LDBL_4.0.0 1:4.2.1-4
+#MISSING: 1:4.3.0-5# GCC_LDBL_3.0@GCC_LDBL_3.0 1:4.2.1-4
+#MISSING: 1:4.3.0-5# GCC_LDBL_4.0.0@GCC_LDBL_4.0.0 1:4.2.1-4
  GLIBC_2.0@GLIBC_2.0 1:4.1.1-21
  _Unwind_Backtrace@GCC_3.3 1:4.1.1-21
  _Unwind_DeleteException@GCC_3.0 1:4.1.1-21
@@ -48,7 +48,8 @@
  __divdc3@GCC_4.0.0 1:4.1.1-21
  __divdi3@GLIBC_2.0 1:4.1.1-21
  __divsc3@GCC_4.0.0 1:4.1.1-21
- __divtc3@GCC_LDBL_4.0.0 1:4.2.1-4
+ __divtc3@GCC_4.0.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __divtc3@GCC_LDBL_4.0.0 1:4.2.1-4
  __emutls_get_address@GCC_4.3.0 1:4.3
  __emutls_register_common@GCC_4.3.0 1:4.3
  __enable_execute_stack@GCC_3.4.2 1:4.1.1-21
@@ -56,15 +57,18 @@
  __ffssi2@GCC_4.3.0 1:4.3
  __fixdfdi@GCC_3.0 1:4.1.1-21
  __fixsfdi@GCC_3.0 1:4.1.1-21
- __fixtfdi@GCC_LDBL_3.0 1:4.2.1-4
+ __fixtfdi@GCC_3.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __fixtfdi@GCC_LDBL_3.0 1:4.2.1-4
  __fixunsdfdi@GCC_3.0 1:4.1.1-21
  __fixunsdfsi@GCC_3.0 1:4.1.1-21
  __fixunssfdi@GCC_3.0 1:4.1.1-21
  __fixunssfsi@GCC_3.0 1:4.1.1-21
- __fixunstfdi@GCC_LDBL_3.0 1:4.2.1-4
+ __fixunstfdi@GCC_3.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __fixunstfdi@GCC_LDBL_3.0 1:4.2.1-4
  __floatdidf@GCC_3.0 1:4.1.1-21
  __floatdisf@GCC_3.0 1:4.1.1-21
- __floatditf@GCC_LDBL_3.0 1:4.2.1-4
+ __floatditf@GCC_3.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __floatditf@GCC_LDBL_3.0 1:4.2.1-4
  __floatundidf@GCC_4.2.0 1:4.2.1-4
  __floatundisf@GCC_4.2.0 1:4.2.1-4
  __floatunditf@GCC_4.2.0 1:4.2.1-4
@@ -75,7 +79,8 @@
  __muldc3@GCC_4.0.0 1:4.1.1-21
  __muldi3@GCC_3.0 1:4.1.1-21
  __mulsc3@GCC_4.0.0 1:4.1.1-21
- __multc3@GCC_LDBL_4.0.0 1:4.2.1-4
+ __multc3@GCC_4.0.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __multc3@GCC_LDBL_4.0.0 1:4.2.1-4
  __mulvdi3@GCC_3.0 1:4.1.1-21
  __mulvsi3@GCC_3.0 1:4.1.1-21
  __negdi2@GCC_3.0 1:4.1.1-21
@@ -87,7 +92,8 @@
  __popcountsi2@GCC_3.4 1:4.1.1-21
  __powidf2@GCC_4.0.0 1:4.1.1-21
  __powisf2@GCC_4.0.0 1:4.1.1-21
- __powitf2@GCC_LDBL_4.0.0 1:4.2.1-4
+ __powitf2@GCC_4.0.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __powitf2@GCC_LDBL_4.0.0 1:4.2.1-4
  __register_frame@GLIBC_2.0 1:4.1.1-21
  __register_frame_info@GLIBC_2.0 1:4.1.1-21
  __register_frame_info_bases@GCC_3.0 1:4.1.1-21

dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: some symbols disappeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/lib64gcc1/DEBIAN/symbols doesn't match completely debian/lib64gcc1.symbols.sparc
--- dpkg-gensymbolsJ0wnU5	2008-05-17 10:05:56.000000000 +0000
+++ dpkg-gensymbolsArcwkV	2008-05-17 10:05:56.000000000 +0000
@@ -8,7 +8,8 @@
  GCC_4.0.0@GCC_4.0.0 1:4.1.1-21
  GCC_4.2.0@GCC_4.2.0 1:4.1.1-21
  GCC_4.3.0@GCC_4.3.0 1:4.3
- GLIBC_2.2@GLIBC_2.2 1:4.1.1-21
+ GLIBC_2.0@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# GLIBC_2.2@GLIBC_2.2 1:4.1.1-21
  _Unwind_Backtrace@GCC_3.3 1:4.1.1-21
  _Unwind_DeleteException@GCC_3.0 1:4.1.1-21
  _Unwind_FindEnclosingFunction@GCC_3.3 1:4.1.1-21
@@ -43,8 +44,10 @@
  __cmpti2@GCC_3.0 1:4.1.1-21
  __ctzdi2@GCC_3.4 1:4.1.1-21
  __ctzti2@GCC_3.4 1:4.1.1-21
- __deregister_frame@GLIBC_2.2 1:4.1.1-21
- __deregister_frame_info@GLIBC_2.2 1:4.1.1-21
+ __deregister_frame@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __deregister_frame@GLIBC_2.2 1:4.1.1-21
+ __deregister_frame_info@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __deregister_frame_info@GLIBC_2.2 1:4.1.1-21
  __deregister_frame_info_bases@GCC_3.0 1:4.1.1-21
  __divdc3@GCC_4.0.0 1:4.1.1-21
  __divsc3@GCC_4.0.0 1:4.1.1-21
@@ -69,7 +72,8 @@
  __floatuntidf@GCC_4.2.0 1:4.2.1-4
  __floatuntisf@GCC_4.2.0 1:4.2.1-4
  __floatuntitf@GCC_4.2.0 1:4.2.1-4
- __frame_state_for@GLIBC_2.2 1:4.1.1-21
+ __frame_state_for@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __frame_state_for@GLIBC_2.2 1:4.1.1-21
  __gcc_personality_v0@GCC_3.3.1 1:4.1.1-21
  __lshrti3@GCC_3.0 1:4.1.1-21
  __modti3@GCC_3.0 1:4.1.1-21
@@ -91,12 +95,16 @@
  __powidf2@GCC_4.0.0 1:4.1.1-21
  __powisf2@GCC_4.0.0 1:4.1.1-21
  __powitf2@GCC_4.0.0 1:4.1.1-21
- __register_frame@GLIBC_2.2 1:4.1.1-21
- __register_frame_info@GLIBC_2.2 1:4.1.1-21
+ __register_frame@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __register_frame@GLIBC_2.2 1:4.1.1-21
+ __register_frame_info@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __register_frame_info@GLIBC_2.2 1:4.1.1-21
  __register_frame_info_bases@GCC_3.0 1:4.1.1-21
- __register_frame_info_table@GLIBC_2.2 1:4.1.1-21
+ __register_frame_info_table@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __register_frame_info_table@GLIBC_2.2 1:4.1.1-21
  __register_frame_info_table_bases@GCC_3.0 1:4.1.1-21
- __register_frame_table@GLIBC_2.2 1:4.1.1-21
+ __register_frame_table@GLIBC_2.0 1:4.3.0-5
+#MISSING: 1:4.3.0-5# __register_frame_table@GLIBC_2.2 1:4.1.1-21
  __subvdi3@GCC_3.0 1:4.1.1-21
  __subvsi3@GCC_3.0 1:4.1.1-21
  __subvti3@GCC_3.4.4 1:4.1.1-21

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations.
  2008-05-18 13:20 ` Matthias Klose
@ 2008-05-19  8:17   ` David Miller
  2008-05-19 22:23   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2008-05-19  8:17 UTC (permalink / raw)
  To: doko; +Cc: gcc-patches, jakub, tcallawa, debian-gcc

From: Matthias Klose <doko@cs.tu-berlin.de>
Date: Sun, 18 May 2008 13:33:23 +0200

> Building GCC-4.3 with this patch (compared to the patch previously
> used by debian [1]), I get differing symbol versions for the Debian build
> on sparc in libgcc1. Both builds are configured --with-long-double-128.
> 
> The 32bit version has symbols where the symbol version did change from
> GCC_LDBL_4.0.0 to GCC_4.0.0, the 64bit version some symbols version
> did change from GLIBC_2.2 to GLIBC_2.0.

Thanks for this report, I'll take a look at it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations.
  2008-05-18 13:20 ` Matthias Klose
  2008-05-19  8:17   ` David Miller
@ 2008-05-19 22:23   ` David Miller
  2008-05-21 10:44     ` Matthias Klose
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2008-05-19 22:23 UTC (permalink / raw)
  To: doko; +Cc: gcc-patches, jakub, tcallawa, debian-gcc

From: Matthias Klose <doko@cs.tu-berlin.de>
Date: Sun, 18 May 2008 13:33:23 +0200

> Building GCC-4.3 with this patch (compared to the patch previously
> used by debian [1]), I get differing symbol versions for the Debian build
> on sparc in libgcc1. Both builds are configured --with-long-double-128.
> 
> The 32bit version has symbols where the symbol version did change from
> GCC_LDBL_4.0.0 to GCC_4.0.0, the 64bit version some symbols version
> did change from GLIBC_2.2 to GLIBC_2.0.

Thanks again for your report, the following patch should fix it:

2008-05-19  David S. Miller  <davem@davemloft.net>

	* config.gcc (sparc-*-linux*): Always include sparc/t-linux in
	tmake_file.

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 04b46c3..9ac898f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2356,13 +2356,14 @@ sparc-*-elf*)
 sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
+	tmake_file="${tmake_file} sparc/t-linux"
 	if test x$enable_targets = xall; then
 		tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
-		tmake_file="${tmake_file} sparc/t-linux64 sparc/t-crtfm"
+		tmake_file="${tmake_file} sparc/t-linux64"
 	else
 		tm_file="${tm_file} sparc/linux.h"
-		tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
 	fi
+	tmake_file="${tmake_file} sparc/t-crtfm"
 	;;
 sparc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations.
  2008-05-19 22:23   ` David Miller
@ 2008-05-21 10:44     ` Matthias Klose
  2008-05-21 10:54       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2008-05-21 10:44 UTC (permalink / raw)
  To: David Miller; +Cc: gcc-patches, jakub, tcallawa, debian-gcc

David Miller writes:
> From: Matthias Klose <doko@cs.tu-berlin.de>
> Date: Sun, 18 May 2008 13:33:23 +0200
> 
> > Building GCC-4.3 with this patch (compared to the patch previously
> > used by debian [1]), I get differing symbol versions for the Debian build
> > on sparc in libgcc1. Both builds are configured --with-long-double-128.
> > 
> > The 32bit version has symbols where the symbol version did change from
> > GCC_LDBL_4.0.0 to GCC_4.0.0, the 64bit version some symbols version
> > did change from GLIBC_2.2 to GLIBC_2.0.
> 
> Thanks again for your report, the following patch should fix it:

thanks for the update, tested with the 4.3 branch 20080509 with no
regressions. could this patch be considered for the 4.3 branch as
well?

  Matthias

gcc/

2008-05-19  David S. Miller  <davem@davemloft.net>

	* config.gcc (sparc*-*-*): Always set need_64bit_hwint to yes.
	(sparc*-*-linux*): Use linux.h in tm_file.
	(sparc-*-linux*): If 'enabled_targets' is 'all', build a bi-arch
	compiler defaulting to 32-bit. Always include sparc/t-linux in
	tmake_file.
	(sparc*-*-*): Remove explicit target settings of need_64bit_hwint,
	no longer needed.
	* config/sparc/linux.h: Remove definitions now obtained
	properly from linux.h
	* config/sparc/linux64.h: Likewise.
	(ASM_CPU_DEFAULT_SPEC): Change this to ASM_CPU64_DEFAULT_SPEC, we
	don't want this setting for 32-bit builds in a biarch compiler.
	* doc/install.texi: Add sparc-linux to list of targets
	supporting --enable-targets=all.

libcpp/

2008-05-20  David S. Miller  <davem@davemloft.net>

	* configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
	* configure: Regenerate.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 135673)
+++ gcc/config.gcc	(working copy)
@@ -354,13 +354,10 @@
 score*-*-*)
 	cpu_type=score
 	;;
-sparc64*-*-*)
+sparc*-*-*)
 	cpu_type=sparc
 	need_64bit_hwint=yes
 	;;
-sparc*-*-*)
-	cpu_type=sparc
-	;;
 spu*-*-*)
 	cpu_type=spu
 	need_64bit_hwint=yes
@@ -2336,9 +2333,16 @@
 	use_fixproto=yes
 	;;
 sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
-	tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
+	tmake_file="${tmake_file} sparc/t-linux"
+	if test x$enable_targets = xall; then
+		tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
+		tmake_file="${tmake_file} sparc/t-linux64"
+	else
+		tm_file="${tm_file} sparc/linux.h"
+	fi
+	tmake_file="${tmake_file} sparc/t-crtfm"
 	;;
 sparc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
@@ -2375,7 +2379,6 @@
 	  "":yes:* | yes:yes:* ) thread_file=posix ;;
 	  "":*:yes | yes:*:yes ) thread_file=solaris ;;
 	esac
-	need_64bit_hwint=yes
 	;;
 sparc-*-solaris2*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
@@ -2416,7 +2419,6 @@
 		fi
 		tm_file="${tm_file} tm-dwarf2.h"
 		tmake_file="$tmake_file sparc/t-sol2-64"
-		need_64bit_hwint=yes
 		test x$with_cpu != x || with_cpu=v9
 		;;
 	esac
@@ -2467,10 +2469,9 @@
 		x) with_cpu=ultrasparc ;;
 		*) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
 	esac
-	need_64bit_hwint=yes
 	;;
 sparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
-	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
+	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h sparc/linux64.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
 	;;
Index: gcc/config/sparc/linux.h
===================================================================
--- gcc/config/sparc/linux.h	(revision 135673)
+++ gcc/config/sparc/linux.h	(working copy)
@@ -22,39 +22,12 @@
 #define TARGET_OS_CPP_BUILTINS()		\
   do						\
     {						\
-      builtin_define_std ("unix");		\
-      builtin_define_std ("linux");		\
-      builtin_define ("__gnu_linux__");		\
-      builtin_assert ("system=linux");		\
-      builtin_assert ("system=unix");		\
-      builtin_assert ("system=posix");		\
+      LINUX_TARGET_OS_CPP_BUILTINS();		\
       if (TARGET_LONG_DOUBLE_128)       	\
 	builtin_define ("__LONG_DOUBLE_128__");	\
     }						\
   while (0)
 
-/* Don't assume anything about the header files.  */
-#define NO_IMPLICIT_EXTERN_C
-
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
-/* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
-   the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-   provides part of the support for getting C++ file-scope static
-   object constructed before entering `main'.  */
-   
-#undef  STARTFILE_SPEC
-#if defined HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-#endif
-
 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
    the GNU/Linux magical crtend.o file (see crtstuff.c) which
    provides part of the support for getting C++ file-scope static
@@ -63,8 +36,8 @@
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC \
-  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
-   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
+   %{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
 
 /* This is for -profile to use -lc_p instead of -lc.  */
 #undef	CC1_SPEC
@@ -75,10 +48,6 @@
 %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 "
 
-/* The GNU C++ standard library requires that these macros be defined.  */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc GNU/Linux with ELF)");
 
@@ -98,12 +67,6 @@
 #define CPP_SUBTARGET_SPEC \
 "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
 
-#undef LIB_SPEC
-#define LIB_SPEC \
-  "%{pthread:-lpthread} \
-   %{shared:-lc} \
-   %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
-
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
@@ -121,16 +84,7 @@
 /* If ELF is the default format, we should not use /lib/elf.  */
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-#if UCLIBC_DEFAULT
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
-#else
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
-#endif
-#define LINUX_DYNAMIC_LINKER \
-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
 
-
 #undef  LINK_SPEC
 #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
   %{!mno-relax:%{!r:-relax}} \
@@ -191,10 +145,6 @@
 
 #undef DITF_CONVERSION_LIBFUNCS
 #define DITF_CONVERSION_LIBFUNCS 1
-
-#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-#endif
 \f
 #ifdef HAVE_AS_TLS
 #undef TARGET_SUN_TLS
@@ -203,31 +153,10 @@
 #define TARGET_GNU_TLS 1
 #endif
 \f
-/* Don't be different from other Linux platforms in this regard.  */
-#define HANDLE_PRAGMA_PACK_PUSH_POP
-
 /* We use GNU ld so undefine this so that attribute((init_priority)) works.  */
 #undef CTORS_SECTION_ASM_OP
 #undef DTORS_SECTION_ASM_OP
 
-/* Determine whether the entire c99 runtime is present in the
-   runtime library.  */
-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
-
-/* Whether we have sincos that follows the GNU extension.  */
-#define TARGET_HAS_SINCOS (OPTION_GLIBC)
-
-#define TARGET_POSIX_IO
-
-#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-
-/* Use --as-needed -lgcc_s for eh support.  */
-#ifdef HAVE_LD_AS_NEEDED
-#define USE_LD_AS_NEEDED 1
-#endif
-
 #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h"
 
 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to
Index: gcc/config/sparc/linux64.h
===================================================================
--- gcc/config/sparc/linux64.h	(revision 135673)
+++ gcc/config/sparc/linux64.h	(working copy)
@@ -19,27 +19,18 @@
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#define TARGET_OS_CPP_BUILTINS()			\
-  do							\
-    {							\
-      builtin_define_std ("unix");			\
-      builtin_define_std ("linux");			\
-      builtin_define ("_LONGLONG");			\
-      builtin_define ("__gnu_linux__");			\
-      builtin_assert ("system=linux");			\
-      builtin_assert ("system=unix");			\
-      builtin_assert ("system=posix");			\
-      if (TARGET_ARCH32 && TARGET_LONG_DOUBLE_128)	\
-	builtin_define ("__LONG_DOUBLE_128__");		\
-    }							\
+#define TARGET_OS_CPP_BUILTINS()		\
+  do						\
+    {						\
+      LINUX_TARGET_OS_CPP_BUILTINS();		\
+      if (TARGET_ARCH64)			\
+        builtin_define ("_LONGLONG");		\
+      if (TARGET_ARCH32				\
+          && TARGET_LONG_DOUBLE_128)		\
+	builtin_define ("__LONG_DOUBLE_128__");	\
+    }						\
   while (0)
 
-/* Don't assume anything about the header files.  */
-#define NO_IMPLICIT_EXTERN_C
-
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
     || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
     || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 \
@@ -54,42 +45,22 @@
    + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
 #endif
 
-#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-Av9a"
+/* This must be v9a not just v9 because by default we enable
+   -mvis.  */
+#undef ASM_CPU64_DEFAULT_SPEC
+#define ASM_CPU64_DEFAULT_SPEC "-Av9a"
 
-/* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
-   the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
-   provides part of the support for getting C++ file-scope static
-   object constructed before entering `main'.  */
-   
-#undef  STARTFILE_SPEC
-
-#ifdef HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared:%{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbeginS.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared:%{pg|p:gcrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbeginS.o%s}"
-#endif
-
 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
    the GNU/Linux magical crtend.o file (see crtstuff.c) which
    provides part of the support for getting C++ file-scope static
    object constructed before entering `main', followed by a normal
    GNU/Linux "finalizer" file, `crtn.o'.  */
 
-#undef  ENDFILE_SPEC
-
+#undef	ENDFILE_SPEC
 #define ENDFILE_SPEC \
   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
    %{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
 
-/* The GNU C++ standard library requires that these macros be defined.  */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc64 GNU/Linux with ELF)");
 
@@ -122,12 +93,6 @@
 %{pthread:-D_REENTRANT} \
 "
 
-#undef LIB_SPEC
-#define LIB_SPEC \
-  "%{pthread:-lpthread} \
-   %{shared:-lc} \
-   %{!shared: %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
-
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
@@ -146,17 +111,6 @@
 
 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-#if UCLIBC_DEFAULT
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
-#else
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
-#endif
-#define LINUX_DYNAMIC_LINKER32 \
-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-#define LINUX_DYNAMIC_LINKER64 \
-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
 
 #ifdef SPARC_BI_ARCH
 
@@ -203,7 +157,7 @@
 
 #undef	CC1_SPEC
 #if DEFAULT_ARCH32_P
-#define CC1_SPEC "\
+#define CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
 %{mcypress:-mcpu=cypress} \
 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
@@ -214,7 +168,7 @@
   %{!mno-vis:%{!mcpu=v9:-mvis}}} \
 "
 #else
-#define CC1_SPEC "\
+#define CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
 %{mcypress:-mcpu=cypress} \
 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
@@ -324,10 +278,6 @@
 
 #undef DITF_CONVERSION_LIBFUNCS
 #define DITF_CONVERSION_LIBFUNCS 1
-
-#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-#endif
 \f
 #ifdef HAVE_AS_TLS
 #undef TARGET_SUN_TLS
@@ -336,31 +286,10 @@
 #define TARGET_GNU_TLS 1
 #endif
 \f
-/* Don't be different from other Linux platforms in this regard.  */
-#define HANDLE_PRAGMA_PACK_PUSH_POP
-
 /* We use GNU ld so undefine this so that attribute((init_priority)) works.  */
 #undef CTORS_SECTION_ASM_OP
 #undef DTORS_SECTION_ASM_OP
 
-/* Determine whether the entire c99 runtime is present in the
-   runtime library.  */
-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
-
-/* Whether we have sincos that follows the GNU extension.  */
-#define TARGET_HAS_SINCOS (OPTION_GLIBC)
-
-#define TARGET_POSIX_IO
-
-#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-
-/* Use --as-needed -lgcc_s for eh support.  */
-#ifdef HAVE_LD_AS_NEEDED
-#define USE_LD_AS_NEEDED 1
-#endif
-
 #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h"
 
 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to
Index: libcpp/configure
===================================================================
--- libcpp/configure	(revision 135673)
+++ libcpp/configure	(working copy)
@@ -8308,9 +8308,7 @@
 	powerpc*-*-* | \
 	rs6000*-*-* | \
 	s390*-*-* | \
-	sparc64*-*-* | ultrasparc-*-freebsd* | \
-	sparcv9-*-solaris2* | \
-	sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
+	sparc*-*-* | \
 	spu-*-* | \
 	sh[123456789l]*-*-*)
 		need_64bit_hwint=yes ;;
Index: libcpp/configure.ac
===================================================================
--- libcpp/configure.ac	(revision 135673)
+++ libcpp/configure.ac	(working copy)
@@ -126,9 +126,7 @@
 	powerpc*-*-* | \
 	rs6000*-*-* | \
 	s390*-*-* | \
-	sparc64*-*-* | ultrasparc-*-freebsd* | \
-	sparcv9-*-solaris2* | \
-	sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
+	sparc*-*-* | \
 	spu-*-* | \
 	sh[123456789l]*-*-*)
 		need_64bit_hwint=yes ;;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations.
  2008-05-21 10:44     ` Matthias Klose
@ 2008-05-21 10:54       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-05-21 10:54 UTC (permalink / raw)
  To: doko; +Cc: gcc-patches, jakub, tcallawa, debian-gcc

From: Matthias Klose <doko@cs.tu-berlin.de>
Date: Wed, 21 May 2008 11:25:43 +0200

> thanks for the update, tested with the 4.3 branch 20080509 with no
> regressions.

Thanks for testing, I've checked the bug fix into mainline.

> could this patch be considered for the 4.3 branch as
> well?

I'm personally fine with it, but I think that's to be the decision of
the 4.3 release manager.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-05-21  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-04 11:26 [PATCH COMMITTED]: Consolidate Sparc/Linux-GNU configurations David Miller
2008-05-18 13:20 ` Matthias Klose
2008-05-19  8:17   ` David Miller
2008-05-19 22:23   ` David Miller
2008-05-21 10:44     ` Matthias Klose
2008-05-21 10:54       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).