roll: pigweed, pw_toolchain: pw_libcxx: Add alwayslink=True to pw_libcxx
libc++ has weak definitions for the operator new/delete functions that
depend on symbols included in __lcxx_override. That sections has all
libc++'s weak definitions for these operator new/delete symbols. The
bazel build though places this section right after boot2 which should
not happen since the vector table should come immediately after boot2. I
belive this is legal from the linker perspective since boot2 and
__lcxx_override have the same flags but we don't also want to edit the
linker script upstream to move the section elsewhere.
The alternative we can do is have __lcxx_override gc'd. pw_libcxx
provides its own strong definitions for operator new/delete but those
don't win at link time due to linking order. Wrapping it with
-[no-]whole-archive
allows the strong definitions pw_libcxx provides to win, allowing
--gc-sections to remove the section. Note this only fixes this issue for
pw users for rp.
Original-Bug: 358109466
Original-Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/pigweed/+/74450
https://pigweed-internal.googlesource.com/pigweed/pigweed
pigweed, pw_toolchain Rolled-Commits: 676d754f6f1a87a..093010b2e645ba6
Roller-URL: https://ci.chromium.org/b/8740202386489570641
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ie969ebc15cce1bd5df9071a82ccda98b1078d7ff
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/74437
Commit-Queue: Pigweed-Internal-Roller <pigweed-internal-roller@pw-internal-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Pigweed-Internal-Roller <pigweed-internal-roller@pw-internal-service-accounts.iam.gserviceaccount.com>
diff --git a/MODULE.bazel b/MODULE.bazel
index e86868f..8c821c1 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -62,18 +62,18 @@
git_override(
module_name = "pigweed",
# ROLL: Warning: this entry is automatically updated.
- # ROLL: Last updated 2024-08-07.
- # ROLL: By https://cr-buildbucket.appspot.com/build/8740222374409493377.
- commit = "676d754f6f1a87afc76304bb1f457c3eeec6868e",
+ # ROLL: Last updated 2024-08-08.
+ # ROLL: By https://cr-buildbucket.appspot.com/build/8740202386489570641.
+ commit = "093010b2e645ba671e8789df4ce7192fdb912124",
remote = "https://pigweed-internal.googlesource.com/pigweed/pigweed",
)
git_override(
module_name = "pw_toolchain",
# ROLL: Warning: this entry is automatically updated.
- # ROLL: Last updated 2024-08-07.
- # ROLL: By https://cr-buildbucket.appspot.com/build/8740222374409493377.
- commit = "676d754f6f1a87afc76304bb1f457c3eeec6868e",
+ # ROLL: Last updated 2024-08-08.
+ # ROLL: By https://cr-buildbucket.appspot.com/build/8740202386489570641.
+ commit = "093010b2e645ba671e8789df4ce7192fdb912124",
remote = "https://pigweed-internal.googlesource.com/pigweed/pigweed",
strip_prefix = "pw_toolchain_bazel",
)