[Android-tools-devel] Bug#1016468: android-platform-tools: do not override dwz

Gianfranco Costamagna locutusofborg at debian.org
Mon Aug 1 08:40:36 BST 2022


Source: android-platform-tools
Version: 29.0.6-20
tags: patch

Hello, I added a better patch instead of ignoring dwz call.
Its about exporting gdwarf-4, until new dwz starts understanding dwarf-5 format (so we should in the future re-evaluate this cflag and remove it).
Also, it would be nice to disable lto, I don't think it makes any sense in android toolchain.

trivial patch is:

diff -Nru android-platform-tools-29.0.6/debian/rules android-platform-tools-29.0.6/debian/rules
--- android-platform-tools-29.0.6/debian/rules	2022-07-28 16:01:55.000000000 +0000
+++ android-platform-tools-29.0.6/debian/rules	2022-08-01 07:31:57.000000000 +0000
@@ -4,10 +4,10 @@
  include /usr/share/dpkg/pkg-info.mk
  
  ## Security Hardening
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
  # https://android.googlesource.com/platform/build/soong/+/refs/tags/platform-tools-29.0.6/cc/config/global.go#121
-export DEB_CFLAGS_MAINT_APPEND = -fPIC
-export DEB_CXXFLAGS_MAINT_APPEND = -fPIC
+export DEB_CFLAGS_MAINT_APPEND = -fPIC -gdwarf-4
+export DEB_CXXFLAGS_MAINT_APPEND = -fPIC -gdwarf-4
  export DEB_LDFLAGS_MAINT_APPEND = -fPIC
  export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG -UDEBUG \
    -fmessage-length=0 \
@@ -205,6 +205,3 @@
  	dh_gencontrol -pandroid-sdk-libsparse-utils -- -v1:$(DEB_VERSION)
  	dh_gencontrol -pfastboot -- -v1:$(DEB_VERSION)
  	dh_gencontrol -pmkbootimg -- -v1:$(DEB_VERSION)
-
-override_dh_dwz:
-	dh_dwz || true


G.



More information about the Android-tools-devel mailing list