diff options
-rw-r--r-- | meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch index cf9ebfb3e6..ea5bba8891 100644 --- a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch +++ b/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch | |||
@@ -1,31 +1,49 @@ | |||
1 | From 0f66e796a8522e1043dda03b88d5f6feae839d16 Mon Sep 17 00:00:00 2001 | 1 | From 7d9817ca935a35fe6c8e2c2c7615825fa08a3a19 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: "simit.ghane" <simit.ghane@lge.com> |
3 | Date: Wed, 16 Aug 2017 10:44:41 +0800 | 3 | Date: Tue, 7 May 2024 14:09:03 +0530 |
4 | Subject: [PATCH] libgcrypt: fix building error with '-O2' in sysroot path | 4 | Subject: [PATCHV2] Fix building error with '-O2' in sysroot path |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Backport [https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=7d9817ca935a35fe6c8e2c2c7615825fa08a3a19 |
7 | https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=e96df0c82e086bf348753d2d0fa37fa6191b4b14 | ||
8 | https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=5afadba008918d651afefb842ae123cc18454c74] | ||
9 | |||
10 | * cipher/Makefile.am (o_flag_munging): Tweak the sed script. | ||
11 | * random/Makefile.am (o_flag_munging): Ditto. | ||
12 | -- | ||
13 | |||
14 | Characters like '-O2' or '-Ofast' will be replaced by '-O1' and '-O0' | ||
15 | respectively when compiling cipher and random in the filesystem | ||
16 | paths as well if they happen to contain '-O2' or '-Ofast | ||
7 | 17 | ||
8 | Characters like '-O2' or '-Ofast' will be replaced by '-O1' when | ||
9 | compiling cipher. | ||
10 | If we are cross compiling libgcrypt and sysroot contains such | 18 | If we are cross compiling libgcrypt and sysroot contains such |
11 | characters, we would | 19 | characters, we would |
12 | get compile errors because the sysroot path has been modified. | 20 | get compile errors because the sysroot path has been modified. |
13 | 21 | ||
14 | Fix this by adding blank spaces before and after the original matching | 22 | Fix this by adding blank spaces and tabs before the original matching |
15 | pattern in the | 23 | pattern in the sed command. |
16 | sed command. | 24 | |
25 | Signed-off-by: simit.ghane <simit.ghane@lge.com> | ||
26 | |||
27 | ChangeLog entries added by wk | ||
28 | |||
29 | Note that there is also the configure option --disable-O-flag-munging; | ||
30 | see the README. | ||
17 | 31 | ||
18 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 32 | random:cipher: handle substitution in sed command |
19 | 33 | ||
20 | Rebase to 1.8.0 | 34 | * cipher/Makefile.am (o_flag_munging): Add 'g' flag for first sed |
21 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 35 | expression. |
36 | * random/Makefile.am (o_flag_munging): Likewise. | ||
22 | 37 | ||
38 | [jk: add changelog to commit message] | ||
39 | Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> | ||
23 | --- | 40 | --- |
24 | cipher/Makefile.am | 2 +- | 41 | cipher/Makefile.am | 2 +- |
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | 42 | random/Makefile.am | 2 +- |
43 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
26 | 44 | ||
27 | diff --git a/cipher/Makefile.am b/cipher/Makefile.am | 45 | diff --git a/cipher/Makefile.am b/cipher/Makefile.am |
28 | index c3d642b..88c883a 100644 | 46 | index c3d642b2ac..f1c3971c40 100644 |
29 | --- a/cipher/Makefile.am | 47 | --- a/cipher/Makefile.am |
30 | +++ b/cipher/Makefile.am | 48 | +++ b/cipher/Makefile.am |
31 | @@ -153,7 +153,7 @@ gost-s-box: gost-s-box.c | 49 | @@ -153,7 +153,7 @@ gost-s-box: gost-s-box.c |
@@ -33,7 +51,20 @@ index c3d642b..88c883a 100644 | |||
33 | 51 | ||
34 | if ENABLE_O_FLAG_MUNGING | 52 | if ENABLE_O_FLAG_MUNGING |
35 | -o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g' | 53 | -o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g' |
36 | +o_flag_munging = sed -e 's/ -O\([2-9sgz][2-9sgz]*\) / -O1 /' -e 's/ -Ofast / -O1 /g' | 54 | +o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O1 /g' -e 's/[[:blank:]]-Ofast/ -O1 /g' |
55 | else | ||
56 | o_flag_munging = cat | ||
57 | endif | ||
58 | diff --git a/random/Makefile.am b/random/Makefile.am | ||
59 | index 0c935a0595..340df38a79 100644 | ||
60 | --- a/random/Makefile.am | ||
61 | +++ b/random/Makefile.am | ||
62 | @@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h | ||
63 | |||
64 | # The rndjent module needs to be compiled without optimization. */ | ||
65 | if ENABLE_O_FLAG_MUNGING | ||
66 | -o_flag_munging = sed -e 's/-O\([1-9sgz][1-9sgz]*\)/-O0/g' -e 's/-Ofast/-O0/g' | ||
67 | +o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g' | ||
37 | else | 68 | else |
38 | o_flag_munging = cat | 69 | o_flag_munging = cat |
39 | endif | 70 | endif |