aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ponyc
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-06-07 22:45:18 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-06-11 11:31:59 +0000
commitfb1360d4a6fdf5bce01891cac7ae11bdb4971b4c (patch)
tree9d96075e3b4f0cde321f6a6c4845d89234f326c7 /testing/ponyc
parent396b1b813c9cc8c8334c0457e11ebb3fec41f297 (diff)
testing/ponyc: upgrade to 0.28.1
* Adopt maintainership * Modernize * Use upstream `make install` * Use llvm6
Diffstat (limited to 'testing/ponyc')
-rw-r--r--testing/ponyc/APKBUILD113
-rw-r--r--testing/ponyc/disable-avx512f-for-x86-only.patch122
-rw-r--r--testing/ponyc/fix-aarch64.patch56
-rw-r--r--testing/ponyc/fix-atomic-initializer.patch53
-rw-r--r--testing/ponyc/fix-tests.patch11
-rw-r--r--testing/ponyc/makefile-remove-march-mtune.patch28
-rw-r--r--testing/ponyc/more-portable-ln.patch16
7 files changed, 80 insertions, 319 deletions
diff --git a/testing/ponyc/APKBUILD b/testing/ponyc/APKBUILD
index 6f61a0622d8..da2700f1c4c 100644
--- a/testing/ponyc/APKBUILD
+++ b/testing/ponyc/APKBUILD
@@ -1,55 +1,34 @@
+# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=ponyc
-pkgver=0.21.3
-pkgrel=2
+pkgver=0.28.1
+pkgrel=0
pkgdesc="An open-source, actor-model, capabilities-secure, high performance programming language"
url="https://www.ponylang.org"
-arch="x86_64 aarch64"
+arch="all"
license="BSD-2-Clause"
-# LLVM 5 support is denoted as experimental, but libponyc.tests segfault on
-# LLVM 3.9.1 and 4.0.0 (see https://github.com/ponylang/ponyc/issues/2689).
-case "$CARCH" in
- aarch64) _llvmver=5;;
- *) _llvmver=3.9;;
-esac
-depends="binutils-gold clang"
-checkdepends="libressl-dev pcre2-dev"
-makedepends="clang-dev libexecinfo-dev libunwind-dev llvm$_llvmver-dev
- ncurses-dev paxmark zlib-dev"
+_llvmver=6
+depends="binutils-gold"
+checkdepends="openssl-dev pcre2-dev"
+# Ponyc _is_ compatible with LLVM7, but LLVM7 is pretty buggy on musl.
+makedepends="libexecinfo-dev llvm${_llvmver}-dev ncurses-dev paxmark
+ zlib-dev linux-headers"
+options="!check"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ponylang/$pkgname/archive/$pkgver.tar.gz
- disable-avx512f-for-x86-only.patch
- fix-aarch64.patch
- fix-atomic-initializer.patch
- makefile-remove-march-mtune.patch
- fix-tests.patch"
-builddir="$srcdir/$pkgname-$pkgver"
+ more-portable-ln.patch
+ makefile-remove-march-mtune.patch"
-# arch per gcc, used only to define PONY_ARCH.
-_arch="$CARCH"
-case "$CARCH" in
- x86_64) _arch=x86-64;;
- armhf) _arch=armv6zk;;
- aarch64) _arch=armv8-a;;
-esac
-
-_make_opts="arch=$_arch
- config=release
- default_pic=true
- prefix=/usr
- verbose=true
- LLVM_CONFIG=/usr/lib/llvm$_llvmver/bin/llvm-config
- "
-
-# gcc 6.4.0 doesn't support flag -mcx16 which ponyc needs on aarch64.
-export CC=clang
-export CXX=clang++
+export LLVM_CONFIG=/usr/lib/llvm${_llvmver}/bin/llvm-config
+# Required to not crash gold: https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+export CFLAGS="$CFLAGS -fPIE"
build() {
- cd "$builddir"
-
- make $_make_opts CFLAGS="-Wno-error"
+ make \
+ config=release \
+ default_pic=true \
+ verbose=true
paxmark m build/release/ponyc \
build/release/libponyc.tests
@@ -58,46 +37,40 @@ build() {
build/release/ponyc packages/stdlib -rexpr -g -o docs
}
-# NOTE: libponyc.tests segfaults on some aarch64 machines when libnuma is
-# installed (e.g. on our 96cores machine).
check() {
- cd "$builddir"
- make test -j1 $_make_opts
+ make test
}
package() {
- cd "$builddir"/build/release
-
- # ponyc expects the standard packages to be in the same directory.
- install -m 755 -D ponyc "$pkgdir"/usr/lib/pony/$pkgver/bin/ponyc
- mkdir -p "$pkgdir"/usr/bin
- ln -sf ../lib/pony/$pkgver/bin/ponyc "$pkgdir"/usr/bin/ponyc
-
- mkdir -p "$pkgdir"/usr/lib
- cp libponyc.a libponyrt.a libponyrt-pic.a "$pkgdir"/usr/lib/
-
- cd ../..
-
- cp -r packages "$pkgdir"/usr/lib/pony/$pkgver/
+ make \
+ config=release \
+ default_pic=true \
+ ponydir="$pkgdir"/usr/lib/pony/$pkgver \
+ prefix="$pkgdir"/usr \
+ install
+
+ # links to $pkgdir
+ ln -sf /usr/lib/pony/$pkgver/lib/native/libponyrt.a "$pkgdir"/usr/lib/libponyrt.a
+ ln -sf /usr/lib/pony/$pkgver/lib/native/libponyrt-pic.a "$pkgdir"/usr/lib/libponyrt-pic.a
+ ln -sf /usr/lib/pony/$pkgver/lib/native/libponyc.a "$pkgdir"/usr/lib/libponyc.a
+ ln -sf /usr/lib/pony/$pkgver/bin/ponyc "$pkgdir"/usr/bin/ponyc
+
+ # We install these manually in dev()
+ rm -r "$pkgdir"/usr/include/
mkdir -p "$pkgdir"/usr/share/doc/$pkgname
cp -r docs/stdlib-docs/docs "$pkgdir"/usr/share/doc/$pkgname/stdlib
}
-# Note: libponyrt*.a and probably even libponyc.a are needed in runtime.
+# Note: libponyrt*.a and libponyc.a are needed in runtime.
dev() {
pkgdesc="$pkgdesc (development files)"
depends="$pkgname=$pkgver-r$pkgrel"
- cd "$builddir"
- install -m 644 -D src/libponyrt/pony.h "$subpkgdir"/usr/include/pony.h
- install -m 644 -D src/common/pony/detail/atomics.h \
- "$subpkgdir"/usr/include/pony/detail/atomics.h
+ mkdir -p "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/lib/pony/$pkgver/include "$subpkgdir"/usr
}
-sha512sums="f89389142d77e93038c77d3fbe9e64c13ce76b9737430969fcdf2916023d0b7195f4d551895eab999798594352b40848be8dcc63af6927e8cc62b7c7000be65d ponyc-0.21.3.tar.gz
-0f1d7e45639db17343db675a740922b2c1ef1317fd1a7678a0d30040407c91c930b7439dc12282541384336da1af5f0bc143ea0f5725eb8aa2ab3646b1cf00f7 disable-avx512f-for-x86-only.patch
-4ff47633e878890d9400b7ab7d7fad42119707d8b1f69c0192266f4b2d386be698bb0e8f2accae9b440bcfece39e1c6baf10047436dc184b1c3885c2ac33d569 fix-aarch64.patch
-f78ff44de59fe486bdfa8a7fbde14786825e549b23759ef798ba7632d556203de49b522562a04cfcab1ef3ef323e226ff9217abebafcb414e647ebd17877b67d fix-atomic-initializer.patch
-0dac51826c0fcd47e6d4e7fe9928a5221c66da2f24d7931d7c53e591d325375b88e98cc0b3b6d538f9ec9bcbba906de7c00fff5434e427c94cea4bd2fb0477f6 makefile-remove-march-mtune.patch
-46c0125b60cd1db89d7ae958602b087acb2ae1fd8298cd9141828999693a9e39b60d2dac338853406081fc1c138e506243357618197ffd118fe4ac9737bd1565 fix-tests.patch"
+sha512sums="5d8ea9da967a79ecaadc4a498e8af78cb6ba43745f825499b1677c0a262c2891fde003d1674e242369b7dd425dbff2f107544be07aeab859bf91caa4f0e3df31 ponyc-0.28.1.tar.gz
+38aa40f6000dcb823be7b542cdad8d04b6ac4cd0a4fff1a472520a7cb71631fb34e5bee74914fe559674594dd901aede91390809e143dd96c5d68a16f8ac196c more-portable-ln.patch
+c78156bc68332705c41e7f4f8ff65bb77a778d8ee1685e9376473041c9c0b815e96ebc4cfd68b03c5c5c9d53cff8e6c0deba0fc19a9bcb29b7f91caaa15a0803 makefile-remove-march-mtune.patch"
diff --git a/testing/ponyc/disable-avx512f-for-x86-only.patch b/testing/ponyc/disable-avx512f-for-x86-only.patch
deleted file mode 100644
index e14ff874789..00000000000
--- a/testing/ponyc/disable-avx512f-for-x86-only.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-Patch-Source: https://github.com/ponylang/ponyc/pull/2665
-
---- a/Makefile
-+++ b/Makefile
-@@ -41,6 +41,7 @@
- config ?= release
- arch ?= native
- tune ?= generic
-+cpu ?= $(arch)
- bits ?= $(shell getconf LONG_BIT)
-
- ifndef verbose
-@@ -102,7 +103,7 @@
- -DPONY_VERSION_STR=\"$(version_str)\" \
- -D_FILE_OFFSET_BITS=64
- ALL_CXXFLAGS = -std=gnu++11 -fno-rtti
--LL_FLAGS = -mcpu=$(arch)
-+LL_FLAGS = -mcpu=$(cpu)
-
- # Determine pointer size in bits.
- BITS := $(bits)
---- a/src/libponyc/codegen/codegen.c
-+++ b/src/libponyc/codegen/codegen.c
-@@ -976,48 +976,53 @@
-
- bool codegen_pass_init(pass_opt_t* opt)
- {
-+ char *triple;
-+
-+ // Default triple, cpu and features.
-+ if(opt->triple != NULL)
-+ {
-+ triple = LLVMCreateMessage(opt->triple);
-+ } else {
-+#ifdef PLATFORM_IS_MACOSX
-+ // This is to prevent XCode 7+ from claiming OSX 14.5 is required.
-+ triple = LLVMCreateMessage("x86_64-apple-macosx");
-+#else
-+ triple = LLVMGetDefaultTargetTriple();
-+#endif
-+ }
-+
- if(opt->features != NULL)
- {
- #if PONY_LLVM < 500
-- // Disable -avx512f on LLVM < 5.0.0 to avoid bug https://bugs.llvm.org/show_bug.cgi?id=30542
-- size_t temp_len = strlen(opt->features) + 9;
-- char* temp_str = (char*)ponyint_pool_alloc_size(temp_len);
-- snprintf(temp_str, temp_len, "%s,-avx512f", opt->features);
-+ if(target_is_x86(triple))
-+ {
-+ // Disable -avx512f on LLVM < 5.0.0 to avoid bug https://bugs.llvm.org/show_bug.cgi?id=30542
-+ size_t temp_len = strlen(opt->features) + 10;
-+ char* temp_str = (char*)ponyint_pool_alloc_size(temp_len);
-+ snprintf(temp_str, temp_len, "%s,-avx512f", opt->features);
-
-- opt->features = temp_str;
--#endif
-+ opt->features = LLVMCreateMessage(temp_str);
-
-+ ponyint_pool_free_size(temp_len, temp_str);
-+ } else {
-+ opt->features = LLVMCreateMessage(opt->features);
-+ }
-+#else
- opt->features = LLVMCreateMessage(opt->features);
--
--
--#if PONY_LLVM < 500
-- // free memory for temp_str
-- ponyint_pool_free_size(temp_len, temp_str);
- #endif
- } else {
- if((opt->cpu == NULL) && (opt->triple == NULL))
- opt->features = LLVMGetHostCPUFeatures();
- else
- #if PONY_LLVM < 500
-- opt->features = LLVMCreateMessage("-avx512f");
-+ opt->features = LLVMCreateMessage(target_is_x86(triple) ? "-avx512f" : "");
- #else
- opt->features = LLVMCreateMessage("");
- #endif
- }
-
-- // Default triple, cpu and features.
-- if(opt->triple != NULL)
-- {
-- opt->triple = LLVMCreateMessage(opt->triple);
-- } else {
--#ifdef PLATFORM_IS_MACOSX
-- // This is to prevent XCode 7+ from claiming OSX 14.5 is required.
-- opt->triple = LLVMCreateMessage("x86_64-apple-macosx");
--#else
-- opt->triple = LLVMGetDefaultTargetTriple();
--#endif
-- }
--
-+ opt->triple = triple;
-+
- if(opt->cpu != NULL)
- opt->cpu = LLVMCreateMessage(opt->cpu);
- else
---- a/src/libponyc/codegen/host.cc
-+++ b/src/libponyc/codegen/host.cc
-@@ -46,7 +46,7 @@
- for(auto it = features.begin(); it != features.end(); it++)
- buf_size += (*it).getKey().str().length() + 2; // plus +/- char and ,/null
-
--#if PONY_LLVM < 500
-+#if PONY_LLVM < 500 and defined(PLATFORM_IS_X86)
- // Add extra buffer space for llvm bug workaround
- buf_size += 9;
- #endif
-@@ -69,7 +69,7 @@
- strcat(buf, ",");
- }
-
--#if PONY_LLVM < 500
-+#if PONY_LLVM < 500 and defined(PLATFORM_IS_X86)
- // Disable -avx512f on LLVM < 5.0.0 to avoid bug https://bugs.llvm.org/show_bug.cgi?id=30542
- strcat(buf, ",-avx512f");
- #endif
diff --git a/testing/ponyc/fix-aarch64.patch b/testing/ponyc/fix-aarch64.patch
deleted file mode 100644
index e8680cba09d..00000000000
--- a/testing/ponyc/fix-aarch64.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 62dee527de27d0899331ebeb0362b60cd39cfcdd Mon Sep 17 00:00:00 2001
-From: Vassil Kovatchev <vkovatchev@deloitte.com>
-Date: Thu, 3 May 2018 09:48:52 -0400
-Subject: [PATCH] Fix failing aarch64 (ARM64) build
-
-ARM64 systems do not use ARM Exception Handling ABI (EHABI), but rather the DWARF exception handling standard.
-The fix turns off special ARM handling of exceptions when the target platform is ARM64.
-This enables builds of the codebase on ARM64 systems with standard implementation of libunwind as shipped with gcc 5+.
-
-Patch-Source: https://github.com/ponylang/ponyc/pull/2688
-
---- a/src/common/platform.h
-+++ b/src/common/platform.h
-@@ -170,6 +170,11 @@
- */
- #if defined(ARMV2) || defined(__arm__) || defined(__aarch64__)
- # define PLATFORM_IS_ARM
-+# if defined(__aarch64__)
-+# define PLATFORM_IS_ARM64
-+# else
-+# define PLATFORM_IS_ARM32
-+# endif
- #elif defined(__i386__) || defined(_M_IX86) || defined(_X86_) || \
- defined(__amd64__) || defined(__x86_64__) || defined(_M_X64) || \
- defined(_M_AMD64)
---- a/src/libponyrt/lang/posix_except.c
-+++ b/src/libponyrt/lang/posix_except.c
-@@ -9,7 +9,7 @@
-
- PONY_EXTERN_C_BEGIN
-
--#ifdef PLATFORM_IS_ARM
-+#ifdef PLATFORM_IS_ARM32
- #include <string.h>
- #include <stdio.h>
- #endif
-@@ -26,7 +26,7 @@
-
- PONY_API void pony_error()
- {
--#ifdef PLATFORM_IS_ARM
-+#ifdef PLATFORM_IS_ARM32
- memcpy(exception.exception_class, "Pony\0\0\0\0", 8);
- #else
- exception.exception_class = 0x506F6E7900000000; // "Pony"
-@@ -46,7 +46,9 @@
- _Unwind_SetIP(context, landing_pad);
- }
-
--#ifdef PLATFORM_IS_ARM
-+// Switch to ARM EHABI for ARM32 devices.
-+// Note that this does not apply to ARM64 devices which use DWARF Exception Handling.
-+#ifdef PLATFORM_IS_ARM32
-
- _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*, _Unwind_Context*);
-
diff --git a/testing/ponyc/fix-atomic-initializer.patch b/testing/ponyc/fix-atomic-initializer.patch
deleted file mode 100644
index 7795217d1d2..00000000000
--- a/testing/ponyc/fix-atomic-initializer.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-change atomic initializer in pool_global
-
-Patch backported to 0.21.3 from https://github.com/ponylang/ponyc/pull/2668
-
---- a/src/libponyrt/mem/pool.c
-+++ b/src/libponyrt/mem/pool.c
-@@ -97,24 +97,30 @@
- #define THREAD_MAX_BEFORE_SHARE(MAX_MEM, SIZE) \
- (((MAX_MEM / SIZE)>=(1))?(MAX_MEM / SIZE):(1))
-
-+#ifdef PLATFORM_IS_X86
-+# define POOL_CENTRAL_INIT {{NULL, 0}}
-+#else
-+# define POOL_CENTRAL_INIT NULL
-+#endif
-+
- static pool_global_t pool_global[POOL_COUNT] =
- {
-- {POOL_MIN << 0, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 0), {{NULL, 0}}},
-- {POOL_MIN << 1, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 1), {{NULL, 0}}},
-- {POOL_MIN << 2, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 2), {{NULL, 0}}},
-- {POOL_MIN << 3, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 3), {{NULL, 0}}},
-- {POOL_MIN << 4, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 4), {{NULL, 0}}},
-- {POOL_MIN << 5, THREAD_MAX_BEFORE_SHARE(0x10000, POOL_MIN << 5), {{NULL, 0}}},
-- {POOL_MIN << 6, THREAD_MAX_BEFORE_SHARE(0x20000, POOL_MIN << 6), {{NULL, 0}}},
-- {POOL_MIN << 7, THREAD_MAX_BEFORE_SHARE(0x40000, POOL_MIN << 7), {{NULL, 0}}},
-- {POOL_MIN << 8, THREAD_MAX_BEFORE_SHARE(0x80000, POOL_MIN << 8), {{NULL, 0}}},
-- {POOL_MIN << 9, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 9), {{NULL, 0}}},
-- {POOL_MIN << 10, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 10), {{NULL, 0}}},
-- {POOL_MIN << 11, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 11), {{NULL, 0}}},
-- {POOL_MIN << 12, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 12), {{NULL, 0}}},
-- {POOL_MIN << 13, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 13), {{NULL, 0}}},
-- {POOL_MIN << 14, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 14), {{NULL, 0}}},
-- {POOL_MIN << 15, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 15), {{NULL, 0}}},
-+ {POOL_MIN << 0, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 0), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 1, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 1), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 2, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 2), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 3, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 3), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 4, THREAD_MAX_BEFORE_SHARE(0x8000, POOL_MIN << 4), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 5, THREAD_MAX_BEFORE_SHARE(0x10000, POOL_MIN << 5), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 6, THREAD_MAX_BEFORE_SHARE(0x20000, POOL_MIN << 6), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 7, THREAD_MAX_BEFORE_SHARE(0x40000, POOL_MIN << 7), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 8, THREAD_MAX_BEFORE_SHARE(0x80000, POOL_MIN << 8), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 9, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 9), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 10, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 10), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 11, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 11), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 12, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 12), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 13, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 13), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 14, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 14), POOL_CENTRAL_INIT},
-+ {POOL_MIN << 15, THREAD_MAX_BEFORE_SHARE(POOL_MAX, POOL_MIN << 15), POOL_CENTRAL_INIT},
- };
-
- static pool_block_t pool_block_global;
diff --git a/testing/ponyc/fix-tests.patch b/testing/ponyc/fix-tests.patch
deleted file mode 100644
index 4b4046079ca..00000000000
--- a/testing/ponyc/fix-tests.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/packages/process/_test.pony
-+++ b/packages/process/_test.pony
-@@ -63,7 +63,7 @@
-
- fun ref apply(h: TestHelper) =>
- let notifier: ProcessNotify iso = _ProcessClient(0,
-- "cat: file_does_not_exist: No such file or directory\n", 1, h)
-+ "cat: can't open 'file_does_not_exist': No such file or directory\n", 1, h)
- try
- let path = FilePath(h.env.root as AmbientAuth, "/bin/cat")?
- let args: Array[String] iso = recover Array[String](2) end
diff --git a/testing/ponyc/makefile-remove-march-mtune.patch b/testing/ponyc/makefile-remove-march-mtune.patch
index b8b45eb3850..3bee239b16d 100644
--- a/testing/ponyc/makefile-remove-march-mtune.patch
+++ b/testing/ponyc/makefile-remove-march-mtune.patch
@@ -1,20 +1,22 @@
Don't hassle with -march and -mtune, use gcc defaults.
---- a/Makefile
-+++ b/Makefile
-@@ -90,9 +90,9 @@
- destdir ?= $(prefix)/lib/pony/$(tag)
+diff --git a/Makefile-ponyc b/Makefile-ponyc
+index 50f4936..8f28e1a 100644
+--- a/Makefile-ponyc
++++ b/Makefile-ponyc
+@@ -108,9 +108,9 @@ else
+ endif
LIB_EXT ?= a
-BUILD_FLAGS = -march=$(arch) -mtune=$(tune) -Werror -Wconversion \
+BUILD_FLAGS = -Werror -Wconversion \
-Wno-sign-conversion -Wextra -Wall
--LINKER_FLAGS = -march=$(arch) -mtune=$(tune)
-+LINKER_FLAGS =
+-LINKER_FLAGS = -march=$(arch) -mtune=$(tune) $(LDFLAGS)
++LINKER_FLAGS = $(LDFLAGS)
AR_FLAGS ?= rcs
ALL_CFLAGS = -std=gnu11 -fexceptions \
-DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \
-@@ -102,7 +102,7 @@
+@@ -120,7 +120,7 @@ ALL_CFLAGS = -std=gnu11 -fexceptions \
-DPONY_VERSION_STR=\"$(version_str)\" \
-D_FILE_OFFSET_BITS=64
ALL_CXXFLAGS = -std=gnu++11 -fno-rtti
@@ -23,3 +25,15 @@ Don't hassle with -march and -mtune, use gcc defaults.
# Determine pointer size in bits.
BITS := $(bits)
+@@ -135,11 +135,6 @@ ifeq ($(BITS),64)
+ endif
+ endif
+
+-ifneq ($(fpu),)
+- BUILD_FLAGS += -mfpu=$(fpu)
+- LINKER_FLAGS += -mfpu=$(fpu)
+-endif
+-
+ PONY_BUILD_DIR ?= build/$(config)
+ PONY_SOURCE_DIR ?= src
+ PONY_TEST_DIR ?= test
diff --git a/testing/ponyc/more-portable-ln.patch b/testing/ponyc/more-portable-ln.patch
new file mode 100644
index 00000000000..51235e95c88
--- /dev/null
+++ b/testing/ponyc/more-portable-ln.patch
@@ -0,0 +1,16 @@
+https://github.com/ponylang/ponyc/issues/3169
+--- a/Makefile-ponyc
++++ b/Makefile-ponyc
+@@ -95,11 +95,7 @@
+ endif
+ endif
+
+-ifneq (,$(filter $(OSTYPE), osx bsd))
+- symlink.flags = -sf
+-else
+- symlink.flags = -srf
+-endif
++symlink.flags = -sf
+
+ ifneq (,$(filter $(OSTYPE), osx bsd))
+ SED_INPLACE = sed -i -e