diff --git a/pipelines/build/devkit/Tools.gmk.patch b/pipelines/build/devkit/Tools.gmk.patch index 69b033c46..325c725e8 100644 --- a/pipelines/build/devkit/Tools.gmk.patch +++ b/pipelines/build/devkit/Tools.gmk.patch @@ -1,5 +1,5 @@ diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk -index 187320ca2..1c009f945 100644 +index 187320ca26e..e9d5c92986e 100644 --- a/make/devkit/Tools.gmk +++ b/make/devkit/Tools.gmk @@ -62,6 +62,23 @@ ifeq ($(BASE_OS), OL) @@ -93,3 +93,21 @@ index 187320ca2..1c009f945 100644 endef # Download and unpack all source packages +@@ -323,6 +374,9 @@ $(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p)))) + # have it anyway, but just to make sure... + # Patch libc.so and libpthread.so to force linking against libraries in sysroot + # and not the ones installed on the build machine. ++# Remove comment sections from static libraries and C runtime objects ++# to prevent leaking RHEL-specific package versions into ++# devkit-produced binaries. + $(libs) : $(rpms) + @echo Patching libc and pthreads + @(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \ +@@ -332,6 +386,7 @@ $(libs) : $(rpms) + -e 's|/lib/||g' ) > $$f.tmp ; \ + mv $$f.tmp $$f ; \ + done) ++ @find $(SYSROOT) -name '*.[ao]' -exec objcopy --remove-section .comment '{}' ';' + @mkdir -p $(SYSROOT)/usr/lib + @touch $@ +