java-21-openjdk/SOURCES/0006-Tools.gmk-Add-enable-linker-build-id-to-gcc-build.patch

36 lines
1.1 KiB
Diff

From 5958274571b957617d0572101a92217fd5b2f312 Mon Sep 17 00:00:00 2001
From: Andrew Hughes <gnu.andrew@redhat.com>
Date: Wed, 27 Nov 2024 17:04:19 +0000
Subject: [PATCH] Tools.gmk: Add --enable-linker-build-id to gcc build
This causes --build-id to be passed to the linker, and the
.note.gnu.build-id section is added (OPENJDK-3068)
---
make/devkit/Tools.gmk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
index 22c6007000b..57d48ec5114 100644
--- a/make/devkit/Tools.gmk
+++ b/make/devkit/Tools.gmk
@@ -539,6 +539,8 @@ endif
# skip native language.
# and link and assemble with the binutils we created
# earlier, so --with-gnu*
+# Add --enable-linker-build-id so the .note.gnu.build-id
+# section is added by the linker (OPENJDK-3068)
$(BUILDDIR)/$(gcc_ver)/Makefile \
: $(GCC_CFG)
$(info Configuring $@. Log in $(@D)/log.config)
@@ -557,6 +559,7 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
--with-mpfr=$(PREFIX) \
--with-gmp=$(PREFIX) \
--with-mpc=$(PREFIX) \
+ --enable-linker-build-id \
) 2>&1 | tee $(@D)/log.config
@echo 'done'
--
2.45.2