mingw64-gprbuild: fix mingw32 exception

The binder option -E seems to producer invalid code with msys2's GNAT.
This commit is contained in:
Fabien Chouteau
2020-11-18 14:16:28 +01:00
parent f0ff48e5f6
commit b8c258185e
2 changed files with 24 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
diff --unified --recursive --text gprbuild-21.0.0/gprbuild.gpr gprbuild-21.0.0.new/gprbuild.gpr
--- gprbuild.gpr
+++ gprbuild.gpr
@@ -115,7 +115,7 @@ project Gprbuild is
------------
package Binder is
- Common_Switches := ("-Es", "-static");
+ Common_Switches := ("-s", "-static");
case Bld is
when "debug" =>

View File

@@ -6,7 +6,7 @@ pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
_gh_release=21.0.0
pkgver=20${_gh_release}
pkgrel=2
pkgrel=3
pkgdesc="Software tool designed to help automate the construction of multi-language systems (mingw-w64)"
arch=('any')
@@ -18,13 +18,19 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-ada"
"${MINGW_PACKAGE_PREFIX}-gprbuild-bootstrap-git")
conflicts=("${MINGW_PACKAGE_PREFIX}-gprbuild-bootstrap")
source=("gprbuild-${_gh_release}.tar.gz::https://github.com/AdaCore/gprbuild/archive/v${_gh_release}.tar.gz"
"gprconfig_kb-${_gh_release}.tar.gz::https://github.com/AdaCore/gprconfig_kb/archive/v${_gh_release}.tar.gz")
"gprconfig_kb-${_gh_release}.tar.gz::https://github.com/AdaCore/gprconfig_kb/archive/v${_gh_release}.tar.gz"
"0001-remove-binder-option.patch")
sha256sums=('54b7d1a3298160109aaee4d8c263c1ab3ab4abae75d354f3e90a4c51639167a2'
'2aec26afad5bb1a4685d9c041c9c797ff5beda211a5e81f2a97452d2ceabc557')
'2aec26afad5bb1a4685d9c041c9c797ff5beda211a5e81f2a97452d2ceabc557'
'b3cbf68cdd1e5dfa48ad87a4e0cf85b50cdc806d43380d37026382a9eea58d7b')
prepare() {
cd ${srcdir}/gprbuild-${_gh_release}/
# Apply patch to remove binder -E option. This option makes exception
# propagation crash with msys2's GNAT.
patch -p0 -i "${srcdir}"/0001-remove-binder-option.patch
# GPRbuild hard-codes references to ${MINGW_PREFIX}/libexec, but MINGW packages
# must use ${MINGW_PREFIX}/lib instead.
sed -i "s|libexec|lib|g" doinstall gprbuild.gpr \
@@ -45,7 +51,9 @@ prepare() {
build() {
cd ${srcdir}/gprbuild-${_gh_release}/
make SOURCE_DIR="$PWD" prefix=${MINGW_PREFIX} setup
rm -f makefile.setup
make SOURCE_DIR="$PWD" prefix=${MINGW_PREFIX} PROCESSORS=$(nproc) setup
make
}