argv = append(argv, "-Wl,-bbigtoc")
}
+ // On PPC64, verify the external toolchain supports Power10. This is needed when
+ // PC relative relocations might be generated by Go. Only targets compiling ELF
+ // binaries might generate these relocations.
+ if ctxt.IsPPC64() && ctxt.IsElf() && buildcfg.GOPPC64 >= 10 {
+ if !linkerFlagSupported(ctxt.Arch, argv[0], "", "-mcpu=power10") {
+ Exitf("The external toolchain does not support -mcpu=power10. " +
+ " This is required to externally link GOPPC64 >= power10")
+ }
+ }
+
// Enable/disable ASLR on Windows.
addASLRargs := func(argv []string, val bool) []string {
// Old/ancient versions of GCC support "--dynamicbase" and