From 7a5d9850a1ad8ab66836cea15fc67967bbe29006 Mon Sep 17 00:00:00 2001 From: Yury Yarashevich Date: Mon, 9 Sep 2024 10:41:21 +0200 Subject: [PATCH] Enable linker build-id for android builds. --- CHANGES.md | 1 + native/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ea4efa5a1..38329f648 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Features * [#1595](https://github.com/java-native-access/jna/pull/1595): Add `IsProcessorFeaturePresent` to `c.s.j.p.win32.Kernel32` - [@dbwiddis](https://github.com/dbwiddis). * [#1602](https://github.com/java-native-access/jna/pull/1602): Add `XMoveWindow`, `XResizeWindow`, `XMoveResizeWindow`, `XRaiseWindow`, `XLowerWindow` X11 calls to `c.s.j.p.unix.X11` - [@vinceh121](https://github.com/vinceh121). * [#1613](https://github.com/java-native-access/jna/issues/1613): Added static helper method `Native#getNativeLibrary' for getting the underlying NativeLibrary instance from a Library interface instance or from a "registered" class - [@matthiasblaesing](https://github.com/matthiasblaesing). +* [#1624](https://github.com/java-native-access/jna/pull/1624): Enable linker build-id for android builds - [@mstyura](https://github.com/mstyura). Bug Fixes --------- diff --git a/native/Makefile b/native/Makefile index 70078089f..9bafc4c03 100644 --- a/native/Makefile +++ b/native/Makefile @@ -180,7 +180,7 @@ COPT+=-fpic -ffunction-sections -funwind-tables -fno-short-enums JAVA_INCLUDES= CINCLUDES+=-I"$(NDK_PLATFORM)/arch-$(AARCH)/usr/include" # -I/usr/include LIBS=-nostdlib -L"$(NDK_PLATFORM)/arch-$(AARCH)$(ALIBDIR)/" -lgcc -lc -ldl -lm -LDFLAGS+=-Wl,-shared,-Bsymbolic +LDFLAGS+=-Wl,-shared,-Bsymbolic -Wl,--build-id=sha1 FFI_ENV=CPP="$(CPP)" CC="$(CC)" CFLAGS="$(COPT) $(CDEBUG) $(CINCLUDES)" CPPFLAGS="$(CDEFINES) $(CINCLUDES)" LIBS="$(LIBS)" RANLIB="$(RANLIB)" FFI_CONFIG=--enable-static --disable-shared --with-pic=yes --host=$(HOST) endif