Merged in changes from stdenv-updates on gcc-4.5 into gcc-4.6

svn path=/nixpkgs/trunk/; revision=26650
This commit is contained in:
Shea Levy 2011-04-01 03:17:55 +00:00
parent 9ec8f9aefb
commit 93d86b97f6
3 changed files with 19 additions and 11 deletions

View File

@ -36,11 +36,13 @@ do
file="gcc-${component}-${version}.tar.bz2"
url="${dir}/${file}"
path_and_hash="$(nix-prefetch-url "$url" 2>&1 | grep -E '^(hash|path) is')"
path="$(echo $path_and_hash | sed -e's/^.*path is \([^ ]\+\).*$/\1/g')"
hash="$(echo $path_and_hash | sed -e's/^.*hash is \([^ ]\+\).*$/\1/g')"
rm -f "${file}"
rm -f "${url}.sig"
wget "$url"
hash="$(nix-hash --flat --type sha256 "$file")"
path="$(nix-store --add-fixed sha256 "$file")"
rm -f "${file}" "${file}.sig"
wget "${url}.sig"
gpg --verify "${file}.sig" "${path}" || gpg2 --verify "${file}.sig" "${path}"
rm "${file}.sig"

View File

@ -46,8 +46,8 @@ if test "$noSysDirs" = "1"; then
export NIX_FIXINC_DUMMY=/usr/include
fi
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY $extraFlags"
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
EXTRA_FLAGS="$extraFlags"
for i in $extraLDFlags; do
@ -63,7 +63,7 @@ if test "$noSysDirs" = "1"; then
unset LIBRARY_PATH
unset CPATH
if test -z "$crossStageStatic"; then
EXTRA_TARGET_CFLAGS="-g0 -O2 -B${libcCross}/lib -idirafter ${libcCross}/include"
EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
fi
else
@ -89,8 +89,8 @@ if test "$noSysDirs" = "1"; then
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC_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"
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
EXTRA_TARGET_CFLAGS="$extraFlags"
for i in $extraLDFlags; do

View File

@ -26,6 +26,7 @@
, crossStageStatic ? true
, gnat ? null
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
}:
assert langTreelang -> bison != null && flex != null;
@ -355,7 +356,7 @@ stdenv.mkDerivation ({
EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null
then "-g0 -O2 -idirafter ${libcCross}/include"
then "-idirafter ${libcCross}/include"
else null;
EXTRA_TARGET_LDFLAGS =
@ -373,7 +374,8 @@ stdenv.mkDerivation ({
meta = {
homepage = http://gcc.gnu.org/;
license = "GPLv3+"; # runtime support libraries are typically LGPLv3+
description = "GNU Compiler Collection, version ${version}";
description = "GNU Compiler Collection, version ${version}"
+ (if stripped then "" else " (with debugging info)");
longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++,
@ -402,6 +404,10 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# GCC 4.6.0 DOES support the `install-strip' target, but we'll let`stdenv' do
# the stripping by default to match stdenv-updates, for now
// optionalAttrs (!stripped) { dontStrip = true; NIX_STRIP_DEBUG = false; }
// optionalAttrs langVhdl rec {
name = "ghdl-0.29";