aboutsummaryrefslogtreecommitdiff
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)
downloadalpine_aports-a795d29df148fea64a096ccc8b547b6ed6cf7d25.tar.bz2
alpine_aports-a795d29df148fea64a096ccc8b547b6ed6cf7d25.tar.xz
alpine_aports-a795d29df148fea64a096ccc8b547b6ed6cf7d25.zip
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 @@
1# Contributor: alpine-mips-patches <info@mobile-stream.com>
2# Maintainer: alpine-mips-patches <info@mobile-stream.com>
3pkgname=compcert
4_pkgname=CompCert
5pkgver=3.4
6pkgrel=0
7pkgdesc="The verified C compiler"
8url="https://compcert.inria.fr"
9arch="armhf armv7 riscv64 x86_64"
10license="custom"
11depends="gcc"
12makedepends="ocaml ocaml-compiler-libs ocaml-menhir-dev coq"
13subpackages="$pkgname-doc"
14source="https://compcert.inria.fr/release/$pkgname-$pkgver.tgz
15 fix-cprepro-options.patch
16 "
17builddir="$srcdir/$_pkgname-$pkgver"
18
19build() {
20 cd "$builddir"
21
22 local _target
23 case "$CARCH" in
24 armhf) _target="armv6-hardfloat";;
25 armv7) _target="armv7a-hardfloat";;
26 riscv64) _target="rv64-linux";;
27 ppc|ppc64) _target="$CARCH-linux";; # yes, big-endian only
28 x86) _target="x86_32-linux";; # assumes SSE2
29 x86_64) _target="x86_64-linux";;
30 esac
31
32 ./configure \
33 -prefix /usr \
34 $_target
35 make
36}
37
38check() {
39 cd "$builddir"
40 unset CPPFLAGS
41 make -C test all
42 make -C test test
43}
44
45package() {
46 cd "$builddir"
47 make install \
48 PREFIX="$pkgdir/usr" \
49 SHAREDIR="$pkgdir/usr/share/compcert"
50}
51
52sha512sums="8b5c98e988c58a5896f4cd1923fe854db67e0adfdc9ac1bb337f8a09af7ec0ac94ddc4fb4626c8bc7d480035c7206805acd3f151886e193d0653b5768a373002 compcert-3.4.tgz
535bdafee9e97c81505853ee2c5263067f98fce937af9c5eac79f51b0998ab9694811761ab5a131cac27109b3e8c84d9cbe293f11b66afce6e4910d452ce648de8 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 @@
1--- a/configure
2+++ b/configure
3@@ -224,7 +224,7 @@
4 cc="${toolprefix}gcc"
5 clinker="${toolprefix}gcc"
6 cprepro="${toolprefix}gcc"
7- cprepro_options="-std=c99 -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E"
8+ 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"
9 libmath="-lm"
10 system="linux"
11 fi
12@@ -274,7 +274,7 @@
13 cc="${toolprefix}gcc"
14 clinker="${toolprefix}gcc"
15 cprepro="${toolprefix}gcc"
16- cprepro_options="-std=c99 -U__GNUC__ -E"
17+ cprepro_options="-std=c99 -U__GNUC__ '-D__builtin_constant_p(x)=0' -U__SIZEOF_INT128__ -E"
18 libmath="-lm"
19 system="linux"
20 ;;
21@@ -320,7 +320,7 @@
22 clinker="${toolprefix}gcc"
23 clinker_options="-m32"
24 cprepro="${toolprefix}gcc"
25- cprepro_options="-std=c99 -m32 -U__GNUC__ -E"
26+ cprepro_options="-std=c99 -m32 -U__GNUC__ '-D__builtin_constant_p(x)=0' -E"
27 libmath="-lm"
28 system="linux"
29 ;;
30@@ -380,7 +380,7 @@
31 clinker="${toolprefix}gcc"
32 clinker_options="-m64"
33 cprepro="${toolprefix}gcc"
34- cprepro_options="-std=c99 -m64 -U__GNUC__ -E"
35+ cprepro_options="-std=c99 -m64 -U__GNUC__ '-D__builtin_constant_p(x)=0' -U__SIZEOF_INT128__ -E"
36 libmath="-lm"
37 system="linux"
38 ;;
39@@ -423,7 +423,7 @@
40 clinker="${toolprefix}gcc"
41 clinker_options="$model_options"
42 cprepro="${toolprefix}gcc"
43- cprepro_options="$model_options -std=c99 -U__GNUC__ -E"
44+ cprepro_options="$model_options -std=c99 -U__GNUC__ '-D__builtin_constant_p(x)=0' -U__SIZEOF_INT128__ -E"
45 libmath="-lm"
46 system="linux"
47 fi