diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-06-25 23:22:26 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-07-20 12:10:40 -1000 |
| commit | 1f2b28e9c6f350f0cd9e8e74c3c5d449ad057a5c (patch) | |
| tree | c20e9f8eaac3a119f14e579d6dece47ebadabb6b /meta | |
| parent | 833cbde6c12410b8fe9e1089470713b1172be0c9 (diff) | |
| download | poky-1f2b28e9c6f350f0cd9e8e74c3c5d449ad057a5c.tar.gz | |
rust-common.bbclass: move musl-specific linking fix from rust-source.inc
This needs to be done for any item that is linked under rustc,
and not just rust itself. Latest python-cryptography exposes the issue.
(From OE-Core rev: 967d847a9815df43d0c92ca61cc544e1fe5dcc03)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d3811228747590ea06e8d68be4785d45ec9c478f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/rust-common.bbclass | 4 | ||||
| -rw-r--r-- | meta/recipes-devtools/rust/rust-source.inc | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/meta/classes-recipe/rust-common.bbclass b/meta/classes-recipe/rust-common.bbclass index e0cedd7aa2..878272721c 100644 --- a/meta/classes-recipe/rust-common.bbclass +++ b/meta/classes-recipe/rust-common.bbclass | |||
| @@ -158,6 +158,10 @@ WRAPPER_TARGET_CXX = "${CXX}" | |||
| 158 | WRAPPER_TARGET_CCLD = "${CCLD}" | 158 | WRAPPER_TARGET_CCLD = "${CCLD}" |
| 159 | WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}" | 159 | WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}" |
| 160 | WRAPPER_TARGET_EXTRALD = "" | 160 | WRAPPER_TARGET_EXTRALD = "" |
| 161 | # see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch | ||
| 162 | # we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'" | ||
| 163 | # when building MACHINE=qemux86 for musl | ||
| 164 | WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared" | ||
| 161 | WRAPPER_TARGET_AR = "${AR}" | 165 | WRAPPER_TARGET_AR = "${AR}" |
| 162 | 166 | ||
| 163 | # compiler is used by gcc-rs | 167 | # compiler is used by gcc-rs |
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index b25b5c17e8..0534e59c35 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc | |||
| @@ -17,8 +17,3 @@ export TARGET_VENDOR | |||
| 17 | 17 | ||
| 18 | UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" | 18 | UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" |
| 19 | UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src" | 19 | UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src" |
| 20 | |||
| 21 | # see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch | ||
| 22 | # we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'" | ||
| 23 | # when building MACHINE=qemux86 for musl | ||
| 24 | WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared" | ||
