Module Name:    src
Committed By:   joerg
Date:           Sun Apr 10 16:50:18 UTC 2011

Modified Files:
        src/gnu/dist/gcc4/gcc: gcc.c
        src/gnu/dist/gcc4/gcc/config: netbsd.h

Log Message:
Reduce difference between src/tools/gcc and src/gnu/usr.bin/gcc4
configuration. All but the target to helper programs should be the same.
Mark include directories as sysroot-relative.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/gnu/dist/gcc4/gcc/gcc.c
cvs rdiff -u -r1.6 -r1.7 src/gnu/dist/gcc4/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/gcc.c
diff -u src/gnu/dist/gcc4/gcc/gcc.c:1.4 src/gnu/dist/gcc4/gcc/gcc.c:1.5
--- src/gnu/dist/gcc4/gcc/gcc.c:1.4	Thu Jan 11 06:59:53 2007
+++ src/gnu/dist/gcc4/gcc/gcc.c	Sun Apr 10 16:50:18 2011
@@ -6277,7 +6277,7 @@
 			      PREFIX_PRIORITY_LAST, 0, 1);
       else if (*cross_compile == '0')
 	{
-#ifndef NETBSD_NATIVE
+#if !defined(NETBSD_NATIVE) && !defined(NETBSD_TOOLS)
 	  if (gcc_exec_prefix)
 	    add_prefix (&startfile_prefixes,
 			concat (gcc_exec_prefix, machine_suffix,
@@ -6295,7 +6295,7 @@
 #endif /* NETBSD_NATIVE */
 	}
 
-#ifndef NETBSD_NATIVE
+#if !defined(NETBSD_NATIVE) && !defined(NETBSD_TOOLS)
       if (*standard_startfile_prefix_1)
  	add_sysrooted_prefix (&startfile_prefixes,
 			      standard_startfile_prefix_1, "BINUTILS",

Index: src/gnu/dist/gcc4/gcc/config/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/netbsd.h:1.6 src/gnu/dist/gcc4/gcc/config/netbsd.h:1.7
--- src/gnu/dist/gcc4/gcc/config/netbsd.h:1.6	Sun Apr 27 23:49:27 2008
+++ src/gnu/dist/gcc4/gcc/config/netbsd.h	Sun Apr 10 16:50:18 2011
@@ -43,9 +43,13 @@
 
 /* NETBSD_NATIVE is defined when gcc is integrated into the NetBSD
    source tree so it can be configured appropriately without using
-   the GNU configure/build mechanism.  */
+   the GNU configure/build mechanism.
 
-#ifdef NETBSD_NATIVE
+   NETBSD_TOOLS is defined when gcc is built as cross-compiler for
+   the in-tree toolchain.
+ */
+
+#if defined(NETBSD_NATIVE) || defined(NETBSD_TOOLS)
 
 /* Look for the include files in the system-defined places.  */
 
@@ -61,23 +65,28 @@
 #undef INCLUDE_DEFAULTS
 #define INCLUDE_DEFAULTS				\
   {							\
-    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },		\
-    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1 },	\
-    { GCC_INCLUDE_DIR, "GCC", 0, 0 },			\
+    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1 },		\
+    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1 },	\
+    { GCC_INCLUDE_DIR, "GCC", 0, 0, 1 },		\
     { 0, 0, 0, 0 }					\
   }
 
-/* Under NetBSD, the normal location of the compiler back ends is the
-   /usr/libexec directory.  */
-
-#undef STANDARD_EXEC_PREFIX
-#define STANDARD_EXEC_PREFIX		"/usr/libexec/"
-
 /* Under NetBSD, the normal location of the various *crt*.o files is the
    /usr/lib directory.  */
 
 #undef STANDARD_STARTFILE_PREFIX
 #define STANDARD_STARTFILE_PREFIX	"/usr/lib/"
+#undef STANDARD_STARTFILE_PREFIX_1
+#define STANDARD_STARTFILE_PREFIX_1	"/usr/lib/"
+
+#endif /* NETBSD_NATIVE || NETBSD_TOOLS */
+
+#if defined(NETBSD_NATIVE)
+/* Under NetBSD, the normal location of the compiler back ends is the
+   /usr/libexec directory.  */
+
+#undef STANDARD_EXEC_PREFIX
+#define STANDARD_EXEC_PREFIX		"/usr/libexec/"
 
 #undef TOOLDIR_BASE_PREFIX
 #define TOOLDIR_BASE_PREFIX		"/usr/"
@@ -87,7 +96,6 @@
 
 #undef STANDARD_LIBEXEC_PREFIX
 #define STANDARD_LIBEXEC_PREFIX		STANDARD_EXEC_PREFIX
-
 #endif /* NETBSD_NATIVE */
 
 

Reply via email to