Improving the crossStripping. A cross-glibc gets broken if stripped by the
native strip. So we now distinguish dontStrip and dontCrossStrip. I updated the expressions for glibc-2.9 and glibc-2.11 accordingly. I could get rid of the cross-glibc depending on the cross-gcc-stage-static. Enabling nls in the final cross-gcc. I still have problems on wint_t/wchar_t not working on cross build. Gettext does not build. svn path=/nixpkgs/branches/stdenv-updates/; revision=18562
This commit is contained in:
parent
75b60caea0
commit
c6b526495b
@ -27,14 +27,17 @@ crossStripDirs() {
|
|||||||
|
|
||||||
if test -n "${dirs}"; then
|
if test -n "${dirs}"; then
|
||||||
header "stripping (with flags $stripFlags) in $dirs"
|
header "stripping (with flags $stripFlags) in $dirs"
|
||||||
|
# libc_nonshared.a should never be stripped, or builds will break.
|
||||||
find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} $crossConfig-strip $stripFlags || true
|
find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} $crossConfig-strip $stripFlags || true
|
||||||
stopNest
|
stopNest
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
crossStrip () {
|
crossStrip () {
|
||||||
|
# In cross_renaming we may rename dontCrossStrip to dontStrip, and
|
||||||
|
# dontStrip to dontNativeStrip.
|
||||||
# TODO: strip _only_ ELF executables, and return || fail here...
|
# TODO: strip _only_ ELF executables, and return || fail here...
|
||||||
if test -z "$dontStrip"; then
|
if test -z "$dontCrossStrip"; then
|
||||||
stripDebugList=${stripDebugList:-lib lib64 libexec bin sbin}
|
stripDebugList=${stripDebugList:-lib lib64 libexec bin sbin}
|
||||||
if test -n "$stripDebugList"; then
|
if test -n "$stripDebugList"; then
|
||||||
crossStripDirs "$stripDebugList" "${stripDebugFlags:--S}"
|
crossStripDirs "$stripDebugList" "${stripDebugFlags:--S}"
|
||||||
|
@ -39,7 +39,8 @@ let
|
|||||||
" --with-headers=${glibcCross}/include" +
|
" --with-headers=${glibcCross}/include" +
|
||||||
" --enable-__cxa_atexit" +
|
" --enable-__cxa_atexit" +
|
||||||
" --enable-long-long" +
|
" --enable-long-long" +
|
||||||
" --enable-threads=posix"
|
" --enable-threads=posix" +
|
||||||
|
" --enable-nls"
|
||||||
);
|
);
|
||||||
stageNameAddon = if (crossStageStatic) then "-stage-static" else
|
stageNameAddon = if (crossStageStatic) then "-stage-static" else
|
||||||
"-stage-final";
|
"-stage-final";
|
||||||
|
@ -44,6 +44,8 @@ EOF
|
|||||||
export CC="$crossConfig-gcc"
|
export CC="$crossConfig-gcc"
|
||||||
export AR="$crossConfig-ar"
|
export AR="$crossConfig-ar"
|
||||||
export RANLIB="$crossConfig-ranlib"
|
export RANLIB="$crossConfig-ranlib"
|
||||||
|
|
||||||
|
dontStrip = 1
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
else {}))
|
else {}))
|
||||||
|
@ -48,6 +48,9 @@ EOF
|
|||||||
export AR="${crossConfig}-ar"
|
export AR="${crossConfig}-ar"
|
||||||
export RANLIB="${crossConfig}-ranlib"
|
export RANLIB="${crossConfig}-ranlib"
|
||||||
configureFlags="${configureFlags} --cache-file=config.cache"
|
configureFlags="${configureFlags} --cache-file=config.cache"
|
||||||
|
|
||||||
|
# Disable the native stripping, because it breaks libc_nonshared.a
|
||||||
|
dontStrip=1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,14 +80,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildNativeInputs = stdenv.lib.optionals (cross != null) [ gccCross ];
|
buildNativeInputs = stdenv.lib.optionals (cross != null) [ gccCross ];
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = if (cross != null) then ''
|
||||||
ensureDir $out/lib
|
ensureDir $out/lib
|
||||||
ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
|
ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
|
||||||
'';
|
'' else "";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = if (cross != null) then ''
|
||||||
rm $out/lib/libgcc_s.so.1
|
rm $out/lib/libgcc_s.so.1
|
||||||
'';
|
'' else "";
|
||||||
|
|
||||||
# Workaround for this bug:
|
# Workaround for this bug:
|
||||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=411
|
# http://sourceware.org/bugzilla/show_bug.cgi?id=411
|
||||||
|
Loading…
x
Reference in New Issue
Block a user