All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] configure: pass correct cflags to container-based cross compilers
@ 2022-07-28 22:22 Paolo Bonzini
  2022-07-28 23:10 ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2022-07-28 22:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Taylor Simpson

probe_target_compiler returns nonempty $target_cc for installed toolchains
and $container_cross_cc for container-based toolchains.  In both cases
however the flags (coming from $cross_cc_cflags_${target_arch}) must be
in $target_cflags.

Therefore, do not clear them prior to returning from probe_target_compiler.

Reported-by: Taylor Simpson <tsimpson@quicinc.com>
Fixes: 92e288fcfb ("build: try both native and cross compilers", 2022-07-08)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure b/configure
index c4c02b8438..72ab03f11a 100755
--- a/configure
+++ b/configure
@@ -2173,7 +2173,6 @@ probe_target_compiler() {
     build_static=
     target_cc=
     target_ccas=
-    target_cflags=
     target_ar=
     target_as=
     target_ld=
-- 
2.36.1



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

* Re: [PATCH] configure: pass correct cflags to container-based cross compilers
  2022-07-28 22:22 [PATCH] configure: pass correct cflags to container-based cross compilers Paolo Bonzini
@ 2022-07-28 23:10 ` Richard Henderson
  2022-07-28 23:53   ` Taylor Simpson
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2022-07-28 23:10 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: Taylor Simpson

On 7/28/22 15:22, Paolo Bonzini wrote:
> probe_target_compiler returns nonempty $target_cc for installed toolchains
> and $container_cross_cc for container-based toolchains.  In both cases
> however the flags (coming from $cross_cc_cflags_${target_arch}) must be
> in $target_cflags.
> 
> Therefore, do not clear them prior to returning from probe_target_compiler.
> 
> Reported-by: Taylor Simpson <tsimpson@quicinc.com>
> Fixes: 92e288fcfb ("build: try both native and cross compilers", 2022-07-08)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/configure b/configure
> index c4c02b8438..72ab03f11a 100755
> --- a/configure
> +++ b/configure
> @@ -2173,7 +2173,6 @@ probe_target_compiler() {
>       build_static=
>       target_cc=
>       target_ccas=
> -    target_cflags=
>       target_ar=
>       target_as=
>       target_ld=

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* RE: [PATCH] configure: pass correct cflags to container-based cross compilers
  2022-07-28 23:10 ` Richard Henderson
@ 2022-07-28 23:53   ` Taylor Simpson
  0 siblings, 0 replies; 3+ messages in thread
From: Taylor Simpson @ 2022-07-28 23:53 UTC (permalink / raw)
  To: Richard Henderson, Paolo Bonzini, qemu-devel



> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Thursday, July 28, 2022 5:11 PM
> To: Paolo Bonzini <pbonzini@redhat.com>; qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>
> Subject: Re: [PATCH] configure: pass correct cflags to container-based cross
> compilers
> 
> On 7/28/22 15:22, Paolo Bonzini wrote:
> > probe_target_compiler returns nonempty $target_cc for installed
> > toolchains and $container_cross_cc for container-based toolchains.  In
> > both cases however the flags (coming from
> > $cross_cc_cflags_${target_arch}) must be in $target_cflags.
> >
> > Therefore, do not clear them prior to returning from
> probe_target_compiler.
> >
> > Reported-by: Taylor Simpson <tsimpson@quicinc.com>
> > Fixes: 92e288fcfb ("build: try both native and cross compilers",
> > 2022-07-08)
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   configure | 1 -
> >   1 file changed, 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index c4c02b8438..72ab03f11a 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2173,7 +2173,6 @@ probe_target_compiler() {
> >       build_static=
> >       target_cc=
> >       target_ccas=
> > -    target_cflags=
> >       target_ar=
> >       target_as=
> >       target_ld=
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> 
> r~

Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>

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

end of thread, other threads:[~2022-07-28 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 22:22 [PATCH] configure: pass correct cflags to container-based cross compilers Paolo Bonzini
2022-07-28 23:10 ` Richard Henderson
2022-07-28 23:53   ` Taylor Simpson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.