summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2021-05-15 16:43:14 +0000
committerKeri Harris <keri@gentoo.org>2021-05-15 16:43:34 +0000
commitc02daa97546d19e63fd688653bb7d0da946b6eae (patch)
tree55f1a41dd465a27e6a77a5338b03b0c9a62c583a /dev-lang/qu-prolog
parentgames-strategy/freeciv: 2.6.4 version bump (diff)
downloadgentoo-c02daa97546d19e63fd688653bb7d0da946b6eae.tar.gz
gentoo-c02daa97546d19e63fd688653bb7d0da946b6eae.tar.bz2
gentoo-c02daa97546d19e63fd688653bb7d0da946b6eae.zip
dev-lang/qu-prolog: compiler-portable CXXFLAGS check. Closes 766072
Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Keri Harris <keri@gentoo.org>
Diffstat (limited to 'dev-lang/qu-prolog')
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-10.x-compiler-flags.patch18
-rw-r--r--dev-lang/qu-prolog/qu-prolog-10.6.ebuild1
2 files changed, 19 insertions, 0 deletions
diff --git a/dev-lang/qu-prolog/files/qu-prolog-10.x-compiler-flags.patch b/dev-lang/qu-prolog/files/qu-prolog-10.x-compiler-flags.patch
new file mode 100644
index 000000000000..3d07947a4977
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-10.x-compiler-flags.patch
@@ -0,0 +1,18 @@
+--- qp10.6.orig/configure.in 2020-06-24 23:37:02.000000000 -0000
++++ qp10.6/configure.in 2021-05-15 16:36:32.504585122 -0000
+@@ -228,9 +228,12 @@
+ #-----------------------------------------------------------------------------
+ dnl Check for -fno-strict-aliasing
+ AC_MSG_CHECKING([for -fno-strict-aliasing])
+-echo "int i;" > aliasing_test.cc
+-qp_alias=[`gcc -fno-strict-aliasing -c aliasing_test.cc`]
+-rm aliasing_test.*
++ac_saved_cflags=$[]_AC_LANG_PREFIX[]FLAGS
++_AC_LANG_PREFIX[]FLAGS="-Werror -fno-strict-aliasing"
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])],
++ [qp_alias=""],
++ [qp_alias="not-found"])
++_AC_LANG_PREFIX[]FLAGS="$ac_saved_cflags"
+ if test -n "$qp_alias"; then
+ AC_MSG_RESULT(not found)
+ GCC_ALIAS_FLAG=
diff --git a/dev-lang/qu-prolog/qu-prolog-10.6.ebuild b/dev-lang/qu-prolog/qu-prolog-10.6.ebuild
index 31053be8494f..2cbbe5135522 100644
--- a/dev-lang/qu-prolog/qu-prolog-10.6.ebuild
+++ b/dev-lang/qu-prolog/qu-prolog-10.6.ebuild
@@ -35,6 +35,7 @@ S="${WORKDIR}"/${MY_P}
src_prepare() {
eapply "${FILESDIR}"/${PN}-10.x-qt5.patch
+ eapply "${FILESDIR}"/${PN}-10.x-compiler-flags.patch
eapply_user
eautoconf