Commit Graph

935 Commits

Author SHA1 Message Date
Cosmin Sabou
c8c7e83a77 Backed out 2 changesets (bug 1854047, bug 1839739) for causing build bustages. CLOSED TREE
Backed out changeset 3fb508020251 (bug 1854047)
Backed out changeset 056fe66a8b3f (bug 1839739)
2023-10-04 03:34:26 +03:00
Mike Hommey
26cd3f8040 Bug 1839739 - Default to lld in more cases on Linux. r=firefox-build-system-reviewers,geckoview-reviewers,releng-reviewers,andi,gbrown,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D188676
2023-10-04 00:06:57 +00:00
Mike Hommey
7ff7508830 Bug 1855568 - Ensure that .relr.plt follows and is adjacent to .rel.dyn. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D189894
2023-10-03 23:44:51 +00:00
Mike Hommey
1ab55a66d5 Bug 1855568 - Refactor how the PT_DYNAMIC info is collected. r=sergesanspaille
We're soon going to collect a little more, and the current way of doing
so is not super convenient.

Differential Revision: https://phabricator.services.mozilla.com/D189893
2023-10-03 23:44:50 +00:00
Mike Hommey
00ffd5e017 Bug 1855568 - Refactor writes in relrhack. r=sergesanspaille
In a manner similar to what's done for reads.

Differential Revision: https://phabricator.services.mozilla.com/D189892
2023-10-03 23:44:50 +00:00
serge-sans-paille
974e37adf9 Bug 1855955 - Remove useless <iostream> includes r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189648
2023-09-29 14:15:53 +00:00
Narcis Beleuzu
1915d07f5c Backed out 2 changesets (bug 1854047, bug 1839739) for causing bug 1855568. CLOSED TREE
Backed out changeset 2b3b967b6571 (bug 1854047)
Backed out changeset f957fe22f28e (bug 1839739)
2023-09-29 11:13:56 +03:00
Mike Hommey
f69ca7a50d Bug 1854519 - Enable rlbox sandboxing in base-toolchain tasks. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D189321
2023-09-28 20:56:31 +00:00
Mike Hommey
5dacba3398 Bug 1839739 - Default to lld in more cases on Linux. r=firefox-build-system-reviewers,geckoview-reviewers,releng-reviewers,andi,gbrown,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D188676
2023-09-25 22:58:28 +00:00
Mike Hommey
a6de9f8d22 Bug 1854497 - In elfhack checks, don't look for parens. r=firefox-build-system-reviewers,ahochheiden
Old versions of llvm-readelf didn't have parens in its output for `-d`.
So instead of looking for parens, look for word boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D188897
2023-09-22 02:28:00 +00:00
Mike Hommey
d8bb87469e Bug 1854303 - Apply the PT_DYNAMIC tag changes properly. r=firefox-build-system-reviewers,ahochheiden
They are supposed to be applied unconditionally, not only when there is
a GLIBC_ABI_DT_RELR version in the libc.

Differential Revision: https://phabricator.services.mozilla.com/D188894
2023-09-22 02:23:54 +00:00
Mike Hommey
b50fd4bf85 Bug 1854052 - Don't build elfhack tests when building with relrhack. r=firefox-build-system-reviewers,andi
They are not useful (and the corresponding Makefile doesn't use them
anyways, so they're built for nothing).

Differential Revision: https://phabricator.services.mozilla.com/D188679
2023-09-20 22:01:37 +00:00
Sandor Molnar
e22ad0a522 Bug 1850867 - Fix android bustages. a=fix 2023-09-19 07:52:45 +03:00
Mike Hommey
c8bc3a7c87 Bug 1850867 - Add relrhack support for Android. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D188410
2023-09-19 04:32:17 +00:00
Mike Hommey
90c8c29f23 Bug 1839740 - New relrhack tool, a modern replacement to elfhack. r=firefox-build-system-reviewers,sergesanspaille
Elfhack is the main reason we're not using lld on Linux/Android
shippable builds, because the way it works doesn't go well with how lld
lays out ELF binaries. By leveraging the linker itself (BFD and lld both
having recently gained the ability to generate the compact relocation
info themselves), we can achieve a similar result to what elfhack is
doing, while allowing to use lld.

See more in-depth background on https://glandium.org/blog/?p=4297

Differential Revision: https://phabricator.services.mozilla.com/D187089
2023-09-16 19:52:25 +00:00
Mike Hommey
1da6d16d6d Bug 1839740 - Rename the symbol by elfhack to point to the ELF header. r=firefox-build-system-reviewers,andi
Elfhack acts as a linker, and it uses the `elf_header` symbol to point
at the ELF header in the injected code that applies relocations.
Both GNU ld and lld expose a `__ehdr_start` symbol with the same meaning,
so rename the `elf_header` symbol for compatibility. This will allow to
reuse the code in the upcoming replacement for elfhack.

Differential Revision: https://phabricator.services.mozilla.com/D187088
2023-09-16 19:52:25 +00:00
Mike Hommey
198651d478 Bug 1852646 - Always enable crash-diagnostics-dir on automation. r=firefox-build-system-reviewers,nalexander
Now that the minimum supported version of clang is 7, we don't need to
exclude clang < 7.

Differential Revision: https://phabricator.services.mozilla.com/D187946
2023-09-12 20:33:27 +00:00
Logan Rosen
f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Mike Hommey
b1f3975f1d Bug 1839741 - Upgrade binutils to 2.41. r=firefox-build-system-reviewers,ahochheiden
Because it bumps the alignment requirement on aarch64, we make the
elfhack test create more relocations to make the .rela.dyn section large
enough for the test to pass.

Differential Revision: https://phabricator.services.mozilla.com/D181684
2023-09-01 01:20:34 +00:00
Mike Hommey
e6e7f961ea Bug 1841212 - Build elfhack injected code without eh_frame. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D182542
2023-06-30 08:11:43 +00:00
Mike Hommey
e4f87a6d8c Bug 1840931 - More properly handle files > 4GB in elfhack. r=gsvelto
I'm pretty sure there are other theoretical problems in the code,
notably when a single section is larger than 4GB, but by the time
we reach that limit, bug 1839740 will have been fixed.

Differential Revision: https://phabricator.services.mozilla.com/D182447
2023-06-29 19:56:20 +00:00
Mike Hommey
01b58f59f2 Bug 1839746 - Make elfhack generate and handle a more standard SHT_RELR section. r=gsvelto
Bug 1747782 changed the format to SHT_RELR, but what's produced is still
different from a real SHT_RELR section, because it uses a terminating
nul entry.

Differential Revision: https://phabricator.services.mozilla.com/D181689
2023-06-22 23:56:47 +00:00
Cristian Tuns
a6383b5dce Backed out changeset 7a6650647e00 (bug 1839741) to fix bug 1839797 CLOSED TREE 2023-06-22 02:32:20 -04:00
Mike Hommey
c144be0f2e Bug 1839748 - Remove unnecessary sysctl.h includes. r=firefox-build-system-reviewers,ahochheiden
The header is gone in recent glibc versions.

Differential Revision: https://phabricator.services.mozilla.com/D181695
2023-06-22 02:45:22 +00:00
Mike Hommey
f305d07229 Bug 1839741 - Upgrade binutils to 2.40. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D181684
2023-06-22 02:44:24 +00:00
Mike Hommey
d7e5217ede Bug 1838328 - Add a trampoline to call original_init when it's not possible directly, aarch64 edition. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D180901
2023-06-14 08:49:14 +00:00
Mike Hommey
e97e5246fd Bug 1834436 - Upgrade minimum supported GCC version to 8. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D178736
2023-06-01 20:09:19 +00:00
Ryan VanderMeulen
bd25a9e6ea Bug 1835676 - Update gcc11 to version 11.4. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D179374
2023-05-29 21:07:56 +00:00
Mike Hommey
76df0cfce2 Bug 1820876 - Update NDK to r23c. r=firefox-build-system-reviewers,nalexander
Wrench android builds had been kept on rustc 1.67 waiting for this
upgrade.

Differential Revision: https://phabricator.services.mozilla.com/D172089
2023-03-23 22:18:09 +00:00
Stanca Serban
7c5ebbcf74 Backed out changeset df6f338d6a26 (bug 1820876) for causing build bustages on Android Shippable. CLOSED TREE 2023-03-23 14:13:08 +02:00
Mike Hommey
1f158eae92 Bug 1820876 - Update NDK to r23c. r=firefox-build-system-reviewers,nalexander
Wrench android builds had been kept on rustc 1.67 waiting for this
upgrade.

Differential Revision: https://phabricator.services.mozilla.com/D172089
2023-03-23 01:27:51 +00:00
Mike Hommey
eaca1f3dd4 Bug 1820947 - Use "new style" sysroot on Android. r=firefox-build-system-reviewers,andi
For a few NDK releases now, the situation has been simplified wrt
headers and libraries, and while we're currently still using things here
and there because we never changed our ways, we can simplify things a
lot by using the new simplified things. This involves:
- Using a --target that contains the Android version, making clang set
  __ANDROID_API__ itself, and makes it look in $sysroot/usr/lib/$target/$ver
  when linking.
- Using the sysroot that is under toolchains/llvm/prebuilt/*.
- Removing the hacks around libstdc++/libc++.

This ends up emptying stlport compiler flags, which allows to remove a
bunch of things.

Differential Revision: https://phabricator.services.mozilla.com/D172039
2023-03-15 20:44:02 +00:00
Norisz Fay
4a35828e21 Backed out 2 changesets (bug 1820947) for causing build bustage CLOSED TREE
Backed out changeset eb6419bb8748 (bug 1820947)
Backed out changeset 9990083e8ea2 (bug 1820947)
2023-03-14 01:20:54 +02:00
Mike Hommey
f5844f16c5 Bug 1820947 - Use "new style" sysroot on Android. r=firefox-build-system-reviewers,andi
For a few NDK releases now, the situation has been simplified wrt
headers and libraries, and while we're currently still using things here
and there because we never changed our ways, we can simplify things a
lot by using the new simplified things. This involves:
- Using a --target that contains the Android version, making clang set
  __ANDROID_API__ itself, and makes it look in $sysroot/usr/lib/$target/$ver
  when linking.
- Using the sysroot that is under toolchains/llvm/prebuilt/*.
- Removing the hacks around libstdc++/libc++.

This ends up emptying stlport compiler flags, which allows to remove a
bunch of things.

Differential Revision: https://phabricator.services.mozilla.com/D172039
2023-03-13 21:14:47 +00:00
Andi-Bogdan Postelnicu
d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
serge-sans-paille
60efed7f68 Bug 1466973 - Strip gcc binaries r=glandium
This reduces the archive size while keeping the compiler functional. This should not impact the quality of debug information of the compiled files
The size reduction is significant: from 236MB down to48MB.

Differential Revision: https://phabricator.services.mozilla.com/D167706
2023-01-27 21:14:34 +00:00
Mike Hommey
d43dfe4d11 Bug 1806761 - Use toolchain binutils in base-toolchain builds. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D165326
2022-12-28 21:07:04 +00:00
Heitor Neiva
b71d7b535b Bug 1801381 - Disable run_configure for mac repackaging r=glandium
Switches from `buildconfig.substs` to `bootstrap_toolchain` for the repackage job
Refactors mozpack/dmg to not depend on the environment; Moves path resolution of tools up to `mozbuild.action.{make_dmg|unpack_dmg}`
Update syntax to python 3.7+

Differential Revision: https://phabricator.services.mozilla.com/D163129
2022-12-06 21:11:43 +00:00
Norisz Fay
1235811770 Backed out changeset 632f9747a11e (bug 1801381) for causing build bustages on OSX. CLOSED TREE 2022-12-01 12:01:04 +02:00
Heitor Neiva
c502d9c55b Bug 1801381 - Disable run_configure for mac repackaging r=glandium
Switches from `buildconfig.substs` to `bootstrap_toolchain` for the repackage job
Refactors mozpack/dmg to not depend on the environment; Moves path resolution of tools up to `mozbuild.action.{make_dmg|unpack_dmg}`
Update syntax to python 3.7+

Differential Revision: https://phabricator.services.mozilla.com/D163129
2022-12-01 01:29:27 +00:00
Marco Castelluccio
ecb54845b0 Bug 1790816 - Reformat build/ with isort. r=linter-reviewers,ahal DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162668
2022-11-24 17:23:47 +00:00
Mike Hommey
3ff4ecb3f8 Bug 1798602 - Include mozconfig.linux in linux tsan mozconfig. r=decoder
The main side effect is that it enables lld on those builds.

Differential Revision: https://phabricator.services.mozilla.com/D160993
2022-11-02 08:05:03 +00:00
Jesse Schwartzentruber
0d6c077bea Bug 1779845 - Don't rewrite macos executables. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D151961
2022-07-27 15:09:27 +00:00
Mike Hommey
721c5e9fb4 Bug 1771434 - Remove build/unix/mozilla.in. r=firefox-build-system-reviewers,andi,ahochheiden
Its use was removed from Firefox in bug 552864, in Thunderbird in bug 668869
and in Seamonkey in bug 722262. That was 10 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D147484
2022-05-27 08:22:13 +00:00
Mike Hommey
b798bb1980 Bug 1770251 - Centralize PGO mozconfig bits. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D146852
2022-05-20 08:31:46 +00:00
Razvan Cojocaru
d8294d5641 Bug 1142667 - [elfhack] Leak of |relhack| in |do_relocation_section|. r=firefox-build-system-reviewers,glandium
Now using std::unique_ptr<> for relhack, relhackcode and init, so
that nothing can leak on non-success exit paths.

Differential Revision: https://phabricator.services.mozilla.com/D144138
2022-05-20 07:01:54 +00:00
Iulian Moraru
283a88b45c Backed out changeset c2a224a0f3b4 (bug 1142667) for causing multiple build bustages on host_elfhack. 2022-05-19 03:25:50 +03:00
Razvan Cojocaru
7d3f1ced24 Bug 1142667 - [elfhack] Leak of |relhack| in |do_relocation_section|. r=firefox-build-system-reviewers,glandium
Now using std::unique_ptr<> for relhack, relhackcode and init, so
that nothing can leak on non-success exit paths.

Differential Revision: https://phabricator.services.mozilla.com/D144138
2022-05-18 21:18:32 +00:00
Mike Hommey
9fa0488903 Bug 1767504 - Apply GCC upstream patch to silence a dubious warning. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D145404
2022-05-06 12:49:45 +00:00
ganguin
df23203d4e Bug 1661450 - 8/8 Allow builds without MOZ_X11 r=glandium,stransky
Allow builds without MOZ_X11 when toolkit is cairo-gtk3-wayland and X11
dependencies are missing.

Depends on D139533

Differential Revision: https://phabricator.services.mozilla.com/D139534
2022-04-20 09:32:09 +00:00