[haiku-development] binutils update, addons fail to link

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 22 Feb 2016 21:19:20 +0100

Hi,

a problem has appeared after updating binutils to 2.26, only on x86:

Network addons are linked against the network preferences, this fails.
It also happens for at least input server addons.

Two solutions:
1/ adding -shared link flags to Network preferences.

diff --git a/src/preferences/network/Jamfile b/src/preferences/network/Jamfile
index 532057c..60dea93 100644
--- a/src/preferences/network/Jamfile
+++ b/src/preferences/network/Jamfile
@@ -31,6 +31,8 @@ Preference Network :
        : Network.rdef InterfaceIcons.rdef
 ;

+LINKFLAGS on Network = [ on Network return $(LINKFLAGS) ] -shared ;
+
 DoCatalogs Network :
        x-vnd.Haiku-Network
        :


2/ reverting binutils change from Simon South

diff --cc gcc/gcc/config/i386/haiku.h
index 39e55ce,39e55ce..c883c56
--- a/gcc/gcc/config/i386/haiku.h
+++ b/gcc/gcc/config/i386/haiku.h
@@@ -55,7 -55,7 +55,7 @@@ Boston, MA 02111-1307, USA.  *
  #undef        LINK_SPEC
  #define LINK_SPEC \
    "-m elf_i386_haiku \
--   %{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
++   %{!r:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
     %{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
     %{nostart|shared:-e 0;:--no-undefined}"


I'd tend to go for solution 1. Opinions?

Bye,
Jérôme

Other related posts: