Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet this change is also compatible with Linux.
This commit is contained in:
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
||||
do
|
||||
wrapProgram $out/bin/$prog --set ALDORROOT $out \
|
||||
--prefix PATH : ${openjdk}/bin \
|
||||
--prefix PATH : ${stdenv.gcc}/bin ;
|
||||
--prefix PATH : ${stdenv.cc}/bin ;
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure =
|
||||
# Help libgc's configure.
|
||||
'' export CXXCPP="g++ -E"
|
||||
'' export CXXCPP="$CXX -E"
|
||||
'';
|
||||
|
||||
patchPhase = ''
|
||||
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
tar -C $out -xjf ${dist}
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
$out/bin/lisp
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, coq, ocaml, ocamlPackages, gcc }:
|
||||
{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "compcert-${version}";
|
||||
@@ -12,7 +12,10 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ coq ocaml ocamlPackages.menhir ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ " +
|
||||
|
||||
configurePhase = ''
|
||||
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
|
||||
./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
|
||||
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -10,12 +10,12 @@ let
|
||||
jss-ver = "jss-0.4";
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath
|
||||
[ stdenv.gcc.libc
|
||||
stdenv.gcc.gcc
|
||||
[ stdenv.cc.libc
|
||||
stdenv.cc.gcc
|
||||
gmp4
|
||||
ncurses
|
||||
zlib
|
||||
] + ":${stdenv.gcc.gcc}/lib64";
|
||||
] + ":${stdenv.cc.gcc}/lib64";
|
||||
|
||||
cryptol-bin =
|
||||
if stdenv.system == "i686-linux"
|
||||
@@ -94,12 +94,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Hack around lack of libtinfo in NixOS
|
||||
ln -s ${ncurses}/lib/libncursesw.so.5.9 $out/lib/libtinfo.so.5
|
||||
ln -s ${stdenv.gcc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
|
||||
ln -s ${stdenv.cc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
for x in bin/cryptol bin/edif2verilog bin/copy-iverilog bin/symbolic_netlist bin/jaig bin/vvp-galois bin/lss libexec/jss; do
|
||||
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$out/lib:${libPath}" $out/$x
|
||||
patchelf --shrink-rpath $out/$x
|
||||
done
|
||||
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
@@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ''
|
||||
find . -type f -executable -exec patchelf \
|
||||
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
'{}' \; || true
|
||||
find . -type f -exec patchelf \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
|
||||
--force-rpath \
|
||||
'{}' \; || true
|
||||
'';
|
||||
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
@@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ''
|
||||
find . -type f -executable -exec patchelf \
|
||||
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
'{}' \; || true
|
||||
find . -type f -exec patchelf \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
|
||||
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
|
||||
--force-rpath \
|
||||
'{}' \; || true
|
||||
'';
|
||||
|
||||
@@ -17,7 +17,7 @@ let
|
||||
buildInputs = [
|
||||
fpc gtk glib libXi inputproto
|
||||
libX11 xproto libXext xextproto pango atk
|
||||
stdenv.gcc makeWrapper gdk_pixbuf
|
||||
stdenv.cc makeWrapper gdk_pixbuf
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
|
||||
@@ -7,17 +7,17 @@ mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
|
||||
@@ -14,11 +14,11 @@ if test "$noSysDirs" = "1"; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers being
|
||||
# generated to make sure that they use our glibc.
|
||||
if test -e $NIX_GCC/nix-support/orig-glibc; then
|
||||
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
|
||||
if test -e $NIX_CC/nix-support/orig-glibc; then
|
||||
glibc=$(cat $NIX_CC/nix-support/orig-glibc)
|
||||
|
||||
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
|
||||
# source in $NIX_GCC/nix-support/add-flags, since that would
|
||||
# source in $NIX_CC/nix-support/add-flags, since that would
|
||||
# cause *this* GCC to be linked against the *previous* GCC.
|
||||
# Need some more modularity there.
|
||||
extraCFlags="-B$glibc/lib -isystem $glibc/include"
|
||||
|
||||
@@ -12,17 +12,17 @@ export CPP="gcc -E"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
|
||||
@@ -17,20 +17,20 @@ fi
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
@@ -61,27 +61,27 @@ if test "$noSysDirs" = "1"; then
|
||||
EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_GCC_CROSS"; then
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
|
||||
EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
|
||||
else
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_GCC_CROSS/nix-support/orig-libc
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
|
||||
|
||||
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
||||
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
|
||||
@@ -188,7 +188,7 @@ stdenv.mkDerivation ({
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
configureFlags = "
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
|
||||
@@ -23,20 +23,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
@@ -67,27 +67,27 @@ if test "$noSysDirs" = "1"; then
|
||||
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_GCC_CROSS"; then
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
else
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_GCC_CROSS/nix-support/orig-libc
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
|
||||
|
||||
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
||||
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
@@ -162,7 +162,7 @@ preConfigure() {
|
||||
# Patch the configure script so it finds glibc headers
|
||||
# It's important for example in order not to get libssp built, because it's
|
||||
# functionality is in glibc already.
|
||||
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
|
||||
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
|
||||
sed -i \
|
||||
-e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
|
||||
gcc/configure
|
||||
|
||||
@@ -185,11 +185,11 @@ stdenv.mkDerivation ({
|
||||
sed -i gcc/config/t-gnu \
|
||||
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
|
||||
''
|
||||
else if cross != null || stdenv.gcc.libc != null then
|
||||
else if cross != null || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
let
|
||||
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
|
||||
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
||||
in
|
||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||
@@ -272,7 +272,7 @@ stdenv.mkDerivation ({
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
dontStrip = true;
|
||||
configureFlags = ''
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
|
||||
@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
@@ -74,27 +74,27 @@ if test "$noSysDirs" = "1"; then
|
||||
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_GCC_CROSS"; then
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
else
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_GCC_CROSS/nix-support/orig-libc
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
|
||||
|
||||
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
||||
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
@@ -166,11 +166,11 @@ preConfigure() {
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
if test -f "$NIX_GCC/nix-support/orig-libc"; then
|
||||
if test -f "$NIX_CC/nix-support/orig-libc"; then
|
||||
# Patch the configure script so it finds glibc headers. It's
|
||||
# important for example in order not to get libssp built,
|
||||
# because its functionality is in glibc already.
|
||||
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
|
||||
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
|
||||
sed -i \
|
||||
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
|
||||
gcc/configure
|
||||
|
||||
@@ -229,11 +229,11 @@ stdenv.mkDerivation ({
|
||||
sed -i gcc/config/t-gnu \
|
||||
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
|
||||
''
|
||||
else if cross != null || stdenv.gcc.libc != null then
|
||||
else if cross != null || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
let
|
||||
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
|
||||
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
||||
in
|
||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||
@@ -339,7 +339,7 @@ stdenv.mkDerivation ({
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
dontStrip = true;
|
||||
configureFlags = ''
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
|
||||
@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
@@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
|
||||
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_GCC_CROSS"; then
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
@@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_GCC_CROSS/nix-support/orig-libc
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
|
||||
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
|
||||
glibc_libdir="$glibc_dir/lib"
|
||||
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
|
||||
|
||||
@@ -167,11 +167,11 @@ preConfigure() {
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
if test -f "$NIX_GCC/nix-support/orig-libc"; then
|
||||
if test -f "$NIX_CC/nix-support/orig-libc"; then
|
||||
# Patch the configure script so it finds glibc headers. It's
|
||||
# important for example in order not to get libssp built,
|
||||
# because its functionality is in glibc already.
|
||||
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
|
||||
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
|
||||
sed -i \
|
||||
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
|
||||
gcc/configure
|
||||
|
||||
@@ -251,11 +251,11 @@ stdenv.mkDerivation ({
|
||||
sed -i "${gnu_h}" \
|
||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||
''
|
||||
else if cross != null || stdenv.gcc.libc != null then
|
||||
else if cross != null || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
let
|
||||
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
|
||||
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
||||
in
|
||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||
@@ -397,7 +397,7 @@ stdenv.mkDerivation ({
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
dontStrip = true;
|
||||
configureFlags = ''
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
|
||||
@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
@@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
|
||||
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_GCC_CROSS"; then
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
|
||||
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
@@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_GCC_CROSS/nix-support/orig-libc
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
|
||||
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
|
||||
glibc_libdir="$glibc_dir/lib"
|
||||
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
|
||||
|
||||
@@ -171,11 +171,11 @@ preConfigure() {
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
if test -f "$NIX_GCC/nix-support/orig-libc"; then
|
||||
if test -f "$NIX_CC/nix-support/orig-libc"; then
|
||||
# Patch the configure script so it finds glibc headers. It's
|
||||
# important for example in order not to get libssp built,
|
||||
# because its functionality is in glibc already.
|
||||
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
|
||||
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
|
||||
sed -i \
|
||||
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
|
||||
gcc/configure
|
||||
|
||||
@@ -247,11 +247,11 @@ stdenv.mkDerivation ({
|
||||
sed -i "${gnu_h}" \
|
||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||
''
|
||||
else if cross != null || stdenv.gcc.libc != null then
|
||||
else if cross != null || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
let
|
||||
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
|
||||
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
||||
in
|
||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||
@@ -385,7 +385,7 @@ stdenv.mkDerivation ({
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
dontStrip = true;
|
||||
configureFlags = ''
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
|
||||
@@ -9,11 +9,11 @@ let
|
||||
in
|
||||
|
||||
(
|
||||
assert a.stdenv ? gcc ;
|
||||
assert a.stdenv.gcc ? gcc ;
|
||||
assert a.stdenv.gcc ? libc ;
|
||||
assert a.stdenv.gcc.gcc != null ;
|
||||
assert a.stdenv.gcc.libc != null ;
|
||||
assert a.stdenv ? cc ;
|
||||
assert a.stdenv.cc ? gcc ;
|
||||
assert a.stdenv.cc ? libc ;
|
||||
assert a.stdenv.cc.gcc != null ;
|
||||
assert a.stdenv.cc.libc != null ;
|
||||
|
||||
rec {
|
||||
src = a.fetchurl {
|
||||
@@ -37,7 +37,7 @@ rec {
|
||||
preBuild = a.fullDepEntry (''
|
||||
sed -re "s@/bin/cat@$(which cat)@g" -i configure */configure
|
||||
sed -re "s@if test -d /proc/self @if false @" -i configure
|
||||
sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.gcc.gcc}/include -I${a.stdenv.gcc.libc}/include ^g' -i makefile
|
||||
sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.cc.gcc}/include -I${a.stdenv.cc.libc}/include ^g' -i makefile
|
||||
'') ["minInit" "doUnpack" "addInputs"];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
|
||||
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags=[
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags=[
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags=[
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags=[
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags=[
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
preConfigure=[
|
||||
|
||||
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||
|
||||
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
|
||||
# find readline/gmp.
|
||||
postBuild = if stdenv.isLinux then "
|
||||
find . -type f -perm +100 \\
|
||||
-exec patchelf --interpreter \"$(cat $NIX_GCC/nix-support/dynamic-linker)\" \\
|
||||
-exec patchelf --interpreter \"$(cat $NIX_CC/nix-support/dynamic-linker)\" \\
|
||||
--set-rpath \"${readline}/lib:${ncurses}/lib:${gmp}/lib\" {} \\;
|
||||
" else "";
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
||||
|
||||
propagatedBuildInputs = [readline ncurses gmp];
|
||||
|
||||
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
|
||||
configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
|
||||
@@ -25,7 +25,7 @@ stdenv.mkDerivation (rec {
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-readline-libraries=${readline}/lib"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
preConfigure = "
|
||||
|
||||
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||
"--with-gmp-libraries=${gmp}/lib"
|
||||
"--with-gmp-includes=${gmp}/include"
|
||||
"--with-readline-libraries=${readline}/lib"
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags=[
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/gcc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
|
||||
'';
|
||||
|
||||
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
|
||||
configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
|
||||
|
||||
postInstall = ''
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
|
||||
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||
# find editline/gmp.
|
||||
(if stdenv.isLinux then ''
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
|
||||
];
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ stdenv.mkDerivation {
|
||||
cp -R * $out
|
||||
set +e
|
||||
for a in $out/bin/* ; do
|
||||
patchelf --interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) \
|
||||
--set-rpath $(cat $NIX_GCC/nix-support/orig-libc)/lib:$(cat $NIX_GCC/nix-support/orig-gcc)/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib $a
|
||||
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
--set-rpath $(cat $NIX_CC/nix-support/orig-libc)/lib:$(cat $NIX_CC/nix-support/orig-gcc)/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib $a
|
||||
done
|
||||
set -e
|
||||
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{ stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }:
|
||||
|
||||
assert stdenv.gcc.gcc != null;
|
||||
|
||||
let
|
||||
loader386 = "${glibc}/lib/ld-linux.so.2";
|
||||
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
||||
@@ -78,16 +76,16 @@ stdenv.mkDerivation {
|
||||
else throw "Unsupported system";
|
||||
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
CGO_ENABLED = 1;
|
||||
CGO_ENABLED = if stdenv.isDarwin then 0 else 1;
|
||||
|
||||
installPhase = ''
|
||||
export CC=cc
|
||||
|
||||
'' + stdenv.lib.optionalString (stdenv ? gcc) ''
|
||||
# http://lists.science.uu.nl/pipermail/nix-dev/2013-October/011891.html
|
||||
# Fix for "libgcc_s.so.1 must be installed for pthread_cancel to work"
|
||||
# during tests:
|
||||
export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib/libgcc_s.so))"
|
||||
|
||||
export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.gcc}/lib/libgcc_s.so))"
|
||||
'' + ''
|
||||
mkdir -p "$out/bin"
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ gmp, makeWrapper, gcc, runCommand, idris_plain, boehmgc}:
|
||||
{ stdenv, gmp, makeWrapper, runCommand, idris_plain, boehmgc}:
|
||||
|
||||
runCommand "idris-wrapper" {} ''
|
||||
source ${makeWrapper}/nix-support/setup-hook
|
||||
@@ -6,6 +6,6 @@ runCommand "idris-wrapper" {} ''
|
||||
ln -s ${idris_plain}/bin/idris $out/bin
|
||||
wrapProgram $out/bin/idris \
|
||||
--suffix NIX_CFLAGS_COMPILE : '"-I${gmp}/include -L${gmp}/lib -L${boehmgc}/lib"' \
|
||||
--suffix PATH : ${gcc}/bin \
|
||||
--suffix PATH : ${stdenv.cc}/bin \
|
||||
--suffix PATH : ${idris_plain}/bin
|
||||
''
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
, tcl, tk, xproto, libX11, git, mpfr
|
||||
} :
|
||||
let
|
||||
realGcc = stdenv.gcc.gcc;
|
||||
realGcc = stdenv.cc.gcc;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "julia";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
let
|
||||
version = "3.3";
|
||||
gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
|
||||
gccReal = if (stdenv.cc.gcc or null) == null then stdenv.cc else stdenv.cc.gcc;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@@ -11,15 +11,15 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ perl llvm groff cmake libxml2 python ];
|
||||
|
||||
patches = [ ./clang-tablegen-dir.patch ] ++
|
||||
stdenv.lib.optional (stdenv.gcc.libc != null) ./clang-purity.patch;
|
||||
stdenv.lib.optional (stdenv.cc.libc != null) ./clang-purity.patch;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DLLVM_TARGETS_TO_BUILD=all"
|
||||
"-DGCC_INSTALL_PREFIX=${gccReal}"
|
||||
] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [
|
||||
"-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
|
||||
] ++ stdenv.lib.optionals (stdenv.cc.libc != null) [
|
||||
"-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include/"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
|
||||
sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi";
|
||||
};
|
||||
|
||||
passthru = { gcc = stdenv.gcc.gcc; };
|
||||
passthru = { gcc = stdenv.cc.gcc; };
|
||||
|
||||
meta = {
|
||||
homepage = http://clang.llvm.org/;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
|
||||
|
||||
# be sure not to rebuild clang on darwin; some packages request it specifically
|
||||
# we need to fix those
|
||||
assert stdenv.isDarwin -> stdenv.gcc.nativeTools;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "clang-${version}";
|
||||
|
||||
@@ -28,8 +24,8 @@ stdenv.mkDerivation {
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
|
||||
] ++
|
||||
(stdenv.lib.optional (stdenv.gcc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include") ++
|
||||
(stdenv.lib.optional (stdenv.gcc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.gcc.gcc}");
|
||||
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include") ++
|
||||
(stdenv.lib.optional (stdenv.cc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.cc.gcc}");
|
||||
|
||||
# Clang expects to find LLVMgold in its own prefix
|
||||
# Clang expects to find sanitizer libraries in its own prefix
|
||||
@@ -38,7 +34,7 @@ stdenv.mkDerivation {
|
||||
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
|
||||
'';
|
||||
|
||||
passthru.gcc = stdenv.gcc.gcc;
|
||||
passthru.gcc = stdenv.cc.gcc;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ let
|
||||
tar --strip-components=1 -xjf "$src" -C "$out"
|
||||
|
||||
# Patch binaries
|
||||
interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
|
||||
interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
|
||||
for file in "$out"/bin/* "$out"/libexec/gcc/*/*/* "$out"/*/bin/*; do
|
||||
# Skip non-executable files
|
||||
case "$file" in
|
||||
|
||||
@@ -14,7 +14,7 @@ patchShebangs $out
|
||||
for f in $out/bin/*; do
|
||||
b=$(basename $f)
|
||||
if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then
|
||||
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath $libPath \
|
||||
$f
|
||||
continue;
|
||||
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
|
||||
mkdir -p "$out"
|
||||
tar --strip-components=1 -xjf "$src" -C "$out"
|
||||
|
||||
interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
|
||||
interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
|
||||
for a in "$out"/bin/*; do
|
||||
patchelf --set-interpreter "$interpreter" "$a"
|
||||
patchelf --set-rpath "$out/lib:${boehmgc}/lib" "$a"
|
||||
|
||||
@@ -5,7 +5,7 @@ unzip ${src} || true
|
||||
|
||||
# set the dynamic linker of unpack200, necessary for construct script
|
||||
echo "patching unpack200"
|
||||
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
|
||||
|
||||
echo "constructing JDK and JRE installations"
|
||||
if test -z "$installjdk"; then
|
||||
@@ -46,7 +46,7 @@ rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
|
||||
|
||||
# set all the dynamic linkers
|
||||
find $out -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
|
||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||
|
||||
@@ -143,7 +143,7 @@ let result = stdenv.mkDerivation rec {
|
||||
|
||||
# set all the dynamic linkers
|
||||
find $out -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
|
||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||
@@ -173,8 +173,8 @@ let result = stdenv.mkDerivation rec {
|
||||
* libXt is only needed on amd64
|
||||
*/
|
||||
libraries =
|
||||
[stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
|
||||
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
|
||||
[stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
|
||||
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.cc.gcc] else []);
|
||||
|
||||
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ stdenv.mkDerivation {
|
||||
* libXt is only needed on amd64
|
||||
*/
|
||||
libraries =
|
||||
[stdenv.gcc.libc] ++
|
||||
[stdenv.cc.libc] ++
|
||||
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
|
||||
|
||||
inherit swingSupport pluginSupport architecture jce;
|
||||
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
||||
|
||||
patchPhase = ''
|
||||
sed -i s,/usr/bin/ld,$(type -P ld), src/driver/phases.c
|
||||
sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in
|
||||
sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in
|
||||
'';
|
||||
|
||||
cmakeFlags = ''
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
|
||||
-DPATH64_ENABLE_PSCRUNTIME=OFF
|
||||
-DPATH64_ENABLE_PROFILING=OFF -DPATH64_ENABLE_TARGETS=x8664
|
||||
-DCMAKE_BUILD_TYPE=Debug -DPATH64_ENABLE_FORTRAN=OFF
|
||||
-DPSC_CRT_PATH=${stdenv.gcc.libc}/lib
|
||||
-DPSC_CRT_PATH=${stdenv.cc.libc}/lib
|
||||
'';
|
||||
|
||||
makeFlags = "-j4";
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{stdenv, fetchurl, which, file, perl, curl, python27, makeWrapper}:
|
||||
|
||||
assert stdenv.gcc.gcc != null;
|
||||
|
||||
/* Rust's build process has a few quirks :
|
||||
|
||||
- It requires some patched in llvm that haven't landed upstream, so it
|
||||
@@ -53,21 +51,22 @@ in stdenv.mkDerivation {
|
||||
mkdir -p "$out"
|
||||
cp -r bin "$out/bin"
|
||||
'' + (if stdenv.isLinux then ''
|
||||
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
|
||||
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \
|
||||
"$out/bin/rustc"
|
||||
'' else "");
|
||||
};
|
||||
|
||||
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ];
|
||||
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
|
||||
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
|
||||
|
||||
# The compiler requires cc, so we patch the source to tell it where to find it
|
||||
patches = [ ./hardcode_paths.patch ./local_stage0.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace src/librustc/back/link.rs \
|
||||
--subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
|
||||
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
|
||||
substituteInPlace src/librustc_back/archive.rs \
|
||||
--subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
|
||||
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
|
||||
'';
|
||||
|
||||
buildInputs = [ which file perl curl python27 makeWrapper ];
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
, tzdata, git, valgrind, procps, coreutils
|
||||
}:
|
||||
|
||||
assert stdenv.gcc.gcc != null;
|
||||
|
||||
/* Rust's build process has a few quirks :
|
||||
|
||||
- It requires some patched in llvm that haven't landed upstream, so it
|
||||
@@ -56,13 +54,14 @@ in stdenv.mkDerivation {
|
||||
mkdir -p "$out"
|
||||
cp -r bin "$out/bin"
|
||||
'' + (if stdenv.isLinux then ''
|
||||
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
|
||||
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \
|
||||
"$out/bin/rustc"
|
||||
'' else "");
|
||||
};
|
||||
|
||||
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ];
|
||||
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
|
||||
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
|
||||
|
||||
# The compiler requires cc, so we patch the source to tell it where to find it
|
||||
patches = [ ./hardcode_paths.HEAD.patch ./local_stage0.HEAD.patch ]
|
||||
@@ -70,9 +69,9 @@ in stdenv.mkDerivation {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/librustc_trans/back/link.rs \
|
||||
--subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
|
||||
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
|
||||
substituteInPlace src/librustc_back/archive.rs \
|
||||
--subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
|
||||
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
|
||||
|
||||
substituteInPlace src/rust-installer/gen-install-script.sh \
|
||||
--replace /bin/echo "${coreutils}/bin/echo"
|
||||
|
||||
@@ -47,6 +47,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
|
||||
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
|
||||
|
||||
# Use whatever `cc` the stdenv provides
|
||||
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
|
||||
@@ -50,6 +50,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
|
||||
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
|
||||
|
||||
# Use whatever `cc` the stdenv provides
|
||||
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=("--elfinterp=$(cat $NIX_GCC/nix-support/dynamic-linker)")
|
||||
configureFlagsArray+=("--elfinterp=$(cat $NIX_CC/nix-support/dynamic-linker)")
|
||||
configureFlagsArray+=("--crtprefix=${stdenv.glibc}/lib")
|
||||
configureFlagsArray+=("--sysincludepaths=${stdenv.glibc}/include:{B}/include")
|
||||
configureFlagsArray+=("--libpaths=${stdenv.glibc}/lib")
|
||||
|
||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "077yakksxvdjlmwgc9wlz9jnkr345sikqjchvmxyv0axga5bw4rj";
|
||||
};
|
||||
|
||||
buildInputs = [ stdenv.gcc file openssl mlton mysql postgresql sqlite ];
|
||||
buildInputs = [ stdenv.cc file openssl mlton mysql postgresql sqlite ];
|
||||
|
||||
prePatch = ''
|
||||
sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
export CC="${stdenv.gcc}/bin/gcc";
|
||||
export CC="${stdenv.cc}/bin/gcc";
|
||||
export CCARGS="-I$out/include \
|
||||
-L${mysql}/lib/mysql -L${postgresql}/lib -L${sqlite}/lib";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user