Skip to content

firefox: remove hard clang dependency#990

Open
OldManYellsAtCloud wants to merge 2 commits into
OSSystems:masterfrom
OldManYellsAtCloud:master
Open

firefox: remove hard clang dependency#990
OldManYellsAtCloud wants to merge 2 commits into
OSSystems:masterfrom
OldManYellsAtCloud:master

Conversation

@OldManYellsAtCloud
Copy link
Copy Markdown
Collaborator

TBH I don't remember anymore why I made initially Firefox require clang, unfortunately it was too long time ago.
But today I was curious if gcc works - and it does, it required only a minor patch.

This PR removes the hardcoded clang dependency from the Firefox recipe.

After this clang is only required if Firefox is built with sandboxed libraries enabled (this is the default, and can be changed with a PACKAGECONFIG. This is due to wasi-sdk having a hard dependency on clang)

When built without sandboxed libraries, clang can be avoided completely (at least from Firefox's point of view).

So far I tested successfully Scarthgap with glibc on x86-64, with both versions of Firefox. The rest of the test is left to the CI.

@OldManYellsAtCloud OldManYellsAtCloud force-pushed the master branch 3 times, most recently from a76fb56 to dac0bab Compare May 29, 2026 19:48
Firefox compiles with gcc - remove the hardcoded clang dependency.

New patches

freebl-ignore-unused-arguments-during-configure.patch:
A component is trying to remove some gcc warnings. OE adds
-Wformat-security by default, but the component also adds -Wno-format, which
cancels it out, but generates a warning (which is turned into an error):

cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]

To avoid this, the patch adds also -Wno-format-security explicitly.

msgpack-enforce-endian-functionality.patch:
Using gcc, the msgpack third party application can't determine the endianness
of risc-v arch (at least not for qemuriscv64), failing the build. This issue
has been fixed upstream a while ago, but not pulled into Firefox yet. This
patch is a backport of that commit.

llama.cpp-unknown-type-name-__fp16.patch:
On 32-bit arm fp16 isn't defined by default. Added a patch taken from
https://stackoverflow.com/questions/31242106/fp16-type-undefined-in-gnu-arm-c

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
The PARALLEL_MAKE OE variable has been ignored until now, Firefox
was built with the number of jobs determined by mach (which is usually
the number of CPU cores).

To be able to control this number, pass the PARALLEL_MAKE variable value
as a custom make flag to mach.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant