Commit a795d29d authored by alpine-mips-patches's avatar alpine-mips-patches Committed by Leonardo Arena

non-free/compcert: new aport

Tested with ocaml-4.07.1 only.
parent 4020a5c2
# 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"
--- 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment