Closed Bug 1514781 (build-gcc-9) Opened 5 years ago Closed 3 years ago

[meta] Build with gcc 9


(Developer Infrastructure :: Source Code Analysis, task, P3)


(Not tracked)



(Reporter: Sylvestre, Unassigned)


(Depends on 4 open bugs, Blocks 1 open bug)


(Keywords: meta)

+++ This bug was initially created as a clone of Bug #1409283 +++

Using Debian temporary packages available here:
(should be uploaded soon)
Depends on: 1514782
Depends on: 1515287
Alias: build-gcc-9
Depends on: 1515296
Depends on: 1515356
With the following options (not a perfect list), I am able to build fx with gcc 9:
export CXXFLAGS="-Wno-error=class-memaccess -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-stringop-overflow -Wno-error=attributes -Wno-error=deprecated-copy -Wno-error=pessimizing-move"
export CFLAGS="-Wno-error=class-memaccess -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-stringop-overflow"
Depends on: 1516758
I have got first LTO/PGO build with GCC 9 working today using the official try server

I am now going to resolve some performance issues that shows up without PGO (due to somewhat crazy flags) but with PGO+LTO performance and code size looks good if one replaces Skia by clang version. Skia contains some hand written vector code that is using Clang only extensions

I am in contact with Skia maintainers and plan to port 

I ended up disabling following warings in addition to ones disabled for GCC 8:
-Wno-error=stringop-overflow (I reported log to bug 1514782), -Wno-error=deprecated-copy (log reported to bug 1517230), stringop-truncation (log reported to bug 1517225), -Wno-error=pesimizing-move (log reported to bug 1517220) and removed alloc size attribute (bug 1517212), -Wno-error=type-limits.

I realize that some of the bugs are duplicates of bugs here because i did not know of this tracking bug. I will try to merge them and submit some patches where fix is easy.
Depends on: 1517212
Depends on: 1517209
Depends on: 1517220
Depends on: 1521391
Depends on: 1524194
Priority: -- → P3

Update of comment #1:
I need the following to build with gcc 9:

export CXXFLAGS="-Wno-error=class-memaccess -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-stringop-overflow -Wno-error=attributes -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=type-limits -Wno-error=deprecated"
export CFLAGS="-Wno-error=class-memaccess -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-stringop-overflow -Wno-error=type-limits  -Wno-error=deprecated"
Depends on: 1578031

Depends on: 1601707

Depends on: 1601707
Blocks: 1601903
See Also: → build-gcc-10
Depends on: 1611635
Depends on: 1613395
Depends on: 1620267
Depends on: 1650113
Depends on: 1666108
Depends on: 1669092
See Also: → build-gcc-11
Type: enhancement → task
Closed: 3 years ago
Resolution: --- → FIXED
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.