Landry Breuil <lan...@rhaalovely.net> writes:

> Hi,
>
> mpi@ already fixed some ports (audio/mpd at least) by removing
> -Wl,--gc-sections from the linking flags, but 'lots' of other ports
> using this construct fail on powerpc. Maybe we should make it a noop on
> this arch ?

Unless someone comes up with a proper fix, here's a diff to
disable --gc-sections. You should get the following warning:

  /usr/bin/ld: Warning: gc-sections option ignored

Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/binutils-2.17/bfd/elf32-ppc.c,v
retrieving revision 1.3
diff -u -p -r1.3 elf32-ppc.c
--- bfd/elf32-ppc.c     3 Aug 2015 18:03:04 -0000       1.3
+++ bfd/elf32-ppc.c     17 Mar 2016 21:44:41 -0000
@@ -7447,7 +7447,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 #endif
 
 #define elf_backend_plt_not_loaded     1
-#define elf_backend_can_gc_sections    1
+#define elf_backend_can_gc_sections    0
 #define elf_backend_can_refcount       1
 #define elf_backend_rela_normal                1
 


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to