diff options
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/add-missing-ldflags.patch')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb/add-missing-ldflags.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/add-missing-ldflags.patch b/meta/recipes-devtools/gdb/gdb/add-missing-ldflags.patch new file mode 100644 index 0000000000..9385aa99c6 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/add-missing-ldflags.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | When running the configure check "checking for ELF support in BFD", LDFLAGS | ||
2 | were not being passed in to libtool. In OE/YP, we need these flags when using | ||
3 | uninative due to the games we play with the dynamic loader. | ||
4 | |||
5 | If a version of libzstd was built against a newer glibc, it would need | ||
6 | newer pthread symbols which it wouldn't find with the system linker. At | ||
7 | runtime this isn't an issue as it would be switched to use uninative but we | ||
8 | pass flags in LDFLAGS to allow this. | ||
9 | |||
10 | The comments say LDFLAGS are used but it was dropped in this commit: | ||
11 | |||
12 | https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5218fa9e8937b007d554f1e01c2e4ecdb9b7e271 | ||
13 | |||
14 | and probably needs to be put back upstream. | ||
15 | |||
16 | The bug is rare to reproduce as it depends on the host libzstd was built | ||
17 | against. | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
21 | |||
22 | Index: gdb-13.1/gdb/acinclude.m4 | ||
23 | =================================================================== | ||
24 | --- gdb-13.1.orig/gdb/acinclude.m4 | ||
25 | +++ gdb-13.1/gdb/acinclude.m4 | ||
26 | @@ -234,7 +234,7 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [ | ||
27 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | ||
28 | # always want our bfd. | ||
29 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | ||
30 | - LDFLAGS="-L../bfd -L../libiberty" | ||
31 | + LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | ||
32 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | ||
33 | LIBS="-lbfd -liberty $intl $LIBS" | ||
34 | CC="./libtool --quiet --mode=link $CC" | ||
35 | Index: gdb-13.1/gdb/configure | ||
36 | =================================================================== | ||
37 | --- gdb-13.1.orig/gdb/configure | ||
38 | +++ gdb-13.1/gdb/configure | ||
39 | @@ -28561,7 +28561,7 @@ WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | ||
40 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | ||
41 | # always want our bfd. | ||
42 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | ||
43 | - LDFLAGS="-L../bfd -L../libiberty" | ||
44 | + LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | ||
45 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | ||
46 | LIBS="-lbfd -liberty $intl $LIBS" | ||
47 | CC="./libtool --quiet --mode=link $CC" | ||