From 88889951db6a129762c79a263f70d032976477c8 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Mon, 26 Nov 2018 01:52:25 +0100 Subject: [PATCH] native gcc: draft libmpfr (not working) --- cross/pkgs/gcc/.gitignore | 1 + cross/pkgs/gcc/build.sh | 22 ++++++++++++++++++---- cross/pkgs/gcc/patch/libmpfr.patch | 11 +++++++++++ cross/pkgs/gcc/src/fetch.json | 12 ++++++++++++ 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 cross/pkgs/gcc/patch/libmpfr.patch diff --git a/cross/pkgs/gcc/.gitignore b/cross/pkgs/gcc/.gitignore index b7d701c..9025a76 100644 --- a/cross/pkgs/gcc/.gitignore +++ b/cross/pkgs/gcc/.gitignore @@ -1,2 +1,3 @@ +!src/fetch.json src/ out/ diff --git a/cross/pkgs/gcc/build.sh b/cross/pkgs/gcc/build.sh index 4882444..2bb6f04 100755 --- a/cross/pkgs/gcc/build.sh +++ b/cross/pkgs/gcc/build.sh @@ -30,11 +30,25 @@ failOnError $? "fetching sources" echo -n Building libgmp... ( - cd libgmp - patch -p0 < $WORKING_DIR/patch/libgmp.patch - ./configure --host=x86_64-jehanne --prefix=/pkgs/libgmp/6.1.2/ - make + cd libgmp && + patch -p0 < $WORKING_DIR/patch/libgmp.patch && + ./configure --host=x86_64-jehanne --prefix=/pkgs/libgmp/6.1.2/ && + make && make DESTDIR=$JEHANNE install ) >> $WORKING_DIR/gcc.build.log failOnError $? "Building libgmp" echo done. + +# Copy to /posix (to emulate bind during cross compilation) +cp $JEHANNE/pkgs/libgmp/6.1.2/* $JEHANNE/posix + +echo -n Building libmpfr... +( + cd libmpfr + patch -p0 < $WORKING_DIR/patch/libmpfr.patch + ./configure --host=x86_64-jehanne --prefix=/pkgs/libmpfr/4.0.1/ + make + make DESTDIR=$JEHANNE install +) >> $WORKING_DIR/gcc.build.log +failOnError $? "Building libmpfr" +echo done. diff --git a/cross/pkgs/gcc/patch/libmpfr.patch b/cross/pkgs/gcc/patch/libmpfr.patch new file mode 100644 index 0000000..74f3e61 --- /dev/null +++ b/cross/pkgs/gcc/patch/libmpfr.patch @@ -0,0 +1,11 @@ +diff -Naru ../orig/config.sub ./config.sub +--- ../orig/config.sub 2018-11-26 14:23:59.224388851 +0100 ++++ ./config.sub 2018-11-26 14:24:55.300412850 +0100 +@@ -1416,6 +1416,7 @@ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ ++ | -jehanne* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) + # 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 47c0c9e..077ee4d 100644 --- a/cross/pkgs/gcc/src/fetch.json +++ b/cross/pkgs/gcc/src/fetch.json @@ -8,5 +8,17 @@ "RemovePrefix": true, "Exclude": [ ] + }, + + "libmpfr" : { + "Upstream":"https://www.mpfr.org/mpfr-current/mpfr-4.0.1.tar.bz2", + "Digest": { + "sha256":"a4d97610ba8579d380b384b225187c250ef88cfe1d5e7226b89519374209b86b" + }, + "Compress":"bzip2", + "RemovePrefix": true, + "Exclude": [ + ] } + }