at v206 132 lines 5.7 kB view raw
1diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c 2--- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200 3+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200 4@@ -41,6 +41,10 @@ 5 # undef CROSS_INCLUDE_DIR 6 #endif 7 8+#undef LOCAL_INCLUDE_DIR 9+#undef SYSTEM_INCLUDE_DIR 10+#undef STANDARD_INCLUDE_DIR 11+ 12 const struct default_include cpp_include_defaults[] 13 #ifdef INCLUDE_DEFAULTS 14 = INCLUDE_DEFAULTS; 15diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c 16--- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100 17+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200 18@@ -1478,10 +1478,10 @@ 19 /* Default prefixes to attach to command names. */ 20 21 #ifndef STANDARD_STARTFILE_PREFIX_1 22-#define STANDARD_STARTFILE_PREFIX_1 "/lib/" 23+#define STANDARD_STARTFILE_PREFIX_1 "" 24 #endif 25 #ifndef STANDARD_STARTFILE_PREFIX_2 26-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" 27+#define STANDARD_STARTFILE_PREFIX_2 "" 28 #endif 29 30 #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ 31@@ -1515,8 +1515,8 @@ 32 /* For native compilers, these are well-known paths containing 33 components that may be provided by the system. For cross 34 compilers, these paths are not used. */ 35-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/"; 36-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/"; 37+static const char *const standard_exec_prefix_1 = "/no-such-path/"; 38+static const char *const standard_exec_prefix_2 = "/no-such-path/"; 39 static const char *md_exec_prefix = MD_EXEC_PREFIX; 40 static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; 41 static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; 42diff -ru gcc-4.3.1-orig/gcc/Makefile.in gcc-4.3.1/gcc/Makefile.in 43--- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200 44+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200 45@@ -378,7 +378,11 @@ 46 MD5_H = $(srcdir)/../include/md5.h 47 48 # Default native SYSTEM_HEADER_DIR, to be overridden by targets. 49-NATIVE_SYSTEM_HEADER_DIR = /usr/include 50+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent 51+# `fixinc' from fixing header files in /usr/include. However, 52+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set 53+# it to some dummy directory. 54+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY) 55 # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. 56 CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ 57 58@@ -3277,7 +3281,7 @@ 59 -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ 60 -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \ 61 -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ 62- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ 63+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \ 64 -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \ 65 -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ 66 -DPREFIX=\"$(prefix)/\" \ 67diff -ru gcc-4.3.1-orig/libgomp/configure gcc-4.3.1/libgomp/configure 68--- gcc-4.3.1-orig/libgomp/configure 2008-01-24 17:23:13.000000000 +0100 69+++ gcc-4.3.1/libgomp/configure 2008-06-26 11:23:49.000000000 +0200 70@@ -21493,6 +21493,11 @@ 71 # A language specific compiler. 72 CC=$lt_compiler 73 74+# Ugly hack to get libmudflap (and possibly other libraries) to build. 75+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag 76+# to Glibc gets lost. Here we forcibly add it to any invocation. 77+CC="\$CC $NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" 78+ 79 # Is the compiler the GNU compiler? 80 with_gcc=$GCC 81 82Only in gcc-4.3.1/libgomp: configure~ 83diff -ru gcc-4.3.1-orig/libmudflap/configure gcc-4.3.1/libmudflap/configure 84--- gcc-4.3.1-orig/libmudflap/configure 2008-01-24 17:30:08.000000000 +0100 85+++ gcc-4.3.1/libmudflap/configure 2008-06-26 11:23:11.000000000 +0200 86@@ -14229,6 +14229,11 @@ 87 # A language specific compiler. 88 CC=$lt_compiler 89 90+# Ugly hack to get libmudflap (and possibly other libraries) to build. 91+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag 92+# to Glibc gets lost. Here we forcibly add it to any invocation. 93+CC="\$CC $NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" 94+ 95 # Is the compiler the GNU compiler? 96 with_gcc=$GCC 97 98Only in gcc-4.3.1/libmudflap: configure~ 99diff -ru gcc-4.3.1-orig/libssp/configure gcc-4.3.1/libssp/configure 100--- gcc-4.3.1-orig/libssp/configure 2008-01-24 17:33:29.000000000 +0100 101+++ gcc-4.3.1/libssp/configure 2008-06-26 11:23:25.000000000 +0200 102@@ -12142,6 +12142,11 @@ 103 # A language specific compiler. 104 CC=$lt_compiler 105 106+# Ugly hack to get libmudflap (and possibly other libraries) to build. 107+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag 108+# to Glibc gets lost. Here we forcibly add it to any invocation. 109+CC="\$CC $NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" 110+ 111 # Is the compiler the GNU compiler? 112 with_gcc=$GCC 113 114Only in gcc-4.3.1/libssp: configure~ 115diff -ru gcc-4.3.1-orig/Makefile.in gcc-4.3.1/Makefile.in 116--- gcc-4.3.1-orig/Makefile.in 2007-12-13 10:30:49.000000000 +0100 117+++ gcc-4.3.1/Makefile.in 2008-06-25 17:48:23.000000000 +0200 118@@ -405,6 +405,14 @@ 119 @host_makefile_frag@ 120 ### 121 122+CFLAGS += $(NIX_EXTRA_CFLAGS) 123+CPPFLAGS_FOR_TARGET += $(NIX_EXTRA_CFLAGS_TARGET) 124+CXXFLAGS += $(NIX_EXTRA_CFLAGS) 125+LDFLAGS += $(NIX_EXTRA_LDFLAGS) 126+LDFLAGS_FOR_TARGET += $(NIX_EXTRA_LDFLAGS_TARGET) 127+BOOT_CFLAGS += $(NIX_EXTRA_CFLAGS) 128+BOOT_LDFLAGS += $(NIX_EXTRA_LDFLAGS) 129+ 130 # This is the list of directories that may be needed in RPATH_ENVVAR 131 # so that prorgams built for the target machine work. 132 TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)