From 229fbc96335d791973db02cd44c1e620d1527b24 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Tue, 27 Nov 2018 01:46:03 +0100 Subject: [PATCH] gcc native: build libmpc --- cross/pkgs/gcc/.gitignore | 2 +- cross/pkgs/gcc/build.sh | 22 +++++++++++++++++++++- cross/pkgs/gcc/patch/libmpc.patch | 11 +++++++++++ cross/pkgs/gcc/src/fetch.json | 11 ++++++++++- 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 cross/pkgs/gcc/patch/libmpc.patch diff --git a/cross/pkgs/gcc/.gitignore b/cross/pkgs/gcc/.gitignore index 9025a76..c55869c 100644 --- a/cross/pkgs/gcc/.gitignore +++ b/cross/pkgs/gcc/.gitignore @@ -1,3 +1,3 @@ -!src/fetch.json src/ +!src/fetch.json out/ diff --git a/cross/pkgs/gcc/build.sh b/cross/pkgs/gcc/build.sh index 76380f0..f1b382e 100755 --- a/cross/pkgs/gcc/build.sh +++ b/cross/pkgs/gcc/build.sh @@ -49,7 +49,27 @@ echo -n Building libmpfr... ./configure --host=x86_64-jehanne --prefix=/posix/ --with-sysroot=$JEHANNE --with-gmp=$JEHANNE/pkgs/libgmp/6.1.2/posix/ && cp ../../../../patch/MakeNothing.in doc/Makefile && make && - make DESTDIR=$JEHANNE/pkgs/libmpfr/4.0.1/ install + make DESTDIR=$JEHANNE/pkgs//4.0.1/ install ) >> $WORKING_DIR/gcc.build.log failOnError $? "Building libmpfr" echo done. + +# Copy to /posix (to emulate bind during cross compilation) +cp -fr $JEHANNE/pkgs/libmpfr/4.0.1/posix/* $JEHANNE/posix + +echo -n Building libmpc... +( + cd libmpc && + chmod u+w config.sub && + patch -p0 < $WORKING_DIR/patch/libmpc.patch && + chmod u-w config.sub && + ./configure --host=x86_64-jehanne --prefix=/posix/ --with-sysroot=$JEHANNE --with-gmp=$JEHANNE/pkgs/libgmp/6.1.2/posix/ --with-mpfr=$JEHANNE/pkgs/libmpfr/4.0.1/posix/ && + cp ../../../../patch/MakeNothing.in doc/Makefile && + make && + make DESTDIR=$JEHANNE/pkgs/libmpc/1.1.0/ install +) >> $WORKING_DIR/gcc.build.log +failOnError $? "Building libmpc" +echo done. + +# Copy to /posix (to emulate bind during cross compilation) +cp -fr $JEHANNE/pkgs/libmpc/4.0.1/posix/* $JEHANNE/posix diff --git a/cross/pkgs/gcc/patch/libmpc.patch b/cross/pkgs/gcc/patch/libmpc.patch new file mode 100644 index 0000000..b207673 --- /dev/null +++ b/cross/pkgs/gcc/patch/libmpc.patch @@ -0,0 +1,11 @@ +diff -Naru ../orig/config.sub ./config.sub +--- ../orig/config.sub 2018-11-27 00:30:59.807843647 +0100 ++++ ./config.sub 2018-11-27 00:32:49.224841688 +0100 +@@ -1393,6 +1393,7 @@ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -jehanne* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; diff --git a/cross/pkgs/gcc/src/fetch.json b/cross/pkgs/gcc/src/fetch.json index 077ee4d..dab3281 100644 --- a/cross/pkgs/gcc/src/fetch.json +++ b/cross/pkgs/gcc/src/fetch.json @@ -9,7 +9,6 @@ "Exclude": [ ] }, - "libmpfr" : { "Upstream":"https://www.mpfr.org/mpfr-current/mpfr-4.0.1.tar.bz2", "Digest": { @@ -19,6 +18,16 @@ "RemovePrefix": true, "Exclude": [ ] + }, + "libmpc" : { + "Upstream":"https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz", + "Digest": { + "sha256":"6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e" + }, + "Compress":"gzip", + "RemovePrefix": true, + "Exclude": [ + ] } }