From 343b999b993529a6593dad6d2e5597e45461f5fc Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 10 Jul 2015 15:24:24 +0000 Subject: [PATCH] polyml: portable build on non x86*, AArch64 support added by me. --- srcpkgs/polyml/patches/poly-aarch64.patch | 42 +++++++++++++++++++++++ srcpkgs/polyml/template | 6 +++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/polyml/patches/poly-aarch64.patch diff --git a/srcpkgs/polyml/patches/poly-aarch64.patch b/srcpkgs/polyml/patches/poly-aarch64.patch new file mode 100644 index 0000000000..e7b2ae10c6 --- /dev/null +++ b/srcpkgs/polyml/patches/poly-aarch64.patch @@ -0,0 +1,42 @@ +--- config.h.in 2014-02-19 14:11:05.000000000 +0000 ++++ config.h.in 2015-07-09 14:18:31.313388000 +0000 +@@ -551,6 +551,9 @@ + /* Define if the host is an ARM (32 bit) */ + #undef HOSTARCHITECTURE_ARM + ++/* Define if the host is an ARM (64 bit) */ ++#undef HOSTARCHITECTURE_AARCH64 ++ + /* Define if the host is Itanium */ + #undef HOSTARCHITECTURE_IA64 + +--- configure 2014-05-09 10:11:45.000000000 +0000 ++++ configure 2015-07-09 14:18:55.073388000 +0000 +@@ -21306,6 +21306,12 @@ + + polyarch=interpret + ;; ++ aarch64*) ++ ++$as_echo "#define HOSTARCHITECTURE_AARCH64 1" >>confdefs.h ++ ++ polyarch=interpret ++ ;; + ia64*) + + $as_echo "#define HOSTARCHITECTURE_IA64 1" >>confdefs.h +--- libpolyml/elfexport.cpp 2013-10-15 16:25:39.000000000 +0000 ++++ libpolyml/elfexport.cpp 2015-07-09 14:13:35.433388000 +0000 +@@ -344,6 +344,10 @@ + directReloc = R_IA64_DIR64LSB; + fhdr.e_flags = EF_IA_64_ABI64; + useRela = true; ++#elif defined(HOSTARCHITECTURE_AARCH64) ++ fhdr.e_machine = EM_AARCH64; ++ directReloc = R_AARCH64_ABS64; ++ useRela = true; + #else + #error "No support for exporting on this architecture" + #endif + + diff --git a/srcpkgs/polyml/template b/srcpkgs/polyml/template index 276a079f9f..6481fa790f 100644 --- a/srcpkgs/polyml/template +++ b/srcpkgs/polyml/template @@ -1,10 +1,14 @@ # Template file for 'polyml' pkgname=polyml version=5.5.2 -revision=3 +revision=4 wrksrc="${pkgname}.${version}" build_style=gnu-configure configure_args="--with-system-libffi --enable-shared" +case "$XBPS_TARGET_MACHINE" in + i686*|x86_64*) ;; + *) configure_args+=" --with-portable" ;; +esac makedepends="gmp-devel libffi-devel" conflicts="mesa-demos>=0" # /usr/bin/poly short_desc="The Poly/ML Standard ML (SML) implementation"