diff options
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch')
-rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch b/recipes-connectivity/openssl/openssl-qoriq/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch new file mode 100644 index 00000000..949c7883 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-qoriq/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From 3e1d00481093e10775eaf69d619c45b32a4aa7dc Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com> | ||
3 | Date: Tue, 6 Nov 2018 14:50:47 +0100 | ||
4 | Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler | ||
5 | info | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | The openssl build system generates buildinf.h containing the full | ||
11 | compiler command line used to compile objects. This breaks | ||
12 | reproducibility, as the compile command is baked into libcrypto, where | ||
13 | it is used when running `openssl version -f`. | ||
14 | |||
15 | Add stripped build variables for the compiler and cflags lines, and use | ||
16 | those when generating buildinfo.h. | ||
17 | |||
18 | This is based on a similar patch for older openssl versions: | ||
19 | https://patchwork.openembedded.org/patch/147229/ | ||
20 | |||
21 | Upstream-Status: Inappropriate [OE specific] | ||
22 | Signed-off-by: Martin Hundebøll <martin@geanix.com> | ||
23 | |||
24 | |||
25 | Update to fix buildpaths qa issue for '-fmacro-prefix-map'. | ||
26 | |||
27 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
28 | --- | ||
29 | Configurations/unix-Makefile.tmpl | 10 +++++++++- | ||
30 | crypto/build.info | 2 +- | ||
31 | 2 files changed, 10 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl | ||
34 | index 16af4d2087..54c162784c 100644 | ||
35 | --- a/Configurations/unix-Makefile.tmpl | ||
36 | +++ b/Configurations/unix-Makefile.tmpl | ||
37 | @@ -317,13 +317,22 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (), | ||
38 | '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} | ||
39 | BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) | ||
40 | |||
41 | -# CPPFLAGS_Q is used for one thing only: to build up buildinf.h | ||
42 | +# *_Q variables are used for one thing only: to build up buildinf.h | ||
43 | CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; | ||
44 | $cppflags2 =~ s|([\\"])|\\$1|g; | ||
45 | $lib_cppflags =~ s|([\\"])|\\$1|g; | ||
46 | join(' ', $lib_cppflags || (), $cppflags2 || (), | ||
47 | $cppflags1 || ()) -} | ||
48 | |||
49 | +CFLAGS_Q={- for (@{$config{CFLAGS}}) { | ||
50 | + s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g; | ||
51 | + s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g; | ||
52 | + } | ||
53 | + join(' ', @{$config{CFLAGS}}) -} | ||
54 | + | ||
55 | +CC_Q={- $config{CC} =~ s|--sysroot=[^ ]+|--sysroot=recipe-sysroot|g; | ||
56 | + join(' ', $config{CC}) -} | ||
57 | + | ||
58 | PERLASM_SCHEME= {- $target{perlasm_scheme} -} | ||
59 | |||
60 | # For x86 assembler: Set PROCESSOR to 386 if you want to support | ||
61 | diff --git a/crypto/build.info b/crypto/build.info | ||
62 | index b515b7318e..8c9cee2a09 100644 | ||
63 | --- a/crypto/build.info | ||
64 | +++ b/crypto/build.info | ||
65 | @@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \ | ||
66 | ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl | ||
67 | |||
68 | DEPEND[cversion.o]=buildinf.h | ||
69 | -GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" | ||
70 | +GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)" | ||
71 | DEPEND[buildinf.h]=../configdata.pm | ||
72 | |||
73 | GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME) | ||
74 | -- | ||
75 | 2.19.1 | ||
76 | |||