|
|
aacff36 |
Index: chromium-121.0.6167.75/build/toolchain/gcc_toolchain.gni
|
|
|
aacff36 |
===================================================================
|
|
|
aacff36 |
--- chromium-121.0.6167.75.orig/build/toolchain/gcc_toolchain.gni
|
|
|
aacff36 |
+++ chromium-121.0.6167.75/build/toolchain/gcc_toolchain.gni
|
|
|
aacff36 |
@@ -464,7 +464,13 @@ template("single_gcc_toolchain") {
|
|
|
aacff36 |
# -soname flag is not available on aix ld
|
|
|
aacff36 |
soname_flag = "-Wl,-soname=\"$soname\""
|
|
|
aacff36 |
}
|
|
|
aacff36 |
- link_command = "$ld -shared $soname_flag {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\" {{rlibs}}"
|
|
|
aacff36 |
+ if (target_cpu == "ppc64") {
|
|
|
aacff36 |
+ # Work around linker failures due to Rust libraries and the use of whole-archive
|
|
|
aacff36 |
+ link_command = "$ld -shared $soname_flag -Wl,--start-group {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\" {{rlibs}} -Wl,--end-group"
|
|
|
aacff36 |
+ }
|
|
|
aacff36 |
+ else {
|
|
|
aacff36 |
+ link_command = "$ld -shared $soname_flag {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\" {{rlibs}}"
|
|
|
aacff36 |
+ }
|
|
|
aacff36 |
|
|
|
aacff36 |
# Generate a map file to be used for binary size analysis.
|
|
|
aacff36 |
# Map file adds ~10% to the link time on a z620.
|
|
|
aacff36 |
@@ -576,7 +582,13 @@ template("single_gcc_toolchain") {
|
|
|
aacff36 |
whole_archive_flag = "-Wl,--whole-archive"
|
|
|
aacff36 |
no_whole_archive_flag = "-Wl,--no-whole-archive"
|
|
|
aacff36 |
}
|
|
|
aacff36 |
- command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" $soname_flag @\"$rspfile\""
|
|
|
aacff36 |
+ if (target_cpu == "ppc64") {
|
|
|
aacff36 |
+ # Work around linker failures due to Rust libraries and the use of whole-archive
|
|
|
aacff36 |
+ command = "$ld -shared -Wl,--start-group {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" $soname_flag @\"$rspfile\" -Wl,--end-group"
|
|
|
aacff36 |
+ }
|
|
|
aacff36 |
+ else {
|
|
|
aacff36 |
+ command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" $soname_flag @\"$rspfile\""
|
|
|
aacff36 |
+ }
|
|
|
aacff36 |
|
|
|
aacff36 |
if (defined(invoker.strip)) {
|
|
|
aacff36 |
strip_command = "${invoker.strip} -o \"$sofile\" \"$unstripped_sofile\""
|
|
|
aacff36 |
@@ -636,7 +648,13 @@ template("single_gcc_toolchain") {
|
|
|
aacff36 |
start_group_flag = "-Wl,--start-group"
|
|
|
aacff36 |
end_group_flag = "-Wl,--end-group "
|
|
|
aacff36 |
}
|
|
|
aacff36 |
- link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" $start_group_flag @\"$rspfile\" {{solibs}} $end_group_flag {{libs}} {{rlibs}}"
|
|
|
aacff36 |
+ if (target_cpu == "ppc64") {
|
|
|
aacff36 |
+ # Work around linker failures due to Rust libraries and the use of whole-archive
|
|
|
aacff36 |
+ link_command = "$ld -Wl,--start-group {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" @\"$rspfile\" {{solibs}} {{libs}} {{rlibs}} -Wl,--end-group"
|
|
|
aacff36 |
+ }
|
|
|
aacff36 |
+ else {
|
|
|
aacff36 |
+ link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" $start_group_flag @\"$rspfile\" {{solibs}} $end_group_flag {{libs}} {{rlibs}}"
|
|
|
aacff36 |
+ }
|
|
|
aacff36 |
|
|
|
aacff36 |
# Generate a map file to be used for binary size analysis.
|
|
|
aacff36 |
# Map file adds ~10% to the link time on a z620.
|