From ae7b91eca50347fa06b0693893b4a459ff23adcb Mon Sep 17 00:00:00 2001 From: Pavel Kopylov Date: Mon, 11 Sep 2023 14:41:45 +0200 Subject: [PATCH] Fix debuginfo --- SOURCES/fix-debuginfo.patch | 28 ++++++++++++++++++++++++++++ SOURCES/fix-sudo-install.patch | 8 ++++---- SPECS/raspberrypi-userland.spec | 2 ++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 SOURCES/fix-debuginfo.patch diff --git a/SOURCES/fix-debuginfo.patch b/SOURCES/fix-debuginfo.patch new file mode 100644 index 0000000..54ebb8d --- /dev/null +++ b/SOURCES/fix-debuginfo.patch @@ -0,0 +1,28 @@ +From a62060f41dec44a510ec3117d5a818ead9ecbc92 Mon Sep 17 00:00:00 2001 +From: Kopylov Pavel +Date: Mon, 11 Sep 2023 14:11:51 +0200 +Subject: [PATCH] Add -g param during building process + +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fe67fc8..f0fe535 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,11 @@ add_definitions(-DEGL_SERVER_DISPMANX) + add_definitions(-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) + add_definitions(-D_GNU_SOURCE) + ++# add debuginfo to be accessible ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") ++set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -g") ++set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g") ++ + # do we actually need this? + add_definitions(-D__VIDEOCORE4__) + add_definitions(-DTV_SUPPORTED_MODE_NO_DEPRECATED) +-- +2.34.1 + diff --git a/SOURCES/fix-sudo-install.patch b/SOURCES/fix-sudo-install.patch index 6ef0a69..751e1b3 100644 --- a/SOURCES/fix-sudo-install.patch +++ b/SOURCES/fix-sudo-install.patch @@ -1,7 +1,7 @@ From bc464c83e973a4e5c01c41dc4bb7d4714293f511 Mon Sep 17 00:00:00 2001 From: Pavel Kopylov Date: Wed, 23 Aug 2023 16:32:41 +0200 -Subject: [PATCH] Fix sudo install +Subject: [PATCH] Fix sudo install, keep debuginfo during installation --- buildme | 6 +++--- @@ -16,10 +16,10 @@ index 9e2d405..6bc241d 100755 fi if [ "$1" != "" ]; then - sudo make install DESTDIR=$1 -+ make install DESTDIR=$1 ++ make install DESTDIR=$1 STRIP=/bin/true else - sudo make install -+ make install ++ make install STRIP=/bin/true fi elif [ "$1" = "--native" ]; then # Build natively on the host @@ -28,7 +28,7 @@ index 9e2d405..6bc241d 100755 if [ "$1" != "" ]; then - sudo make install DESTDIR=$1 -+ make install DESTDIR=$1 ++ make install DESTDIR=$1 STRIP=/bin/true fi fi popd diff --git a/SPECS/raspberrypi-userland.spec b/SPECS/raspberrypi-userland.spec index 614171a..f534144 100644 --- a/SPECS/raspberrypi-userland.spec +++ b/SPECS/raspberrypi-userland.spec @@ -20,6 +20,7 @@ Source0: %{userland_url}/archive/%{userland_commit}/userland-%{userland_commit}. Patch0: fix-sudo-install.patch Patch1: fix-buildme-arm64.patch +Patch2: fix-debuginfo.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -50,6 +51,7 @@ This package contains static libraries. %patch0 -p1 %patch1 -p2 +%patch2 -p1 %build