Blame SOURCES/0063-Work-around-autoconf-existing-in-the-world.patch

d5c737
From 1b35f9a4b396f21139ab64de0510aa829548682d Mon Sep 17 00:00:00 2001
d5c737
From: Peter Jones <pjones@redhat.com>
d5c737
Date: Mon, 13 Jan 2020 16:27:42 -0500
d5c737
Subject: [PATCH 63/63] Work around autoconf existing in the world.
d5c737
d5c737
Long long ago, autoconf added a variable called to pass linker flags to
d5c737
the compiler.  For some misguided reason, they prefixed it with LD (the
d5c737
linker) instead of "CC" (the compiler).  Now people unquestioningly
d5c737
complain if you use that name a more reasonable way, so we're stuck with
d5c737
names that are counter-descriptive.  You just can't win, the well is too
d5c737
full of poison.
d5c737
d5c737
Resolves github issue #142.
d5c737
d5c737
Signed-off-by: Peter Jones <pjones@redhat.com>
d5c737
---
d5c737
 src/include/defaults.mk | 16 ++++++++--------
d5c737
 1 file changed, 8 insertions(+), 8 deletions(-)
d5c737
d5c737
diff --git a/src/include/defaults.mk b/src/include/defaults.mk
d5c737
index 8a784d00be3..781587b4215 100644
d5c737
--- a/src/include/defaults.mk
d5c737
+++ b/src/include/defaults.mk
d5c737
@@ -40,21 +40,21 @@ override CFLAGS = $(_CFLAGS) \
d5c737
 		  -fvisibility=hidden \
d5c737
 		  $(call family,CFLAGS) \
d5c737
 		  $(call pkg-config-cflags)
d5c737
-LDFLAGS_CLANG ?= --fatal-warnings -pie -z relro
d5c737
+LDFLAGS_CLANG ?= -Wl,--fatal-warnings,-pie,-z,relro
d5c737
 LDFLAGS ?=
d5c737
 override _LDFLAGS := $(LDFLAGS)
d5c737
 override LDFLAGS = $(_LDFLAGS) \
d5c737
-		   --add-needed \
d5c737
-		   --build-id \
d5c737
-		   --no-allow-shlib-undefined \
d5c737
-		   --no-undefined-version \
d5c737
-		   -z now \
d5c737
-		   -z muldefs \
d5c737
+		   -Wl,--add-needed \
d5c737
+		   -Wl,--build-id \
d5c737
+		   -Wl,--no-allow-shlib-undefined \
d5c737
+		   -Wl,--no-undefined-version \
d5c737
+		   -Wl,-z,now \
d5c737
+		   -Wl,-z,muldefs \
d5c737
 		   $(call family,LDFLAGS)
d5c737
 CCLDFLAGS ?=
d5c737
 override _CCLDFLAGS := $(CCLDFLAGS)
d5c737
 override CCLDFLAGS = $(CFLAGS) -L. $(_CCLDFLAGS) \
d5c737
-		     $(call add-prefix,-Wl,$(LDFLAGS)) \
d5c737
+		     $(LDFLAGS) \
d5c737
 		     $(call pkg-config-ccldflags)
d5c737
 HOST_ARCH=$(shell uname -m)
d5c737
 ifneq ($(HOST_ARCH),ia64)
d5c737
-- 
d5c737
2.26.2
d5c737