Skip to contentSkip to conversation

configure: pass correct cflags to container-based cross compilers

PATCH In review Paolo Bonzini 3 participants 3 messages Jul 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: pass correct cflags to container-based cross compilers

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.

Fixes 92e288fcfb ("build: try both native and cross compilers", 2022-07-08)
---
 configure | 1 -
 1 file changed, 1 deletion(-)
configure +0 -1
index c4c02b8438..72ab03f11a 100755
@@ -2173,7 +2173,6 @@ probe_target_compiler() {
     build_static=
     target_cc=
     target_ccas=
-    target_cflags=
     target_ar=
     target_as=
     target_ld=
Signature · 1 line
2.36.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Paolo Bonzini

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.

Fixes 92e288fcfb ("build: try both native and cross compilers", 2022-07-08)
---
  configure | 1 -
  1 file changed, 1 deletion(-)
configure +0 -0
index c4c02b8438..72ab03f11a 100755

configure probe_target_compiler() { · line 2178

Quoted 7 lines
configure +0 -1
@@ -2173,7 +2173,6 @@ probe_target_compiler() {
      build_static=
      target_cc=
      target_ccas=
-    target_cflags=
      target_ar=
      target_as=
      target_ld=

r~

Reviewed-by
#2 lore raw
Quoted 42 lines

-----Original Message-----
From: Richard Henderson <[email protected]>
Sent: Thursday, July 28, 2022 5:11 PM
To: Paolo Bonzini <[email protected]>; [email protected]
Cc: Taylor Simpson <[email protected]>
Subject: Re: [PATCH] configure: pass correct cflags to container-based cross compilers

Quoted 6 lines · Paolo Bonzini

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.

Quoted 14 lines
Fixes 92e288fcfb ("build: try both native and cross compilers",

2022-07-08)

---
  configure | 1 -
  1 file changed, 1 deletion(-)
configure +0 -0
index c4c02b8438..72ab03f11a 100755

configure probe_target_compiler() { · line 2178

Quoted 7 lines
configure +0 -1
@@ -2173,7 +2173,6 @@ probe_target_compiler() {
      build_static=
      target_cc=
      target_ccas=
-    target_cflags=
      target_ar=
      target_as=
      target_ld=
Quoted 1 line

r~