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

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