aboutsummaryrefslogtreecommitdiffstats
path: root/non-free
diff options
context:
space:
mode:
authoralpine-mips-patches <info@mobile-stream.com>2019-02-22 12:53:47 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-03-06 07:52:24 +0000
commita795d29df148fea64a096ccc8b547b6ed6cf7d25 (patch)
tree5dfcb72eb96898dfcb406fe77edf72e177383057 /non-free
parent4020a5c2fc3513f6500f049b2597d68cf4658171 (diff)
downloadaports-a795d29df148fea64a096ccc8b547b6ed6cf7d25.tar.gz
aports-a795d29df148fea64a096ccc8b547b6ed6cf7d25.tar.bz2
aports-a795d29df148fea64a096ccc8b547b6ed6cf7d25.tar.xz
non-free/compcert: new aport
Tested with ocaml-4.07.1 only.
Diffstat (limited to 'non-free')
-rw-r--r--non-free/compcert/APKBUILD53
-rw-r--r--non-free/compcert/fix-cprepro-options.patch47
2 files changed, 100 insertions, 0 deletions
diff --git a/non-free/compcert/APKBUILD b/non-free/compcert/APKBUILD
new file mode 100644
index 0000000000..412ae6c5eb
--- /dev/null
+++ b/non-free/compcert/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: alpine-mips-patches <info@mobile-stream.com>
+# Maintainer: alpine-mips-patches <info@mobile-stream.com>
+pkgname=compcert
+_pkgname=CompCert
+pkgver=3.4
+pkgrel=0
+pkgdesc="The verified C compiler"
+url="https://compcert.inria.fr"
+arch="armhf armv7 riscv64 x86_64"
+license="custom"
+depends="gcc"
+makedepends="ocaml ocaml-compiler-libs ocaml-menhir-dev coq"
+subpackages="$pkgname-doc"
+source="https://compcert.inria.fr/release/$pkgname-$pkgver.tgz
+ fix-cprepro-options.patch
+ "
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ local _target
+ case "$CARCH" in
+ armhf) _target="armv6-hardfloat";;
+ armv7) _target="armv7a-hardfloat";;
+ riscv64) _target="rv64-linux";;
+ ppc|ppc64) _target="$CARCH-linux";; # yes, big-endian only
+ x86) _target="x86_32-linux";; # assumes SSE2
+ x86_64) _target="x86_64-linux";;
+ esac
+
+ ./configure \
+ -prefix /usr \
+ $_target
+ make
+}
+
+check() {
+ cd "$builddir"
+ unset CPPFLAGS
+ make -C test all
+ make -C test test
+}
+
+package() {
+ cd "$builddir"
+ make install \
+ PREFIX="$pkgdir/usr" \
+ SHAREDIR="$pkgdir/usr/share/compcert"
+}
+
+sha512sums="8b5c98e988c58a5896f4cd1923fe854db67e0adfdc9ac1bb337f8a09af7ec0ac94ddc4fb4626c8bc7d480035c7206805acd3f151886e193d0653b5768a373002 compcert-3.4.tgz
+5bdafee9e97c81505853ee2c5263067f98fce937af9c5eac79f51b0998ab9694811761ab5a131cac27109b3e8c84d9cbe293f11b66afce6e4910d452ce648de8 fix-cprepro-options.patch"
diff --git a/non-free/compcert/fix-cprepro-options.patch b/non-free/compcert/fix-cprepro-options.patch
new file mode 100644
index 0000000000..7354b197af
--- /dev/null
+++ b/non-free/compcert/fix-cprepro-options.patch
@@ -0,0 +1,47 @@
+--- a/configure
++++ b/configure
+@@ -224,7 +224,7 @@
+ cc="${toolprefix}gcc"
+ clinker="${toolprefix}gcc"
+ cprepro="${toolprefix}gcc"
+- cprepro_options="-std=c99 -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E"
++ cprepro_options="-std=c99 -U__GNUC__ '-D__builtin_constant_p(x)=0' '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E"
+ libmath="-lm"
+ system="linux"
+ fi
+@@ -274,7 +274,7 @@
+ cc="${toolprefix}gcc"
+ clinker="${toolprefix}gcc"
+ cprepro="${toolprefix}gcc"
+- cprepro_options="-std=c99 -U__GNUC__ -E"
++ cprepro_options="-std=c99 -U__GNUC__ '-D__builtin_constant_p(x)=0' -U__SIZEOF_INT128__ -E"
+ libmath="-lm"
+ system="linux"
+ ;;
+@@ -320,7 +320,7 @@
+ clinker="${toolprefix}gcc"
+ clinker_options="-m32"
+ cprepro="${toolprefix}gcc"
+- cprepro_options="-std=c99 -m32 -U__GNUC__ -E"
++ cprepro_options="-std=c99 -m32 -U__GNUC__ '-D__builtin_constant_p(x)=0' -E"
+ libmath="-lm"
+ system="linux"
+ ;;
+@@ -380,7 +380,7 @@
+ clinker="${toolprefix}gcc"
+ clinker_options="-m64"
+ cprepro="${toolprefix}gcc"
+- cprepro_options="-std=c99 -m64 -U__GNUC__ -E"
++ cprepro_options="-std=c99 -m64 -U__GNUC__ '-D__builtin_constant_p(x)=0' -U__SIZEOF_INT128__ -E"
+ libmath="-lm"
+ system="linux"
+ ;;
+@@ -423,7 +423,7 @@
+ clinker="${toolprefix}gcc"
+ clinker_options="$model_options"
+ cprepro="${toolprefix}gcc"
+- cprepro_options="$model_options -std=c99 -U__GNUC__ -E"
++ cprepro_options="$model_options -std=c99 -U__GNUC__ '-D__builtin_constant_p(x)=0' -U__SIZEOF_INT128__ -E"
+ libmath="-lm"
+ system="linux"
+ fi