summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/multipath-tools/files/shared-libs-avoid-linking-.so-as-executable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools/files/shared-libs-avoid-linking-.so-as-executable.patch')
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/shared-libs-avoid-linking-.so-as-executable.patch55
1 files changed, 0 insertions, 55 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/shared-libs-avoid-linking-.so-as-executable.patch b/meta-oe/recipes-support/multipath-tools/files/shared-libs-avoid-linking-.so-as-executable.patch
deleted file mode 100644
index 88579e6aab..0000000000
--- a/meta-oe/recipes-support/multipath-tools/files/shared-libs-avoid-linking-.so-as-executable.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 4311856200480288494df8df737f71ea316592d0 Mon Sep 17 00:00:00 2001
2From: Patrick Ohly <patrick.ohly@intel.com>
3Date: Thu, 26 Jan 2017 15:28:34 +0100
4Subject: [PATCH] shared libs: avoid linking .so as executable
5
6When the OE build systems sets CFLAGS including -pie, gcc overrides
7the earlier -shared parameter and tries to link a binary, leading to
8errors about missing functions like main().
9
10Reordering the parameters so that -shared comes after CFLAGS
11fixes this.
12
13Upstream-Status: Inappropriate [OE specific, -pie shouldn't be in CFLAGS?!]
14
15Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
16---
17diff --git a/libmpathcmd/Makefile b/libmpathcmd/Makefile
18index 457c4ca..f68c82c 100644
19--- a/libmpathcmd/Makefile
20+++ b/libmpathcmd/Makefile
21@@ -9,7 +9,7 @@ OBJS = mpath_cmd.o
22 all: $(LIBS)
23
24 $(LIBS): $(OBJS)
25- $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) $(LIBDEPS)
26+ $(CC) $(LDFLAGS) $(CFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
27 $(LN) $@ $(DEVLIB)
28
29 install: $(LIBS)
30diff --git a/libmpathpersist/Makefile b/libmpathpersist/Makefile
31index 6e43427..2486302 100644
32--- a/libmpathpersist/Makefile
33+++ b/libmpathpersist/Makefile
34@@ -15,7 +15,7 @@ all: $(LIBS)
35
36 $(LIBS):
37 $(CC) -c $(CFLAGS) *.c
38- $(CC) $(LDFLAGS) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
39+ $(CC) $(LDFLAGS) $(CFLAGS) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ -o $@ $(OBJS)
40 $(LN) $(LIBS) $(DEVLIB)
41 $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
42 $(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
43diff --git a/libmultipath/Makefile b/libmultipath/Makefile
44index 495cebe..752bcc0 100644
45--- a/libmultipath/Makefile
46+++ b/libmultipath/Makefile
47@@ -55,7 +55,7 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \
48 all: $(LIBS)
49
50 $(LIBS): $(OBJS)
51- $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) $(LIBDEPS)
52+ $(CC) $(LDFLAGS) $(CFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
53 $(LN) $@ $(DEVLIB)
54
55 install: