diff -Nru globalplatform-2.4.0+dfsg/debian/changelog globalplatform-2.4.0+dfsg/debian/changelog --- globalplatform-2.4.0+dfsg/debian/changelog 2024-03-04 18:04:53.000000000 +0000 +++ globalplatform-2.4.0+dfsg/debian/changelog 2024-04-05 19:03:35.000000000 +0100 @@ -1,3 +1,9 @@ +globalplatform (2.4.0+dfsg-1ubuntu1) noble; urgency=medium + + * d/p/fix-ftbfs.patch: Disable LTO in unittests. (LP: #2060262) + + -- Sudip Mukherjee Fri, 05 Apr 2024 19:03:35 +0100 + globalplatform (2.4.0+dfsg-1build1) noble; urgency=medium * No-change rebuild against libssl3t64 diff -Nru globalplatform-2.4.0+dfsg/debian/patches/fix-ftbfs.patch globalplatform-2.4.0+dfsg/debian/patches/fix-ftbfs.patch --- globalplatform-2.4.0+dfsg/debian/patches/fix-ftbfs.patch 1970-01-01 01:00:00.000000000 +0100 +++ globalplatform-2.4.0+dfsg/debian/patches/fix-ftbfs.patch 2024-04-05 19:03:05.000000000 +0100 @@ -0,0 +1,32 @@ +Description: Disable LTO for tests + With LTO enabled the linker is not able to find __wrap_RAND_bytes which + was enabled with the gcc option "--wrap=RAND_bytes". +Author: Sudip Mukherjee +Bug-Ubuntu: https://launchpad.net/bugs/2060262 +Forwarded: no +Last-Update: 2024-04-05 +--- + +--- globalplatform-2.4.0+dfsg.orig/globalplatform/src/CMakeLists.txt ++++ globalplatform-2.4.0+dfsg/globalplatform/src/CMakeLists.txt +@@ -139,17 +139,19 @@ IF(TESTING) + IF(UNIX AND NOT APPLE) + add_mocked_test(scp03Test + SOURCES scp03Test.c testUtil.c ${SOURCES} +- COMPILE_OPTIONS -I${PCSC_INCLUDE_DIRS} ++ COMPILE_OPTIONS -I${PCSC_INCLUDE_DIRS} "-fno-lto" + MOCKS RAND_bytes + LINK_LIBRARIES ${LIBRARIES}) + + add_mocked_test(scp02Test + SOURCES scp02Test.c testUtil.c ${SOURCES} ++ COMPILE_OPTIONS -I${PCSC_INCLUDE_DIRS} "-fno-lto" + MOCKS RAND_bytes + LINK_LIBRARIES ${LIBRARIES}) + + add_mocked_test(scp01Test + SOURCES scp01Test.c testUtil.c ${SOURCES} ++ COMPILE_OPTIONS -I${PCSC_INCLUDE_DIRS} "-fno-lto" + MOCKS RAND_bytes + LINK_LIBRARIES ${LIBRARIES}) + ENDIF(UNIX AND NOT APPLE) diff -Nru globalplatform-2.4.0+dfsg/debian/patches/series globalplatform-2.4.0+dfsg/debian/patches/series --- globalplatform-2.4.0+dfsg/debian/patches/series 2023-12-19 09:48:00.000000000 +0000 +++ globalplatform-2.4.0+dfsg/debian/patches/series 2024-04-05 19:03:33.000000000 +0100 @@ -1,2 +1,3 @@ use-system-minizip.patch use-versioned-so-for-dlopen.patch +fix-ftbfs.patch