Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/gcc4/gcc Reduce difference between src/tools/gcc an...



details:   https://anonhg.NetBSD.org/src/rev/f39e5acfda06
branches:  trunk
changeset: 764032:f39e5acfda06
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Apr 10 16:50:18 2011 +0000

description:
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.

diffstat:

 gnu/dist/gcc4/gcc/config/netbsd.h |  32 ++++++++++++++++++++------------
 gnu/dist/gcc4/gcc/gcc.c           |   4 ++--
 2 files changed, 22 insertions(+), 14 deletions(-)

diffs (86 lines):

diff -r 4bd3dd6f5112 -r f39e5acfda06 gnu/dist/gcc4/gcc/config/netbsd.h
--- a/gnu/dist/gcc4/gcc/config/netbsd.h Sun Apr 10 16:48:51 2011 +0000
+++ b/gnu/dist/gcc4/gcc/config/netbsd.h Sun Apr 10 16:50:18 2011 +0000
@@ -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 */
 
 
diff -r 4bd3dd6f5112 -r f39e5acfda06 gnu/dist/gcc4/gcc/gcc.c
--- a/gnu/dist/gcc4/gcc/gcc.c   Sun Apr 10 16:48:51 2011 +0000
+++ b/gnu/dist/gcc4/gcc/gcc.c   Sun Apr 10 16:50:18 2011 +0000
@@ -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",



Home | Main Index | Thread Index | Old Index