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]
Other format: [Raw text]

[csl-sol210-3_4-branch] Solaris 10 refinements


This patch to csl-sol210-3_4-branch refines some aspects of the AMD64 
Solaris 10 port:

* The 64-bit multilib directory should be called amd64 rather than 64 (on 
Solaris 10, 64 is a symlink to amd64, and calling the directory 64 
directly clobbers that symlink on installation).

* -momit-leaf-frame-pointer should only apply at -O1 and above, for better 
debuggability of -O0 binaries.

* A -R option is added so libstdc++ can be found at runtime; this patch 
implements a customer requirement and is not proposed for mainline as such 
a feature has been rejected for mainline in the past.

Bootstrapped with no regressions on i386-pc-solaris2.10.  Applied to 
csl-sol210-3_4-branch.  The first two parts will also be proposed in due 
course for mainline once the basic patch 
<http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01285.html> adding the port 
has been reviewed (as will miscellaneous other patches from the branches 
that improve the port but aren't needed to get the basic port working).

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

Index: ChangeLog.csl
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/Attic/ChangeLog.csl,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 ChangeLog.csl
--- ChangeLog.csl	8 Nov 2004 07:29:20 -0000	1.1.2.11
+++ ChangeLog.csl	17 Nov 2004 15:31:28 -0000
@@ -1,3 +1,17 @@
+2004-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* gcc/cp/g++spec.c (lang_specific_driver): Add a -R option if
+	-lstdc++ is added.
+	* gcc/cp/Make-lang.in (g++spec.o): Define LIBDIR.
+	* gcc/config/i386/t-sol2-10 (MULTILIB_DIRNAMES,
+	MULTILIB_OSDIRNAMES): Use amd64 instead of 64.
+	* gcc/config/i386/i386.c (optimization_options): Use
+	SUBTARGET_OPTIMIZATION_OPTIONS.
+	* gcc/config/i386/sol2-10.h (SUBTARGET_OPTIMIZATION_OPTIONS):
+	Define.
+	(TARGET_SUBTARGET_DEFAULT): Don't include
+	MASK_OMIT_LEAF_FRAME_POINTER.
+
 2004-11-07  Mark Mitchell <mark@codesourcery.com>
 
 	* gcc/config/sparc/sol2.h (ASM_OUTPUT_CALL): Fix typo.
Index: gcc/config/i386/i386.c
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.635.2.15.2.1
diff -u -r1.635.2.15.2.1 i386.c
--- gcc/config/i386/i386.c	23 Sep 2004 07:27:09 -0000	1.635.2.15.2.1
+++ gcc/config/i386/i386.c	17 Nov 2004 13:09:03 -0000
@@ -1533,6 +1533,9 @@
     flag_omit_frame_pointer = 2;
   flag_pcc_struct_return = 2;
   flag_asynchronous_unwind_tables = 2;
+#ifdef SUBTARGET_OPTIMIZATION_OPTIONS
+  SUBTARGET_OPTIMIZATION_OPTIONS;
+#endif
 }
 
 /* Table of valid machine attributes.  */
Index: gcc/config/i386/sol2-10.h
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config/i386/Attic/sol2-10.h,v
retrieving revision 1.1.4.4
diff -u -r1.1.4.4 sol2-10.h
--- gcc/config/i386/sol2-10.h	13 Oct 2004 06:19:02 -0000	1.1.4.4
+++ gcc/config/i386/sol2-10.h	17 Nov 2004 13:12:02 -0000
@@ -51,8 +51,15 @@
 
 #undef TARGET_SUBTARGET_DEFAULT
 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP	\
-				  | MASK_FLOAT_RETURNS		\
-				  | MASK_OMIT_LEAF_FRAME_POINTER)
+				  | MASK_FLOAT_RETURNS)
+
+#define SUBTARGET_OPTIMIZATION_OPTIONS			\
+  do							\
+    {							\
+      if (optimize >= 1)				\
+	target_flags |= MASK_OMIT_LEAF_FRAME_POINTER;	\
+    }							\
+  while (0)
 
 #define MULTILIB_DEFAULTS { "m32" }
 
Index: gcc/config/i386/t-sol2-10
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config/i386/Attic/t-sol2-10,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 t-sol2-10
--- gcc/config/i386/t-sol2-10	23 Sep 2004 07:27:10 -0000	1.1.4.1
+++ gcc/config/i386/t-sol2-10	17 Nov 2004 13:07:28 -0000
@@ -1,6 +1,6 @@
 MULTILIB_OPTIONS = m32/m64
-MULTILIB_DIRNAMES = 32 64
-MULTILIB_OSDIRNAMES = . 64
+MULTILIB_DIRNAMES = 32 amd64
+MULTILIB_OSDIRNAMES = . amd64
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
Index: gcc/cp/Make-lang.in
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/cp/Make-lang.in,v
retrieving revision 1.174.2.4.2.1
diff -u -r1.174.2.4.2.1 Make-lang.in
--- gcc/cp/Make-lang.in	23 Sep 2004 07:27:12 -0000	1.174.2.4.2.1
+++ gcc/cp/Make-lang.in	17 Nov 2004 15:26:58 -0000
@@ -56,7 +56,7 @@
 	(SHLIB_LINK='$(SHLIB_LINK)' \
 	SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
-		$(INCLUDES) $(srcdir)/cp/g++spec.c)
+		-DLIBDIR=\"$(libdir)\" $(INCLUDES) $(srcdir)/cp/g++spec.c)
 
 # Create the compiler driver for g++.
 GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o 
Index: gcc/cp/g++spec.c
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/cp/g++spec.c,v
retrieving revision 1.41.16.1
diff -u -r1.41.16.1 g++spec.c
--- gcc/cp/g++spec.c	9 Nov 2004 01:50:32 -0000	1.41.16.1
+++ gcc/cp/g++spec.c	17 Nov 2004 15:25:37 -0000
@@ -58,6 +58,9 @@
   /* If nonzero, the user gave us the `-v' flag.  */
   int saw_verbose_flag = 0;
 
+  /* If nonzero, the user gave us the '-m64' flag.  */
+  int saw_m64_flag = 0;
+
   /* This is a tristate:
      -1 means we should not link in libstdc++
      0  means we should link in libstdc++ if it is needed
@@ -189,6 +192,10 @@
 	    shared_libgcc = 0;
 	  else if (DEFAULT_WORD_SWITCH_TAKES_ARG (&argv[i][1]))
 	    i++;
+	  else if (strcmp (argv[i], "-m64") == 0)
+	    saw_m64_flag = 1;
+	  else if (strcmp (argv[i], "-m32") == 0)
+	    saw_m64_flag = 0;
 	  else
 	    /* Pass other options through.  */
 	    continue;
@@ -245,7 +252,7 @@
 #endif
 
   /* Make sure to have room for the trailing NULL argument.  */
-  num_args = argc + added + need_math + shared_libgcc + (library > 0) + 1;
+  num_args = argc + added + need_math + shared_libgcc + 2 * (library > 0) + 1;
   arglist = xmalloc (num_args * sizeof (char *));
 
   i = 0;
@@ -303,6 +310,9 @@
   /* Add `-lstdc++' if we haven't already done so.  */
   if (library > 0)
     {
+      arglist[j++] = saw_m64_flag
+	? "-R" LIBDIR "/amd64"
+	: "-R" LIBDIR;
       arglist[j++] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX;
       added_libraries++;
     }


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