Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 May 2017 05:55:17 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Michal Meloun <mmel@freebsd.org>
Cc:        freebsd-arm@freebsd.org, ports@freebsd.org
Subject:   Re: www/firefox, Error: garbage following instruction...was: Re: RPI2, www/firefox, error: "NEON support not enabled"
Message-ID:  <r2zy-y996-wny@FreeBSD.org>
In-Reply-To: <7306a091-1350-d6cb-b329-c56f2d80c0bf@freebsd.org> (Michal Meloun's message of "Mon, 8 May 2017 13:08:46 %2B0200")
References:  <20170505151339.GA51255@www.zefox.net> <962F9C0D-C7C8-4940-A381-B3097FD2A138@dsl-only.net> <20170505182838.GB51255@www.zefox.net> <078B736E-4807-42C7-B6A5-656F3A50DAEB@dsl-only.net> <20170505230106.GA52464@www.zefox.net> <C2340D34-1A84-42CD-ADD5-FA5D5ADD553F@dsl-only.net> <20170506050140.GA54543@www.zefox.net> <20170508033331.GA61772@www.zefox.net> <80D06D70-8534-456C-A66F-CDD4CE0D5811@FreeBSD.org> <7306a091-1350-d6cb-b329-c56f2d80c0bf@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Michal Meloun <melounmichal@gmail.com> writes:

> On 08.05.2017 10:56, Dimitry Andric wrote:
>
>> On 8 May 2017, at 05:33, bob prohaska <fbsd@www.zefox.net> wrote:
>>>
>>> On Fri, May 05, 2017 at 10:01:40PM -0700, bob prohaska wrote:
>>>> It appears that using
>>>> make CFLAGS='-mcpu=cortex-a7'
>>>> is sufficient to get past the NEON not enabled  error.
>>>>
>>>
>>> The next problem appears to be
>>>
>>>
>>>
> /usr/ports/www/firefox/work/firefox-53.0.2/media/openmax_dl/dl/sp/src/armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.S:335:
> Error: garbage following instruction -- `vmov Q7.F32,Q0.F32'
>>> cc: error: assembler command failed with exit code 1 (use -v to see
> invocation)
>>> gmake[6]: ***
> [/usr/ports/www/firefox/work/firefox-53.0.2/config/rules.mk:990:
> armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.o] Error 1
>>> gmake[5]: ***
> [/usr/ports/www/firefox/work/firefox-53.0.2/config/recurse.mk:71:
> media/openmax_dl/dl/target] Error 2
>>>
>>> Is this worth a bug report, or is firefox too far over the horizon
>>> for freebsd-arm?
>>>
>>> Thanks for reading, and any guidance.
>>
>> This is actually an error message from the GNU assembler, which is
>> invoked by the compiler driver.  Can you figure out whether it is the
>> base version (/usr/bin/as) or the ports version (/usr/local/bin/as)?
>> E.g. manually run that command line with -v, so see which assembler it
>> runs.
>>
>> Also, I wonder why they don't use the integrated assembler in clang, but
>> that is an aspect of the firefox port I'm not familiar with.
>>
>> -Dimitry
>>
> It's from base (buggy, outdated) GNU assembler, gas from ports can
> compile affected file without problem.
>
> The integrated clang assembler cannot be used because Mozilla extensive
> uses macros in assembly code, and macros are not supported by clang.

Upstream commit suggests otherwise.

https://android.googlesource.com/platform/external/chromium_org/third_party/openmax_dl/+/5d8507771824%5E%21/

> Moreover, many pieces of assembly files still uses pre-UAL syntax.
>
> Unfortunately, replacing base as (by the one from port) is not
> sufficient - the Mozilla build system doesn't pass external CFLAGS to
> assembly files (.S), so build fails again later.

Do you mean ASFLAGS are unused, so the following wouldn't help?

Index: Mk/bsd.gecko.mk
===================================================================
--- Mk/bsd.gecko.mk	(revision 440464)
+++ Mk/bsd.gecko.mk	(working copy)
@@ -475,6 +475,10 @@ USE_BINUTILS=	# intel-gcm.s
 CFLAGS+=	-B${LOCALBASE}/bin
 LDFLAGS+=	-B${LOCALBASE}/bin
 . endif
+.elif ${ARCH:Marm*}
+USE_BINUTILS=	# media/openmax_dl/
+MOZ_EXPORT+=	ASFLAGS="${ASFLAGS}"
+ASFLAGS+=	-B${LOCALBASE}/bin
 .elif ${ARCH:Mpowerpc*}
 USES:=		compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*}
 . if ${ARCH} == "powerpc64"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?r2zy-y996-wny>