From fc1de24f9378ca1e9c6e0f12a6abe65d48314d65 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 15 Dec 2023 14:49:19 +0100 Subject: gcc: Fix GCC patches --- ...02-strip-build-directory-from-fixincludes.patch | 29 ++++++++++++++++++++++ ...002-strip-build-directory-from-fixinclues.patch | 29 ---------------------- .../0004-compute-reproducible-checksums.patch | 4 +-- etc/patches/gcc-13/reproducibility/series | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixincludes.patch delete mode 100644 etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixinclues.patch (limited to 'etc/patches/gcc-13') diff --git a/etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixincludes.patch b/etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixincludes.patch new file mode 100644 index 0000000..984e529 --- /dev/null +++ b/etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixincludes.patch @@ -0,0 +1,29 @@ +From a6fc1b1f0a05fbd6ba664393695ad20d3577a517 Mon Sep 17 00:00:00 2001 +From: Oliver Reiche +Date: Fri, 18 Aug 2023 14:36:57 +0200 +Subject: [PATCH 2/5] Strip build directory from fixincludes + +... to achieve a reproducible binary, which contains the +configure string. For this to work, the user needs to set +"BUILD_ROOT_DIR" before building. +--- + fixincludes/configure | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/fixincludes/configure b/fixincludes/configure +index bdcc41f6d..9dc499bc1 100755 +--- a/fixincludes/configure ++++ b/fixincludes/configure +@@ -6384,6 +6384,9 @@ cat >"$ac_tmp/defines.awk" <<\_ACAWK || + BEGIN { + _ACEOF + ++# Remove host machine's build path from confdefs.h ++sed -i 's|'${BUILD_ROOT_DIR:-/nonexistent}'|/build|g' confdefs.h ++ + # Transform confdefs.h into an awk script `defines.awk', embedded as + # here-document in config.status, that substitutes the proper values into + # config.h.in to produce config.h. +-- +2.30.2 + diff --git a/etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixinclues.patch b/etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixinclues.patch deleted file mode 100644 index fd1ea04..0000000 --- a/etc/patches/gcc-13/reproducibility/0002-strip-build-directory-from-fixinclues.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a6fc1b1f0a05fbd6ba664393695ad20d3577a517 Mon Sep 17 00:00:00 2001 -From: Oliver Reiche -Date: Fri, 18 Aug 2023 14:36:57 +0200 -Subject: [PATCH 2/5] Strip build directory from fixinclues - -... to achieve a reproducible binary, which contains the -configure string. For this to work, the user needs to set -"BUILD_ROOT_DIR" before building. ---- - fixincludes/configure | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/fixincludes/configure b/fixincludes/configure -index bdcc41f6d..9dc499bc1 100755 ---- a/fixincludes/configure -+++ b/fixincludes/configure -@@ -6384,6 +6384,9 @@ cat >"$ac_tmp/defines.awk" <<\_ACAWK || - BEGIN { - _ACEOF - -+# Remove host machine's build path from confdefs.h -+sed -i 's|'${BUILD_ROOT_DIR:-/nonexistent}'|/build|g' confdefs.h -+ - # Transform confdefs.h into an awk script `defines.awk', embedded as - # here-document in config.status, that substitutes the proper values into - # config.h.in to produce config.h. --- -2.30.2 - diff --git a/etc/patches/gcc-13/reproducibility/0004-compute-reproducible-checksums.patch b/etc/patches/gcc-13/reproducibility/0004-compute-reproducible-checksums.patch index 8eaeaac..ef358d5 100644 --- a/etc/patches/gcc-13/reproducibility/0004-compute-reproducible-checksums.patch +++ b/etc/patches/gcc-13/reproducibility/0004-compute-reproducible-checksums.patch @@ -48,7 +48,7 @@ index b3b12dcff..1733b40a7 100644 + rm -rf stripped_c_checksum_inputs; \ + mkdir stripped_c_checksum_inputs; \ + cp $(C_OBJS) $(BACKEND) $(LIBDEPS) stripped_c_checksum_inputs/; \ -+ strip -g stripped_c_checksum_inputs/*; \ ++ $(STRIP_FOR_TARGET) -g stripped_c_checksum_inputs/*; \ + build/genchecksum$(build_exeext) $$(ls stripped_c_checksum_inputs/* | LC_ALL=C sort) \ checksum-options > cc1-checksum.cc.tmp && \ $(srcdir)/../move-if-change cc1-checksum.cc.tmp cc1-checksum.cc; \ @@ -65,7 +65,7 @@ index 4ee26fad9..30fe695ec 100644 + rm -rf stripped_cp_checksum_inputs; \ + mkdir stripped_cp_checksum_inputs; \ + cp $(CXX_OBJS) $(BACKEND) $(CODYLIB) $(LIBDEPS) stripped_cp_checksum_inputs; \ -+ strip -g stripped_cp_checksum_inputs/*; \ ++ $(STRIP_FOR_TARGET) -g stripped_cp_checksum_inputs/*; \ + build/genchecksum$(build_exeext) $$(ls stripped_cp_checksum_inputs/* | LC_ALL=C sort) \ checksum-options > cc1plus-checksum.cc.tmp && \ $(srcdir)/../move-if-change cc1plus-checksum.cc.tmp cc1plus-checksum.cc; \ diff --git a/etc/patches/gcc-13/reproducibility/series b/etc/patches/gcc-13/reproducibility/series index 996d939..e5411be 100644 --- a/etc/patches/gcc-13/reproducibility/series +++ b/etc/patches/gcc-13/reproducibility/series @@ -1,5 +1,5 @@ 0001-strip-build-directory-from-config-arguments.patch -0002-strip-build-directory-from-fixinclues.patch +0002-strip-build-directory-from-fixincludes.patch 0003-strip-build-directory-from-mkheaders.conf.patch 0004-compute-reproducible-checksums.patch 0005-do-not-hardcode-rpath-into-cc1-libs.patch -- cgit v1.2.3