diff options
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.patch | 55 |
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 @@ | |||
1 | From 4311856200480288494df8df737f71ea316592d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Patrick Ohly <patrick.ohly@intel.com> | ||
3 | Date: Thu, 26 Jan 2017 15:28:34 +0100 | ||
4 | Subject: [PATCH] shared libs: avoid linking .so as executable | ||
5 | |||
6 | When the OE build systems sets CFLAGS including -pie, gcc overrides | ||
7 | the earlier -shared parameter and tries to link a binary, leading to | ||
8 | errors about missing functions like main(). | ||
9 | |||
10 | Reordering the parameters so that -shared comes after CFLAGS | ||
11 | fixes this. | ||
12 | |||
13 | Upstream-Status: Inappropriate [OE specific, -pie shouldn't be in CFLAGS?!] | ||
14 | |||
15 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | ||
16 | --- | ||
17 | diff --git a/libmpathcmd/Makefile b/libmpathcmd/Makefile | ||
18 | index 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) | ||
30 | diff --git a/libmpathpersist/Makefile b/libmpathpersist/Makefile | ||
31 | index 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 | ||
43 | diff --git a/libmultipath/Makefile b/libmultipath/Makefile | ||
44 | index 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: | ||