Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | multipath-tools: modify Makefile.inc for cross-compilation |
| 2 | |
| 3 | Do not look for systemd info on the host, and allow us to pass in CFLAGS |
| 4 | using the OPTFLAGS variable. |
| 5 | |
| 6 | Upstream-Status: Inappropriate [embedded specific] |
| 7 | |
| 8 | Signed-off-by: Joe Slater <joe.slater@windriver.com> |
| 9 | |
| 10 | Update for version 0.5.0-144-g770e6d0 |
| 11 | |
| 12 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
| 13 | |
| 14 | --- a/Makefile.inc |
| 15 | +++ b/Makefile.inc |
| 16 | @@ -21,12 +21,6 @@ ifndef LIB |
| 17 | endif |
| 18 | endif |
| 19 | |
| 20 | -ifndef SYSTEMD |
| 21 | - ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1) |
| 22 | - SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n 's/systemd \([0-9]*\)/\1/p') |
| 23 | - endif |
| 24 | -endif |
| 25 | - |
| 26 | ifndef SYSTEMDPATH |
| 27 | SYSTEMDPATH=usr/lib |
| 28 | endif |
| 29 | @@ -53,7 +47,10 @@ ifndef RPM_OPT_FLAGS |
| 30 | RPM_OPT_FLAGS = -O2 -g -pipe -Wformat-security -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 |
| 31 | endif |
| 32 | |
| 33 | +ifndef OPTFLAGS |
| 34 | OPTFLAGS = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes |
| 35 | +endif |
| 36 | + |
| 37 | CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" |
| 38 | SHARED_FLAGS = -shared |
| 39 | |