xpcom/reflect/xptcall/md/unix fails with x86_64-pc-linux-gnu-as: invalid option -- 'N' when AS is set
Categories
(Core :: XPCOM, defect, P5)
Tracking
()
People
(Reporter: whissi, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
When you set AS environment variable to specify used assembler, build will fail in
0:48.09 gmake[4]: Entering directory '/var/tmp/portage/www-client/firefox-78.0.2/work/firefox-78.0.2/ff/xpcom/reflect/xptcall/md/unix'
0:48.09 xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.o
0:48.09 /usr/bin/x86_64-pc-linux-gnu-as -o xptcinvoke_asm_x86_64_unix.o -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -fPIC -Wa,--noexecstack -include /var/tmp/portage/www-client/firefox-78.0.2/work/firefox-78.0.2/ff/mozilla-config.h -DMOZILLA_CLIENT -I/var/tmp/portage/www-client/firefox-78.0.2/work/firefox-78.0.2/xpcom/reflect/xptcall -c /var/tmp/portage/www-client/firefox-78.0.2/work/firefox-78.0.2/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S
0:48.09 /usr/bin/x86_64-pc-linux-gnu-as: invalid option -- 'N'
0:48.09 gmake[4]: *** [/var/tmp/portage/www-client/firefox-78.0.2/work/firefox-78.0.2/config/rules.mk:743: xptcinvoke_asm_x86_64_unix.o] Error 1
Reporter | ||
Comment 1•4 years ago
|
||
Looks like a regression caused by bug 1319222 (https://hg.mozilla.org/mozilla-central/rev/8e89b51b7f40).
Comment 2•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 3•4 years ago
|
||
I'm inclined to say this is not actually a bug; if you set AS
to something that's not CC
on Unix, I think you're going to have problems no matter what.
Comment 4•4 years ago
|
||
You are using AS
variable in non-standard way.
Normally AS
variable references assembler itself, not C compiler used for assembling.
You should use CCAS
variable for C compiler used for assembling (and CCASFLAGS
for options passed thereto).
(Or you could use CXXAS
and CXXASFLAGS
, if you need C++ compiler for assembling.)
See:
https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html ("Assembling and preprocessing assembler programs" section)
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ("AS" section)
https://www.gnu.org/software/automake/manual/html_node/Assembly-Support.html
Comment 5•4 years ago
|
||
The great thing about standards is that there are so many of them. :) (Note that we don't use implicit rules or automake.)
If people wanted to write a patch, we'd consider taking it, but we are not going to fix this ourselves, because I don't think it's particularly broken.
Description
•