summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2021-06-27 10:31:50 +0000
committerKeri Harris <keri@gentoo.org>2021-06-27 10:32:23 +0000
commit918deb652c7cb034028f941af502ef6b8334b380 (patch)
tree99ac17e3c0679d2b1c615553d92268a2da53063f /dev-lang
parentmedia-sound/chuck: bump to 1.4.1.0 (diff)
downloadgentoo-918deb652c7cb034028f941af502ef6b8334b380.tar.gz
gentoo-918deb652c7cb034028f941af502ef6b8334b380.tar.bz2
gentoo-918deb652c7cb034028f941af502ef6b8334b380.zip
dev-lang/gprolog: use clang as assembler for LLVM toolchains
Closes http://bugs.gentoo.org/737072 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Keri Harris <keri@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch38
-rw-r--r--dev-lang/gprolog/gprolog-1.4.5.ebuild10
2 files changed, 47 insertions, 1 deletions
diff --git a/dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch b/dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch
new file mode 100644
index 000000000000..6adc8feb2720
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch
@@ -0,0 +1,38 @@
+--- gprolog-1.4.5.orig/src/configure.in 2018-07-14 08:19:12.000000000 -0000
++++ gprolog-1.4.5/src/configure.in 2021-06-27 10:13:31.004977355 -0000
+@@ -334,15 +334,26 @@
+ dnl we use AS0 instead of AS else AC_CHECK_TOOL does not work
+ dnl (instead of testing a prefix like x86_64-w64-mingw32- it will
+ dnl think the user wants to override the test)
+- AS0=as
+- case "$host" in
+- sparc64*bsd*) ASFLAGS='-Av9a -64 -K PIC';;
+- i*86*darwin1*) ASFLAGS='-arch i686';;
+- i*86*linux*) ASFLAGS='--32';;
+- x86_64*solaris*) AS0=gas; ASFLAGS='--64';;
+- x86_64*darwin*) ASFLAGS='-arch x86_64';;
+- x86_64*linux*) ASFLAGS='--64';;
+- *) if test "$with_gas" = yes; then AS0=gas; fi;;
++ case "$CC" in
++ *cc)
++ AS0=as
++ case "$host" in
++ sparc64*bsd*) ASFLAGS='-Av9a -64 -K PIC';;
++ i*86*darwin1*) ASFLAGS='-arch i686';;
++ i*86*linux*) ASFLAGS='--32';;
++ x86_64*solaris*) AS0=gas; ASFLAGS='--64';;
++ x86_64*darwin*) ASFLAGS='-arch x86_64';;
++ x86_64*linux*) ASFLAGS='--64';;
++ *) if test "$with_gas" = yes; then AS0=gas; fi;;
++ esac
++ ;;
++ *clang)
++ AS0=$CC
++ ASFLAGS='-c'
++ ;;
++ *)
++ AC_MSG_ERROR([unsupported compiler $CC])
++ ;;
+ esac
+ AC_CHECK_TOOL([AS],[$AS0])
+ AC_PROG_RANLIB
diff --git a/dev-lang/gprolog/gprolog-1.4.5.ebuild b/dev-lang/gprolog/gprolog-1.4.5.ebuild
index 5892e1fbf171..46ecd24130e8 100644
--- a/dev-lang/gprolog/gprolog-1.4.5.ebuild
+++ b/dev-lang/gprolog/gprolog-1.4.5.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit flag-o-matic toolchain-funcs
+inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="A native Prolog compiler with constraint solving over finite domains (FD)"
HOMEPAGE="http://www.gprolog.org/"
@@ -21,8 +21,16 @@ PATCHES=(
"${FILESDIR}"/${P}-nodocs.patch
"${FILESDIR}"/${P}-txt-file.patch
"${FILESDIR}"/${P}-check-boot.patch
+ "${FILESDIR}"/${P}-llvm-as.patch
)
+src_prepare() {
+ default
+
+ cd "${S}"/src
+ eautoconf
+}
+
src_configure() {
CFLAGS_MACHINE="`get-flag -march` `get-flag -mcpu` `get-flag -mtune`"