Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

remove the gnu-as dependency of firefox #43

Closed
wants to merge 1 commit into from
Closed

remove the gnu-as dependency of firefox #43

wants to merge 1 commit into from

Conversation

gottaeat
Copy link
Contributor

@gottaeat gottaeat commented Aug 5, 2021

the gnu-as requirement of firefox comes from nss' freebl (security/nss/lib/freebl), due to it forcing -no-integrated-as when it detects clang as CC.

the patch included removes these forced flags as current clang's (tested with 12.0.1) assembler can assemble all the assembler sources included in nss.

i have tried this with firefox 78.12.0esr, but because it's about nss and not firefox itself it should also apply and build on current firefox as well.

more info can be found here.

edit1 here are the other mentions of -fno-integrated-as/-no-integrated-as in 90.0.2 just in case, they seem to be present in current esr as well so i don't think they'll be problematic because with just this patch and a configuration similar to yours component-wise, i am able to build esr w/o gas:

./xpcom/reflect/xptcall/md/unix/moz.build:                "-fno-integrated-as",
./xpcom/reflect/xptcall/md/unix/moz.build:                "-fno-integrated-as",
./xpcom/reflect/xptcall/md/unix/moz.build:                "-fno-integrated-as",
./xpcom/reflect/xptcall/md/unix/moz.build:                "-fno-integrated-as",
./gfx/cairo/libpixman/src/moz.build:            '-no-integrated-as',
./gfx/cairo/libpixman/src/moz.build:    # -no-integrated-as), and they contain `.obj
./python/mozbuild/mozbuild/test/frontend/data/asflags/moz.build:ASFLAGS += ["-no-integrated-as"]
./python/mozbuild/mozbuild/test/frontend/test_emitter.py:        self.assertEqual(asflags.flags["MOZBUILD"], ["-no-integrated-as"])
./third_party/libwebrtc/webrtc/build/config/nacl/BUILD.gn:    # -no-integrated-as is the default in nacl-clang for historical
./media/openmax_dl/dl/moz.build:            '-no-integrated-as',
./media/libtheora/moz.build:                '-no-integrated-as',
./media/libjpeg/moz.build:                '-fno-integrated-as',

@konimex
Copy link
Member

konimex commented Aug 5, 2021

Since sed calls should be sufficient, I've implemented this: 0bc4c45, I will submit this to Dylan of course.

Also, if you don't mind, I can submit your patch to Bugzilla to get it upstream. With full credits of course.

@konimex konimex closed this Aug 5, 2021
@konimex
Copy link
Member

konimex commented Aug 5, 2021

Also just saw your edit re: mentions of -no-integrated-as, but yeah just by removing it in nss the build ran smoothly. It seems it's only added for non-x86_64 (e.g. mips) architecture.

@gottaeat
Copy link
Contributor Author

gottaeat commented Aug 6, 2021

Since sed calls should be sufficient, I've implemented this: 0bc4c45, I will submit this to Dylan of course.

you know your packaging style more than i do.

just by removing it in nss the build ran smoothly.

happy to hear that it's reproducible in your distribution as well.

Also, if you don't mind, I can submit your patch to Bugzilla to get it upstream. With full credits of course.

i thought about doing that myself initially but 9 out of 10 times the bug reports and fixes sit unattended for months on end until some big name comes in and re-reports the same thing, so feel free to do submit them, fine by me.

though keep in mind that i only tried this with llvm 12.0.1 and 13.0.0-rc1, i don't know if previous clang's can achieve the same w/o needing gas. would be nice if this can get in the in tree nss of the upcoming 91esr.

@konimex
Copy link
Member

konimex commented Aug 6, 2021

but 9 out of 10 times the bug reports and fixes sit unattended for months on

Yep. That's pretty much on brand for Mozilla alright. Been there when the libc++ error happened in Firefox 70-ish.

Added https://bugzilla.mozilla.org/show_bug.cgi?id=1724353.

@gottaeat
Copy link
Contributor Author

gottaeat commented Aug 6, 2021

Been there when the libc++ error happened in Firefox 70-ish.

lol i also reported that, twice even, once when the first llvm 12 release candidate got pushed and when the thing actually got released for the second time. then the gentoo people came in and in the snap of a second the thing got fixed. i think my report is still open unanswered.

Added https://bugzilla.mozilla.org/show_bug.cgi?id=1724353.

following, tyvm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants