make-bootstrap-tools-cross.nix: Strip extra whitespace
This commit is contained in:
parent
7a5b85cdda
commit
2d3d105b02
@ -5,7 +5,7 @@ let buildFor = toolsArch: (
|
|||||||
let
|
let
|
||||||
pkgsFun = import ../../..;
|
pkgsFun = import ../../..;
|
||||||
pkgsNoParams = pkgsFun {};
|
pkgsNoParams = pkgsFun {};
|
||||||
|
|
||||||
sheevaplugCrossSystem = {
|
sheevaplugCrossSystem = {
|
||||||
crossSystem = rec {
|
crossSystem = rec {
|
||||||
config = "armv5tel-unknown-linux-gnueabi";
|
config = "armv5tel-unknown-linux-gnueabi";
|
||||||
@ -18,10 +18,10 @@ let
|
|||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
raspberrypiCrossSystem = {
|
raspberrypiCrossSystem = {
|
||||||
crossSystem = rec {
|
crossSystem = rec {
|
||||||
config = "armv6l-unknown-linux-gnueabi";
|
config = "armv6l-unknown-linux-gnueabi";
|
||||||
bigEndian = false;
|
bigEndian = false;
|
||||||
arch = "arm";
|
arch = "arm";
|
||||||
float = "hard";
|
float = "hard";
|
||||||
@ -33,10 +33,10 @@ let
|
|||||||
inherit (platform) gcc;
|
inherit (platform) gcc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7l-hf-multiplatform-crossSystem = {
|
armv7l-hf-multiplatform-crossSystem = {
|
||||||
crossSystem = rec {
|
crossSystem = rec {
|
||||||
config = "armv7l-unknown-linux-gnueabi";
|
config = "armv7l-unknown-linux-gnueabi";
|
||||||
bigEndian = false;
|
bigEndian = false;
|
||||||
arch = "arm";
|
arch = "arm";
|
||||||
float = "hard";
|
float = "hard";
|
||||||
@ -48,7 +48,7 @@ let
|
|||||||
inherit (platform) gcc;
|
inherit (platform) gcc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
selectedCrossSystem =
|
selectedCrossSystem =
|
||||||
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
|
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
|
||||||
if toolsArch == "armv6l" then raspberrypiCrossSystem else
|
if toolsArch == "armv6l" then raspberrypiCrossSystem else
|
||||||
@ -91,13 +91,13 @@ rec {
|
|||||||
coreutilsMinimal = (pkgs.coreutils.override (args: {
|
coreutilsMinimal = (pkgs.coreutils.override (args: {
|
||||||
aclSupport = false;
|
aclSupport = false;
|
||||||
})).crossDrv;
|
})).crossDrv;
|
||||||
|
|
||||||
curlMinimal = (pkgs.curl.override {
|
curlMinimal = (pkgs.curl.override {
|
||||||
zlibSupport = false;
|
zlibSupport = false;
|
||||||
sslSupport = false;
|
sslSupport = false;
|
||||||
scpSupport = false;
|
scpSupport = false;
|
||||||
}).crossDrv;
|
}).crossDrv;
|
||||||
|
|
||||||
busyboxMinimal = (pkgs.busybox.override {
|
busyboxMinimal = (pkgs.busybox.override {
|
||||||
# TBD: uClibc is broken.
|
# TBD: uClibc is broken.
|
||||||
# useUclibc = true;
|
# useUclibc = true;
|
||||||
@ -113,10 +113,10 @@ rec {
|
|||||||
CONFIG_UNXZ y
|
CONFIG_UNXZ y
|
||||||
'';
|
'';
|
||||||
}).crossDrv;
|
}).crossDrv;
|
||||||
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
build =
|
build =
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "build";
|
name = "build";
|
||||||
@ -126,7 +126,7 @@ rec {
|
|||||||
crossConfig = stdenv.cross.config;
|
crossConfig = stdenv.cross.config;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
set -x
|
set -x
|
||||||
mkdir -p $out/bin $out/lib $out/libexec
|
mkdir -p $out/bin $out/lib $out/libexec
|
||||||
|
|
||||||
# Copy what we need of Glibc.
|
# Copy what we need of Glibc.
|
||||||
@ -142,20 +142,20 @@ rec {
|
|||||||
cp -d ${glibc.out}/lib/libnss*.so* $out/lib
|
cp -d ${glibc.out}/lib/libnss*.so* $out/lib
|
||||||
cp -d ${glibc.out}/lib/libresolv*.so* $out/lib
|
cp -d ${glibc.out}/lib/libresolv*.so* $out/lib
|
||||||
cp -d ${glibc.out}/lib/crt?.o $out/lib
|
cp -d ${glibc.out}/lib/crt?.o $out/lib
|
||||||
|
|
||||||
cp -rL ${glibc.dev}/include $out
|
cp -rL ${glibc.dev}/include $out
|
||||||
chmod -R u+w $out/include
|
chmod -R u+w $out/include
|
||||||
|
|
||||||
# Hopefully we won't need these.
|
# Hopefully we won't need these.
|
||||||
rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video
|
rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video
|
||||||
find $out/include -name .install -exec rm {} \;
|
find $out/include -name .install -exec rm {} \;
|
||||||
find $out/include -name ..install.cmd -exec rm {} \;
|
find $out/include -name ..install.cmd -exec rm {} \;
|
||||||
mv $out/include $out/include-glibc
|
mv $out/include $out/include-glibc
|
||||||
|
|
||||||
# Copy coreutils, bash, etc.
|
# Copy coreutils, bash, etc.
|
||||||
cp ${coreutilsMinimal}/bin/* $out/bin
|
cp ${coreutilsMinimal}/bin/* $out/bin
|
||||||
(cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users)
|
(cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users)
|
||||||
|
|
||||||
cp ${bash}/bin/bash $out/bin
|
cp ${bash}/bin/bash $out/bin
|
||||||
cp ${findutils}/bin/find $out/bin
|
cp ${findutils}/bin/find $out/bin
|
||||||
cp ${findutils}/bin/xargs $out/bin
|
cp ${findutils}/bin/xargs $out/bin
|
||||||
@ -174,7 +174,7 @@ rec {
|
|||||||
cp -d ${curlMinimal}/lib/libcurl* $out/lib
|
cp -d ${curlMinimal}/lib/libcurl* $out/lib
|
||||||
|
|
||||||
cp -d ${gnugrep.pcre.crossDrv}/lib/libpcre*.so* $out/lib # needed by grep
|
cp -d ${gnugrep.pcre.crossDrv}/lib/libpcre*.so* $out/lib # needed by grep
|
||||||
|
|
||||||
# Copy what we need of GCC.
|
# Copy what we need of GCC.
|
||||||
cp -d ${gcc}/bin/gcc $out/bin
|
cp -d ${gcc}/bin/gcc $out/bin
|
||||||
cp -d ${gcc}/bin/cpp $out/bin
|
cp -d ${gcc}/bin/cpp $out/bin
|
||||||
@ -203,12 +203,12 @@ rec {
|
|||||||
cp -d ${libmpc}/lib/libmpc*.so* $out/lib
|
cp -d ${libmpc}/lib/libmpc*.so* $out/lib
|
||||||
cp -d ${zlib.out}/lib/libz.so* $out/lib
|
cp -d ${zlib.out}/lib/libz.so* $out/lib
|
||||||
cp -d ${libelf}/lib/libelf.so* $out/lib
|
cp -d ${libelf}/lib/libelf.so* $out/lib
|
||||||
|
|
||||||
# TBD: Why are these needed for cross but not native tools?
|
# TBD: Why are these needed for cross but not native tools?
|
||||||
cp -d ${cloogppl}/lib/libcloog*.so* $out/lib
|
cp -d ${cloogppl}/lib/libcloog*.so* $out/lib
|
||||||
cp -d ${cloog}/lib/libcloog*.so* $out/lib
|
cp -d ${cloog}/lib/libcloog*.so* $out/lib
|
||||||
cp -d ${isl}/lib/libisl*.so* $out/lib
|
cp -d ${isl}/lib/libisl*.so* $out/lib
|
||||||
|
|
||||||
# Copy binutils.
|
# Copy binutils.
|
||||||
for i in as ld ar ranlib nm strip readelf objdump; do
|
for i in as ld ar ranlib nm strip readelf objdump; do
|
||||||
cp ${binutils}/bin/$i $out/bin
|
cp ${binutils}/bin/$i $out/bin
|
||||||
@ -216,7 +216,7 @@ rec {
|
|||||||
cp -d ${binutils.out}/lib/lib*.so* $out/lib
|
cp -d ${binutils.out}/lib/lib*.so* $out/lib
|
||||||
|
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
|
|
||||||
# Strip executables even further.
|
# Strip executables even further.
|
||||||
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
||||||
if test -x $i -a ! -L $i; then
|
if test -x $i -a ! -L $i; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user