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>
-# Copyright 2002-2019 Gentoo Authors
+# Copyright 2002-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
"${FILESDIR}"/${P}-ia16-ldflags.patch
"${FILESDIR}"/${P}-fix-inline.patch
"${FILESDIR}"/${P}-lto.patch
+ "${FILESDIR}"/${P}-as.patch
)
src_prepare() {
}
src_compile() {
+ # src/makefile.common is fritten manually, uses AR=ar
emake AR=$(tc-getAR)
}
--- /dev/null
+--- 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,'