From ce555ce7bf11ba5b4045b763b1d191e35e203825 Mon Sep 17 00:00:00 2001 From: Yossi Itigin Date: Thu, 3 Mar 2022 00:16:01 +0200 Subject: [PATCH 1/2] BUILD/DEBIAN: Update compatibility level to support ubuntu 22.04 --- debian/compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/compat b/debian/compat index 7ed6ff82de6..7f8f011eb73 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +7 From d0c09e67743328c1c741c528a9e311198472da89 Mon Sep 17 00:00:00 2001 From: Yossi Itigin Date: Wed, 2 Mar 2022 20:24:02 +0200 Subject: [PATCH 2/2] UCS/BUILD: Make sure libibfd and libiberty can be used with dynamic link Without this change, configure-time test for libbfd and libiberty could succeed even when we have only :a static non-PIC library on the system. --- src/ucs/configure.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ucs/configure.m4 b/src/ucs/configure.m4 index 01edb0d61cf..118a2e8ef8b 100644 --- a/src/ucs/configure.m4 +++ b/src/ucs/configure.m4 @@ -54,11 +54,16 @@ AS_IF([test "x$with_bfd" != xno], save_LIBS="$LIBS" # Check BFD properties with all flags pointing to the custom location - CFLAGS="$CFLAGS $BFD_CHECK_CFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CHECK_CPPFLAGS" - LDFLAGS="$LDFLAGS $BFD_CHECK_LDFLAGS" LIBS="$LIBS $BFD_CHECK_LIBS" + # Link the test applications as a shared library, to fail if libbfd is + # not a PIC object. + # Do not allow undefined symbols, to ensure all references are resolved. + # TODO Allow static link with static libbfd + CFLAGS="$CFLAGS $BFD_CHECK_CFLAGS -fPIC" + LDFLAGS="$LDFLAGS $BFD_CHECK_LDFLAGS -shared -Wl,--no-undefined" + bfd_happy="yes" AC_CHECK_LIB(bfd, bfd_openr, [], [