gcc: Revive the no-sys-dirs patch
For now, we don't NATIVE_SYSTEM_HEADER_DIR because it breaks the build. However, it points to Glibc in the Nix store (not /usr/include) so it's kind of okay.
This commit is contained in:
@@ -64,6 +64,7 @@ let version = "4.8.3";
|
||||
patches = []
|
||||
++ optional enableParallelBuilding ./parallel-bconfig.patch
|
||||
++ optional (cross != null) ./libstdc++-target.patch
|
||||
++ optional noSysDirs ./no-sys-dirs.patch
|
||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||
# target libraries and tools.
|
||||
++ optional langAda ./gnat-cflags.patch
|
||||
|
||||
28
pkgs/development/compilers/gcc/4.8/no-sys-dirs.patch
Normal file
28
pkgs/development/compilers/gcc/4.8/no-sys-dirs.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
diff -ru -x '*~' gcc-4.8.3-orig/gcc/cppdefault.c gcc-4.8.3/gcc/cppdefault.c
|
||||
--- gcc-4.8.3-orig/gcc/cppdefault.c 2013-01-10 21:38:27.000000000 +0100
|
||||
+++ gcc-4.8.3/gcc/cppdefault.c 2014-08-18 16:20:32.893944536 +0200
|
||||
@@ -35,6 +35,8 @@
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+#undef LOCAL_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -ru -x '*~' gcc-4.8.3-orig/gcc/gcc.c gcc-4.8.3/gcc/gcc.c
|
||||
--- gcc-4.8.3-orig/gcc/gcc.c 2014-03-23 12:30:57.000000000 +0100
|
||||
+++ gcc-4.8.3/gcc/gcc.c 2014-08-18 13:19:32.689201690 +0200
|
||||
@@ -1162,10 +1162,10 @@
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 ""
|
||||
#endif
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 ""
|
||||
#endif
|
||||
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
||||
Reference in New Issue
Block a user