summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/pseudo/files')
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch44
-rw-r--r--meta/recipes-devtools/pseudo/files/glibc238.patch59
-rw-r--r--meta/recipes-devtools/pseudo/files/older-glibc-symbols.patch4
3 files changed, 2 insertions, 105 deletions
diff --git a/meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch b/meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch
deleted file mode 100644
index 43504eaab9..0000000000
--- a/meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From b5545c08e6c674c49aef14b47a56a3e92df4d2a7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 17 Feb 2016 07:36:34 +0000
4Subject: [pseudo][PATCH] configure: Prune PIE flags
5
6LDFLAGS are not taken from environment and CFLAGS is used for LDFLAGS
7however when using security options -fpie and -pie options are coming
8as part of ARCH_FLAGS and they get into LDFLAGS of shared objects as
9well so we end up with conflicting options -shared -pie, which gold
10rejects outright and bfd linker lets the one appearning last in cmdline
11take effect. This create quite a unpleasant situation in OE when
12security flags are enabled and gold or not-gold options are used
13it errors out but errors are not same.
14
15Anyway, with this patch we filter pie options from ARCH_FLAGS
16ouright and take control of generating PIC objects
17
18Helps with errors like
19
20| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: pseudo_client.o: relocation R_X86_64_PC32 against symbol `pseudo_util_debug_flags' can not be used when making a shared object; recompile with -fPIC
21| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
22| collect2: error: ld returned 1 exit status
23| make: *** [lib/pseudo/lib64/libpseudo.so] Error 1
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27Upstream-Status: Submitted
28
29 configure | 2 ++
30 1 file changed, 2 insertions(+)
31
32diff --git a/configure b/configure
33index e5ef9ce..83b0890 100755
34--- a/configure
35+++ b/configure
36@@ -339,3 +339,5 @@ sed -e '
37 s,@ARCH@,'"$opt_arch"',g
38 s,@BITS@,'"$opt_bits"',g
39 ' < Makefile.in > Makefile
40+
41+sed -i -e 's/\-[f]*pie//g' Makefile
42--
431.8.3.1
44
diff --git a/meta/recipes-devtools/pseudo/files/glibc238.patch b/meta/recipes-devtools/pseudo/files/glibc238.patch
deleted file mode 100644
index da4b8caee3..0000000000
--- a/meta/recipes-devtools/pseudo/files/glibc238.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by
2_GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
3to turn this off within pseudo_wrappers.c. Elsewhere we can switch to _DEFAULT_SOURCE
4rather than _GNU_SOURCE.
5
6Upstream-Status: Pending
7
8Index: git/pseudo_wrappers.c
9===================================================================
10--- git.orig/pseudo_wrappers.c
11+++ git/pseudo_wrappers.c
12@@ -6,6 +6,15 @@
13 * SPDX-License-Identifier: LGPL-2.1-only
14 *
15 */
16+/* glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by
17+ * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
18+ * to turn this off.
19+ */
20+#include <features.h>
21+#undef __GLIBC_USE_ISOC2X
22+#undef __GLIBC_USE_C2X_STRTOL
23+#define __GLIBC_USE_C2X_STRTOL 0
24+
25 #include <assert.h>
26 #include <stdlib.h>
27 #include <limits.h>
28Index: git/pseudo_util.c
29===================================================================
30--- git.orig/pseudo_util.c
31+++ git/pseudo_util.c
32@@ -8,6 +8,14 @@
33 */
34 /* we need access to RTLD_NEXT for a horrible workaround */
35 #define _GNU_SOURCE
36+/* glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by
37+ * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
38+ * to turn this off.
39+ */
40+#include <features.h>
41+#undef __GLIBC_USE_ISOC2X
42+#undef __GLIBC_USE_C2X_STRTOL
43+#define __GLIBC_USE_C2X_STRTOL 0
44
45 #include <ctype.h>
46 #include <errno.h>
47Index: git/pseudo_client.c
48===================================================================
49--- git.orig/pseudo_client.c
50+++ git/pseudo_client.c
51@@ -6,7 +6,7 @@
52 * SPDX-License-Identifier: LGPL-2.1-only
53 *
54 */
55-#define _GNU_SOURCE
56+#define _DEFAULT_SOURCE
57
58 #include <stdio.h>
59 #include <signal.h>
diff --git a/meta/recipes-devtools/pseudo/files/older-glibc-symbols.patch b/meta/recipes-devtools/pseudo/files/older-glibc-symbols.patch
index c453b5f735..f42b32b8d9 100644
--- a/meta/recipes-devtools/pseudo/files/older-glibc-symbols.patch
+++ b/meta/recipes-devtools/pseudo/files/older-glibc-symbols.patch
@@ -28,10 +28,10 @@ diff --git a/Makefile.in b/Makefile.in
28@@ -120,7 +120,7 @@ $(PSEUDODB): pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o | $(BIN) 28@@ -120,7 +120,7 @@ $(PSEUDODB): pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o | $(BIN)
29 libpseudo: $(LIBPSEUDO) 29 libpseudo: $(LIBPSEUDO)
30 30
31 $(LIBPSEUDO): $(WRAPOBJS) pseudo_client.o pseudo_ipc.o $(SHOBJS) | $(LIB) 31 $(LIBPSEUDO): $(WRAPOBJS) pseudo_client.o pseudo_client_scanf.o pseudo_ipc.o $(SHOBJS) | $(LIB)
32- $(CC) $(CFLAGS) $(CFLAGS_PSEUDO) -shared -o $(LIBPSEUDO) \ 32- $(CC) $(CFLAGS) $(CFLAGS_PSEUDO) -shared -o $(LIBPSEUDO) \
33+ $(CC) $(CFLAGS) -Lprebuilt/$(shell uname -m)-linux/lib/ $(CFLAGS_PSEUDO) -shared -o $(LIBPSEUDO) \ 33+ $(CC) $(CFLAGS) -Lprebuilt/$(shell uname -m)-linux/lib/ $(CFLAGS_PSEUDO) -shared -o $(LIBPSEUDO) \
34 pseudo_client.o pseudo_ipc.o \ 34 pseudo_client.o pseudo_client_scanf.o pseudo_ipc.o \
35 $(WRAPOBJS) $(SHOBJS) $(LDFLAGS) $(CLIENT_LDFLAGS) 35 $(WRAPOBJS) $(SHOBJS) $(LDFLAGS) $(CLIENT_LDFLAGS)
36 36
37diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c 37diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c