public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] toolchain.eclass: Don't prefixify dynamic linker for cross-compilers
@ 2025-01-02 16:38 James Le Cuirot
  2025-01-02 19:49 ` Sam James
  0 siblings, 1 reply; 2+ messages in thread
From: James Le Cuirot @ 2025-01-02 16:38 UTC (permalink / raw
  To: gentoo-dev; +Cc: James Le Cuirot

Cross environments within a prefixed system do not have a nested prefix,
i.e. they are located at ${EPREFIX}/usr/${CHOST}, not
${EPREFIX}/usr/${CHOST}/${EPREFIX}. Binaries built with the
cross-compiler should therefore get an unprefixed dynamic linker path by
default so that they work out of the box with QEMU's -L option.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index c605c437f355a..f5d3b83c2e03b 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -716,7 +716,7 @@ toolchain_src_prepare() {
 
 	gnuconfig_update
 
-	if ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then
+	if ! is_crosscompile && ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then
 		einfo "Prefixifying dynamic linkers..."
 		for f in gcc/config/*/*linux*.h ; do
 			ebegin "  Updating ${f}"
-- 
2.47.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] [PATCH] toolchain.eclass: Don't prefixify dynamic linker for cross-compilers
  2025-01-02 16:38 [gentoo-dev] [PATCH] toolchain.eclass: Don't prefixify dynamic linker for cross-compilers James Le Cuirot
@ 2025-01-02 19:49 ` Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-01-02 19:49 UTC (permalink / raw
  To: James Le Cuirot; +Cc: gentoo-dev

James Le Cuirot <chewi@gentoo.org> writes:

> Cross environments within a prefixed system do not have a nested prefix,
> i.e. they are located at ${EPREFIX}/usr/${CHOST}, not
> ${EPREFIX}/usr/${CHOST}/${EPREFIX}. Binaries built with the
> cross-compiler should therefore get an unprefixed dynamic linker path by
> default so that they work out of the box with QEMU's -L option.

Remember to CC eclass maintainers.

Looks good.

>
> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
> ---
>  eclass/toolchain.eclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
> index c605c437f355a..f5d3b83c2e03b 100644
> --- a/eclass/toolchain.eclass
> +++ b/eclass/toolchain.eclass
> @@ -716,7 +716,7 @@ toolchain_src_prepare() {
>  
>  	gnuconfig_update
>  
> -	if ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then
> +	if ! is_crosscompile && ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then
>  		einfo "Prefixifying dynamic linkers..."
>  		for f in gcc/config/*/*linux*.h ; do
>  			ebegin "  Updating ${f}"


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-02 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 16:38 [gentoo-dev] [PATCH] toolchain.eclass: Don't prefixify dynamic linker for cross-compilers James Le Cuirot
2025-01-02 19:49 ` Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox