blob: 6cd1d63194e6446eef67fb60ab2192d081f19e27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From 5ff2165c35eeae5df04df564663cadf6a889fb7c Mon Sep 17 00:00:00 2001
From: Oliver Reiche <oliver.reiche@huawei.com>
Date: Mon, 14 Aug 2023 12:33:04 +0200
Subject: [PATCH 1/5] Strip build directory from config arguments
... to achieve a reproducible binary, which contains the
configure string. For this to work, the user needs to set
"BUILD_ROOT_DIR" before building.
---
gcc/configure | 2 ++
gcc/configure.ac | 2 ++
2 files changed, 4 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index 23da7d55d..43561c617 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -13370,6 +13370,8 @@ fi
sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
$gcc_config_arguments
EOF
+# Remove host machine's build path from config arguments
+sed -i 's|'${BUILD_ROOT_DIR:-/nonexistent}'|/build|g' conftest.out
gcc_config_arguments_str=`cat conftest.out`
rm -f conftest.out
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d7cf0b92c..5be002278 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2200,6 +2200,8 @@ fi
sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
$gcc_config_arguments
EOF
+# Remove host machine's build path from config arguments
+sed -i 's|'${BUILD_ROOT_DIR:-/nonexistent}'|/build|g' conftest.out
gcc_config_arguments_str=`cat conftest.out`
rm -f conftest.out
--
2.30.2
|