configure: adding ppc64le to supported host CPUs
PATCH v3 1/1 configure: adding ppc64le to supported host CPUs
When executing 'configure' in a fresh QEMU clone, in a fresh OS install running in a ppc64le host, this is the error shown:
-----
../configure --enable-trace-backend=simple --enable-debug
--target-list=ppc64-softmmu
ERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter
-----
This isn't true, ppc64le host CPU is supported. This happens because, in a fresh install, we don't have a C compiler to autodetect the $cpu variable to "ppc64".
Since we need a C compiler to properly get the value of $cpu in this and other cases, this patch changes the location of the C compiler check right after setting the preferred CC.
--- configure | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
configure +17 -17
@@ -467,6 +467,23 @@ else cc="${CC-${cross_prefix}gcc}" fi +write_c_skeleton() { + cat > $TMPC <<EOF +int main(void) { return 0; } +EOF +} + +# check that the C compiler works. +write_c_skeleton; +if compile_object ; then + : C compiler works ok +else + error_exit "\"$cc\" either does not exist or does not work" +fi +if ! compile_prog ; then + error_exit "\"$cc\" cannot build an executable (is your linker broken?)" +fi + if test -z "${CXX}${cross_prefix}"; then cxx="c++" else
@@ -537,12 +554,6 @@ EOF compile_object } -write_c_skeleton() { - cat > $TMPC <<EOF -int main(void) { return 0; } -EOF -} - if check_define __linux__ ; then targetos="Linux" elif check_define _WIN32 ; then
@@ -1593,17 +1604,6 @@ if test -z "$werror" ; then fi fi -# check that the C compiler works. -write_c_skeleton; -if compile_object ; then - : C compiler works ok -else - error_exit "\"$cc\" either does not exist or does not work" -fi -if ! compile_prog ; then - error_exit "\"$cc\" cannot build an executable (is your linker broken?)" -fi - if test "$bogus_os" = "yes"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used
Signature · 1 line
2.13.6
The commit title/subject is misleading. I'll resend with a better commit title.
Quoted 85 lines · Daniel Henrique Barboza
When executing 'configure' in a fresh QEMU clone, in a fresh OS install running in a ppc64le host, this is the error shown:
-----
../configure --enable-trace-backend=simple --enable-debug
--target-list=ppc64-softmmuERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter
-----
This isn't true, ppc64le host CPU is supported. This happens because, in a fresh install, we don't have a C compiler to autodetect the $cpu variable to "ppc64".
Since we need a C compiler to properly get the value of $cpu in this and other cases, this patch changes the location of the C compiler check right after setting the preferred CC.
Signed-off-by Daniel Henrique Barboza <[email protected]>--- configure | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)configure +17
-17@@ -467,6 +467,23 @@ else cc="${CC-${cross_prefix}gcc}" fi +write_c_skeleton() { + cat > $TMPC <<EOF +int main(void) { return 0; } +EOF +} + +# check that the C compiler works. +write_c_skeleton; +if compile_object ; then + : C compiler works ok +else + error_exit "\"$cc\" either does not exist or does not work" +fi +if ! compile_prog ; then + error_exit "\"$cc\" cannot build an executable (is your linker broken?)" +fi + if test -z "${CXX}${cross_prefix}"; then cxx="c++" else@@ -537,12 +554,6 @@ EOF compile_object } -write_c_skeleton() { - cat > $TMPC <<EOF -int main(void) { return 0; } -EOF -} - if check_define __linux__ ; then targetos="Linux" elif check_define _WIN32 ; then@@ -1593,17 +1604,6 @@ if test -z "$werror" ; then fi fi -# check that the C compiler works. -write_c_skeleton; -if compile_object ; then - : C compiler works ok -else - error_exit "\"$cc\" either does not exist or does not work" -fi -if ! compile_prog ; then - error_exit "\"$cc\" cannot build an executable (is your linker broken?)" -fi - if test "$bogus_os" = "yes"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used
Hi Daniel,
Quoted 13 lines · Daniel Henrique Barboza
When executing 'configure' in a fresh QEMU clone, in a fresh OS install running in a ppc64le host, this is the error shown:
-----
../configure --enable-trace-backend=simple --enable-debug
--target-list=ppc64-softmmuERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter
-----
Quoted 7 lines
This isn't true, ppc64le host CPU is supported. This happens because, in a fresh install, we don't have a C compiler to autodetect the $cpu variable to "ppc64".
Since we need a C compiler to properly get the value of $cpu in this and other cases, this patch changes the location of the C compiler check right after setting the preferred CC.
Can you add the output of the new behavior?
Also please update the subject, then:
Quoted 66 lines
Signed-off-by Daniel Henrique Barboza <[email protected]>--- configure | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)configure +17
-17@@ -467,6 +467,23 @@ else cc="${CC-${cross_prefix}gcc}" fi +write_c_skeleton() { + cat > $TMPC <<EOF +int main(void) { return 0; } +EOF +} + +# check that the C compiler works. +write_c_skeleton; +if compile_object ; then + : C compiler works ok +else + error_exit "\"$cc\" either does not exist or does not work" +fi +if ! compile_prog ; then + error_exit "\"$cc\" cannot build an executable (is your linker broken?)" +fi + if test -z "${CXX}${cross_prefix}"; then cxx="c++" else@@ -537,12 +554,6 @@ EOF compile_object } -write_c_skeleton() { - cat > $TMPC <<EOF -int main(void) { return 0; } -EOF -} - if check_define __linux__ ; then targetos="Linux" elif check_define _WIN32 ; then@@ -1593,17 +1604,6 @@ if test -z "$werror" ; then fi fi -# check that the C compiler works. -write_c_skeleton; -if compile_object ; then - : C compiler works ok -else - error_exit "\"$cc\" either does not exist or does not work" -fi -if ! compile_prog ; then - error_exit "\"$cc\" cannot build an executable (is your linker broken?)" -fi - if test "$bogus_os" = "yes"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used
Quoted 20 lines · Philippe Mathieu-Daudé
Hi Daniel,
Quoted 17 lines · Daniel Henrique Barboza
When executing 'configure' in a fresh QEMU clone, in a fresh OS install running in a ppc64le host, this is the error shown:
-----
../configure --enable-trace-backend=simple --enable-debug
--target-list=ppc64-softmmuERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter
-----
This isn't true, ppc64le host CPU is supported. This happens because, in a fresh install, we don't have a C compiler to autodetect the $cpu variable to "ppc64".
Quoted 7 lines
Quoted 3 lines
Since we need a C compiler to properly get the value of $cpu in this and other cases, this patch changes the location of the C compiler check right after setting the preferred CC.
Can you add the output of the new behavior?
Also please update the subject, then:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Hey!
I've updated the subject in the v4 already.
The output didn't change: in my test scenario (fresh OS with no CC installed in a ppc64le host), if I try to run configure I get:
../configure --enable-trace-backend=simple --enable-debug --target-list=ppc64-softmmu
ERROR: "cc" either does not exist or does not work
Instead of an error message saying that ppc64le isn't supported.
Daniel
Quoted 66 lines
Quoted 66 lines
Signed-off-by Daniel Henrique Barboza <[email protected]>--- configure | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)configure +17
-17@@ -467,6 +467,23 @@ else cc="${CC-${cross_prefix}gcc}" fi +write_c_skeleton() { + cat > $TMPC <<EOF +int main(void) { return 0; } +EOF +} + +# check that the C compiler works. +write_c_skeleton; +if compile_object ; then + : C compiler works ok +else + error_exit "\"$cc\" either does not exist or does not work" +fi +if ! compile_prog ; then + error_exit "\"$cc\" cannot build an executable (is your linker broken?)" +fi + if test -z "${CXX}${cross_prefix}"; then cxx="c++" else@@ -537,12 +554,6 @@ EOF compile_object } -write_c_skeleton() { - cat > $TMPC <<EOF -int main(void) { return 0; } -EOF -} - if check_define __linux__ ; then targetos="Linux" elif check_define _WIN32 ; then@@ -1593,17 +1604,6 @@ if test -z "$werror" ; then fi fi -# check that the C compiler works. -write_c_skeleton; -if compile_object ; then - : C compiler works ok -else - error_exit "\"$cc\" either does not exist or does not work" -fi -if ! compile_prog ; then - error_exit "\"$cc\" cannot build an executable (is your linker broken?)" -fi - if test "$bogus_os" = "yes"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used