--- /dev/null
+--- a/testsuite/testsuite_support/__init__.py 2019-06-09 12:47:22.832308224 +0200
++++ b/testsuite/testsuite_support/__init__.py 2019-06-09 12:48:27.768399377 +0200
+@@ -126,8 +126,10 @@
+ # Build Langkit_Support so that each testcase does not try to build it
+ # in parallel.
+ if not self.global_env['options'].disable_tear_up_builds:
+- gargs = ['-p', '-P', self.langkit_support_project_file]
++ gargs = ['-p']
++ gargs = gargs + ['-XGPR_BUILD=relocatable']
++ gargs = gargs + ['-P', self.langkit_support_project_file]
+- cargs = ['-cargs', '-O0', '-g', '-gnatwae']
++ cargs = ['-cargs', '-O0', '-g', '-gnatwa']
+ if self.coverage_enabled:
+ gargs.append('--subdirs=gnatcov')
+ cargs.extend(['-fdump-scos', '-fpreserve-control-flow'])
+--- a/langkit/support/langkit_support.gpr 2019-06-09 14:00:50.239979207 +0200
++++ b/langkit/support/langkit_support.gpr 2019-06-09 14:00:56.580879634 +0200
+@@ -8,7 +8,7 @@
+ for Object_Dir use "obj";
+
+ package Compiler is
+- for Default_Switches ("Ada") use ("-gnatwae", "-gnatyg");
++ for Default_Switches ("Ada") use ("-gnatws", "-gnatyg");
+ end Compiler;
+
+ end Langkit_Support;
+--- a/langkit/templates/langkit_support_gpr.mako 2019-06-09 19:07:51.131902613 +0200
++++ b/langkit/templates/langkit_support_gpr.mako 2019-06-09 19:09:55.530096368 +0200
+@@ -61,7 +61,7 @@
+ case Build_Mode is
+ when "dev" =>
+ for Default_Switches ("Ada") use
+- Common_Ada_Cargs & ("-g", "-O0", "-gnatwe", "-gnata");
++ Common_Ada_Cargs & ("-g", "-O0", "-gnatws", "-gnata");
+
+ when "prod" =>
+ -- Debug information is useful even with optimization for
+--- a/testsuite/testsuite_support/base_driver.py 2019-06-09 20:00:21.202461893 +0200
++++ b/testsuite/testsuite_support/base_driver.py 2019-06-09 20:01:04.516848550 +0200
+@@ -327,7 +327,9 @@
+
+ :param str project_file: Project file name.
+ """
+- argv = ['gprbuild', '-P', project_file, '-p']
++ argv = ['gprbuild']
++ argv = argv + ['-XGPR_BUILD=relocatable']
++ argv = argv + ['-P', project_file, '-p']
+ cargs = ['-O0', '-g', '-gnata']
+ if self.coverage_enabled:
+ argv.append('--subdirs=gnatcov')
+--- a/langkit/libmanage.py 2019-06-09 20:40:14.885582672 +0200
++++ b/langkit/libmanage.py 2019-06-09 20:41:13.991738858 +0200
+@@ -745,6 +745,7 @@
+ result = ['-XBUILD_MODE={}'.format(build_mode),
+ '-XLIBRARY_TYPE={}'.format(library_type),
+ '-XGPR_BUILD={}'.format(library_type),
++ '-XGNATCOLL_GMP_BUILD={}'.format(library_type),
+ '-XXMLADA_BUILD={}'.format(library_type)]
+
+ enable_build_warnings = getattr(args, 'enable_build_warnings', False)
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+MYP=${P}-20190510-19B8C
+
+DESCRIPTION="A Python framework to generate language parsers"
+HOMEPAGE="https://www.adacore.com/community"
+SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8f8a31e87a8f1c967d31
+ -> ${MYP}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-ada/gnatcoll-bindings[iconv,shared]
+ dev-python/mako
+ <dev-python/pyyaml-5
+ dev-python/enum34
+ dev-python/funcy
+ dev-python/docutils"
+
+DEPEND="${RDEPEND}
+ test? ( dev-ada/gnatcoll-bindings[gmp] )"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_prepare() {
+ default
+ # Can't make this test working
+ rm -r testsuite/tests/misc/link_two_libs || die
+}
+
+src_test() {
+ testsuite/testsuite.py --show-error-output | tee testsuite.log
+ grep -q FAILED testsuite.log && die "Test failed"
+}
+
+src_install() {
+ default
+ python_domodule langkit
+ python_doscript scripts/create-project.py
+}