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 --- ...01-strip-build-directory-from-fixincludes.patch | 29 ++++++++++++++++++++++ ...001-strip-build-directory-from-fixinclues.patch | 29 ---------------------- .../0002-compute-reproducible-checksums.patch | 4 +-- etc/patches/gcc-10/reproducibility/series | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixincludes.patch delete mode 100644 etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixinclues.patch (limited to 'etc/patches/gcc-10/reproducibility') diff --git a/etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixincludes.patch b/etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixincludes.patch new file mode 100644 index 0000000..96e8ec7 --- /dev/null +++ b/etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixincludes.patch @@ -0,0 +1,29 @@ +From a097d475fa8806265f445d11f3074f506baf4a3e Mon Sep 17 00:00:00 2001 +From: Oliver Reiche +Date: Fri, 18 Aug 2023 14:36:57 +0200 +Subject: [PATCH 1/2] 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 6e2d67b65..b7d91c7ab 100755 +--- a/fixincludes/configure ++++ b/fixincludes/configure +@@ -6374,6 +6374,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-10/reproducibility/0001-strip-build-directory-from-fixinclues.patch b/etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixinclues.patch deleted file mode 100644 index d9a545f..0000000 --- a/etc/patches/gcc-10/reproducibility/0001-strip-build-directory-from-fixinclues.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a097d475fa8806265f445d11f3074f506baf4a3e Mon Sep 17 00:00:00 2001 -From: Oliver Reiche -Date: Fri, 18 Aug 2023 14:36:57 +0200 -Subject: [PATCH 1/2] 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 6e2d67b65..b7d91c7ab 100755 ---- a/fixincludes/configure -+++ b/fixincludes/configure -@@ -6374,6 +6374,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-10/reproducibility/0002-compute-reproducible-checksums.patch b/etc/patches/gcc-10/reproducibility/0002-compute-reproducible-checksums.patch index 3aeb9fb..ee1987e 100644 --- a/etc/patches/gcc-10/reproducibility/0002-compute-reproducible-checksums.patch +++ b/etc/patches/gcc-10/reproducibility/0002-compute-reproducible-checksums.patch @@ -48,7 +48,7 @@ index 8944b9b9f..7ed444c5f 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.c.tmp && \ $(srcdir)/../move-if-change cc1-checksum.c.tmp cc1-checksum.c; \ @@ -65,7 +65,7 @@ index 7896591dd..c65afcb85 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.c.tmp && \ $(srcdir)/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c; \ diff --git a/etc/patches/gcc-10/reproducibility/series b/etc/patches/gcc-10/reproducibility/series index 1ec9fe3..23d38d7 100644 --- a/etc/patches/gcc-10/reproducibility/series +++ b/etc/patches/gcc-10/reproducibility/series @@ -1,2 +1,2 @@ -0001-strip-build-directory-from-fixinclues.patch +0001-strip-build-directory-from-fixincludes.patch 0002-compute-reproducible-checksums.patch -- cgit v1.2.3