From c692b009a44c11077ce5fed6f86236cbdcd2447a Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 24 Jun 2019 01:05:52 -0600 Subject: [PATCH] Fix -fuse-ld ldflags. --- construct/Makefile.am | 13 ++++++++++++- ircd/Makefile.am | 13 ++++++++++++- modules/Makefile.am | 13 ++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/construct/Makefile.am b/construct/Makefile.am index e3976ba3e..213730591 100644 --- a/construct/Makefile.am +++ b/construct/Makefile.am @@ -22,7 +22,6 @@ AM_CPPFLAGS = \ AM_LDFLAGS = \ -dlopen self \ - -Wl,-fuse-ld=gold \ -Wl,--warn-execstack \ -Wl,--warn-common \ -Wl,--detect-odr-violations \ @@ -41,6 +40,18 @@ AM_LDFLAGS = \ @EXTRA_LDFLAGS@ \ ### +if GCC +AM_LDFLAGS += \ + -Wl,-fuse-ld=gold \ + ### +endif + +if CLANG +AM_LDFLAGS += \ + -fuse-ld=gold \ + ### +endif + bin_PROGRAMS = construct construct_LDFLAGS = \ diff --git a/ircd/Makefile.am b/ircd/Makefile.am index ba453d1e4..c4099e930 100644 --- a/ircd/Makefile.am +++ b/ircd/Makefile.am @@ -33,7 +33,6 @@ AM_CPPFLAGS = \ AM_LDFLAGS = \ -version-info 3:1:0 \ - -Wl,-fuse-ld=gold \ -Wl,--warn-common \ -Wl,--warn-execstack \ -Wl,--detect-odr-violations \ @@ -53,6 +52,18 @@ AM_LDFLAGS = \ @EXTRA_LDFLAGS@ \ ### +if GCC +AM_LDFLAGS += \ + -Wl,-fuse-ld=gold \ + ### +endif + +if CLANG +AM_LDFLAGS += \ + -fuse-ld=gold \ + ### +endif + if MINGW AM_LDFLAGS += \ -Wl,--enable-runtime-pseudo-reloc \ diff --git a/modules/Makefile.am b/modules/Makefile.am index b1fcf63ba..a7f618bfb 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -33,7 +33,6 @@ AM_CPPFLAGS = \ AM_LDFLAGS = \ -module \ -avoid-version \ - -Wl,-fuse-ld=gold \ -Wl,--warn-common \ -Wl,--warn-execstack \ -Wl,--detect-odr-violations \ @@ -49,6 +48,18 @@ AM_LDFLAGS = \ @EXTRA_LDFLAGS@ \ ### +if GCC +AM_LDFLAGS += \ + -Wl,-fuse-ld=gold \ + ### +endif + +if CLANG +AM_LDFLAGS += \ + -fuse-ld=gold \ + ### +endif + ############################################################################### # # /