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:
parent
6dc5db3850
commit
a0c60b76ec
@ -77,7 +77,6 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
|
|||||||
n=$((n + 1))
|
n=$((n + 1))
|
||||||
done
|
done
|
||||||
params=("${rest[@]}")
|
params=("${rest[@]}")
|
||||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE --sysroot=/var/empty"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,9 +32,6 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \
|
|||||||
# We cannot skip this; barf.
|
# We cannot skip this; barf.
|
||||||
echo "impure path \`$p' used in link" >&2
|
echo "impure path \`$p' used in link" >&2
|
||||||
exit 1
|
exit 1
|
||||||
elif test "${p:0:9}" = "--sysroot"; then
|
|
||||||
# Our ld is not built with sysroot support (Can we fix that?)
|
|
||||||
:
|
|
||||||
else
|
else
|
||||||
rest=("${rest[@]}" "$p")
|
rest=("${rest[@]}" "$p")
|
||||||
fi
|
fi
|
||||||
|
@ -64,6 +64,7 @@ let version = "4.8.3";
|
|||||||
patches = []
|
patches = []
|
||||||
++ optional enableParallelBuilding ./parallel-bconfig.patch
|
++ optional enableParallelBuilding ./parallel-bconfig.patch
|
||||||
++ optional (cross != null) ./libstdc++-target.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
|
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||||
# target libraries and tools.
|
# target libraries and tools.
|
||||||
++ optional langAda ./gnat-cflags.patch
|
++ 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. */
|
Loading…
x
Reference in New Issue
Block a user