aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/multipath-tools/files/makefile_inc.patch
blob: 5b7b6966ac965449b5a8f9a2bcd39e26aa297e76 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From 9f5768eca165502b0f17d271aa6f7cf530ec60b2 Mon Sep 17 00:00:00 2001
From: Joe Slater <joe.slater@windriver.com>
Date: Mon, 22 Sep 2014 17:22:32 -0700
Subject: [PATCH] multipath-tools: modify Makefile.inc for
 cross-compilation

Do not look for systemd info on the host, and allow us to pass in CFLAGS
using the OPTFLAGS variable.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Joe Slater <joe.slater@windriver.com>

Update for version 0.5.0-144-g770e6d0

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 Makefile.inc | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 1cc8f44..15f8b91 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -29,12 +29,6 @@ ifndef RUN
 	endif
 endif
 
-ifndef SYSTEMD
-	ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1)
-		SYSTEMD = $(shell systemctl --version 2> /dev/null |  sed -n 's/systemd \([0-9]*\)/\1/p')
-	endif
-endif
-
 ifndef SYSTEMDPATH
 	SYSTEMDPATH=usr/lib
 endif
@@ -61,13 +55,12 @@ RM		= rm -f
 LN		= ln -sf
 INSTALL_PROGRAM	= install
 
-OPTFLAGS	= -O2 -g -pipe -Wall -Wextra -Wformat=2 \
-		  -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered \
-		  -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector \
-		  --param=ssp-buffer-size=4
+ifndef OPTFLAGS
+OPTFLAGS     = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes
+endif
 
-CFLAGS		= $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\"
-SHARED_FLAGS	= -shared
+CFLAGS	     = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\"
+SHARED_FLAGS = -shared
 
 %.o:	%.c
 	$(CC) $(CFLAGS) -c -o $@ $<
-- 
2.11.0