app-emulation/dosemu: don't use 'as' to test assembler, bug #722176
authorSergei Trofimovich <slyfox@gentoo.org>
Fri, 22 May 2020 17:23:50 +0000 (18:23 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Fri, 22 May 2020 17:24:00 +0000 (18:24 +0100)
Instead of probing for 'as' use '$CC'. Build system uses '$CC'
to compile '.S' files.

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/722176
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-as.patch [new file with mode: 0644]

index f25169144560ab44cc8598d1aa9696e06de83fbd..c7771af9cd8f52790a288eac0eb9cbe173cea8b0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2002-2019 Gentoo Authors
+# Copyright 2002-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -55,6 +55,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-ia16-ldflags.patch
        "${FILESDIR}"/${P}-fix-inline.patch
        "${FILESDIR}"/${P}-lto.patch
+       "${FILESDIR}"/${P}-as.patch
 )
 
 src_prepare() {
@@ -97,6 +98,7 @@ src_configure() {
 }
 
 src_compile() {
+       # src/makefile.common is fritten manually, uses AR=ar
        emake AR=$(tc-getAR)
 }
 
diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-as.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-as.patch
new file mode 100644 (file)
index 0000000..2db3048
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -503,8 +503,7 @@ dnl CPU emulator
+    AC_MSG_NOTICE(Compiling for native x86...);
+   fi
+-
+-if ! echo '.code16;.text;addr32 pushw 4(%esp)' | as -o dummy.o >/dev/null 2>&1; then
++if ! echo '.code16;.text;addr32 pushw 4(%esp)' | $CC -c -x assembler -o dummy.o - >/dev/null 2>&1; then
+   echo ''
+   echo '*** error:'
+   echo '*** Your system has no complete code16 functional gas,'