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