Merge pull request #115314 from viric/firefox-i686-linux

Allow firefox building in 32-bit systems
This commit is contained in:
Bernardo Meurer 2021-03-08 04:31:07 +00:00 committed by GitHub
commit e52507aeac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@
, ffmpegSupport ? true
, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook
, waylandSupport ? true, libxkbcommon
, ltoSupport ? stdenv.isLinux, overrideCC, buildPackages
, ltoSupport ? (stdenv.isLinux && stdenv.is64bit), overrideCC, buildPackages
, gssSupport ? true, kerberos
, pipewireSupport ? waylandSupport && webrtcSupport, pipewire
@ -111,6 +111,13 @@ let
else stdenv;
nss_pkg = if lib.versionOlder ffversion "83" then nss_3_53 else nss;
# --enable-release adds -ffunction-sections & LTO that require a big amount of
# RAM and the 32-bit memory space cannot handle that linking
# We also disable adding "-g" for easier linking
releaseFlags = if stdenv.is32bit
then [ "--disable-release" "--disable-debug-symbols" ]
else [ "--enable-release" ];
in
buildStdenv.mkDerivation ({
@ -296,9 +303,9 @@ buildStdenv.mkDerivation ({
++ lib.optional drmSupport "--enable-eme=widevine"
++ (if debugBuild then [ "--enable-debug" "--enable-profiling" ]
else [ "--disable-debug" "--enable-release"
else ([ "--disable-debug"
"--enable-optimize"
"--enable-strip" ])
"--enable-strip" ] ++ releaseFlags))
++ lib.optional enableOfficialBranding "--enable-official-branding"
++ extraConfigureFlags;