native gcc: build libgmp
This commit is contained in:
parent
219d3b8cc1
commit
e0db397862
|
@ -0,0 +1,2 @@
|
|||
src/
|
||||
out/
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Cross compiling GCC and dependencies"
|
||||
|
||||
export WORKING_DIR="$JEHANNE/hacking/cross/pkgs/gcc"
|
||||
|
||||
# include x86_64-jehanne-pkg-config in PATH
|
||||
export PATH="$JEHANNE/hacking/cross/:$PATH"
|
||||
|
||||
function failOnError {
|
||||
# $1 -> exit status on a previous command
|
||||
# $2 -> task description
|
||||
if [ $1 -ne 0 ]; then
|
||||
kill $dotter
|
||||
wait $dotter 2>/dev/null
|
||||
|
||||
echo "ERROR $2"
|
||||
echo
|
||||
echo BUILD LOG:
|
||||
echo
|
||||
cat cross-toolchain.build.log
|
||||
exit $1
|
||||
fi
|
||||
}
|
||||
|
||||
date > $WORKING_DIR/gcc.build.log
|
||||
|
||||
(cd src && fetch) >> $WORKING_DIR/gcc.build.log
|
||||
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
|
||||
make DESTDIR=$JEHANNE install
|
||||
) >> $WORKING_DIR/gcc.build.log
|
||||
failOnError $? "Building libgmp"
|
||||
echo done.
|
|
@ -0,0 +1,11 @@
|
|||
diff -Naru ../orig/configfsf.sub ./configfsf.sub
|
||||
--- ../orig/configfsf.sub 2018-11-26 11:59:08.897396848 +0100
|
||||
+++ ./configfsf.sub 2018-11-26 12:20:10.079672849 +0100
|
||||
@@ -1399,6 +1399,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.
|
||||
;;
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"libgmp" : {
|
||||
"Upstream":"https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2",
|
||||
"Digest": {
|
||||
"sha256":"5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2"
|
||||
},
|
||||
"Compress":"bzip2",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# from https://wiki.osdev.org/Cross-Porting_Software
|
||||
|
||||
# Fill these in appropriately:
|
||||
export PKG_CONFIG_SYSROOT_DIR=$JEHANNE
|
||||
export PKG_CONFIG_LIBDIR=$JEHANNE/lib/pkgconfig
|
||||
|
||||
# TODO: If it works this should probably just be set to the empty string.
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR
|
||||
|
||||
# Use --static here if your OS only has static linking.
|
||||
# TODO: Perhaps it's a bug in the libraries if their pkg-config files
|
||||
# doesn't record that only static libraries were built.
|
||||
exec pkg-config --static "$@"
|
Loading…
Reference in New Issue