summaryrefslogtreecommitdiff
path: root/sysutils/xentools415/patches/patch-Config.mk
blob: 862659c614f2d74b09b2904ba8d2b6170100ae91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-Config.mk,v 1.1 2021/04/18 12:31:26 bouyer Exp $

Make sure to pass pkgsrc CFLAGS.
Use -R instead if -rpath, to appease our linker (--enable-rpath bug ?)

--- Config.mk.orig	2020-12-08 15:28:31.000000000 +0100
+++ Config.mk	2020-12-14 11:48:10.669586105 +0100
@@ -33,7 +33,7 @@
 
 # Tools to run on system hosting the build
 HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCFLAGS += -fno-strict-aliasing
+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
 
 DISTDIR     ?= $(XEN_ROOT)/dist
 DESTDIR     ?= /
@@ -188,6 +188,8 @@
 
 CFLAGS += -Wall -Wstrict-prototypes
 
+CFLAGS += ${EXTRA_CFLAGS}
+
 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
 $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
@@ -198,7 +200,7 @@
 LDFLAGS += $(foreach i, $(PREPEND_LIB), -L$(i))
 CFLAGS += $(foreach i, $(PREPEND_INCLUDES), -I$(i))
 ifeq ($(XEN_TOOLS_RPATH),y)
-LDFLAGS += -Wl,-rpath,$(libdir)
+LDFLAGS += -Wl,-R$(libdir)
 endif
 APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
 APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))