Skip to contentSkip to conversation

fix python3 do_configure failed on meta-fsl-ppc with MACHINE = "p1022ds"

PATCH Superseded Hongxu Jia 2 participants 4 messages Mar 9, 2016 – Mar 10, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover fix python3 do_configure failed on meta-fsl-ppc with MACHINE = "p1022ds"

I am running a world build, and find build failures:
- usdpaa do_compile failed
Send patch to meta-freescale mailing list "usdpaa: remove default -mcpu=e500mc64 in Makefile"

- pywbem do_compile failed
Already a patch in oe-dev for discussing "[oe] [meta-python][jethro][fido][PATCH] python-m2crypto: fix SSLv2 symbol issue"

The world build is not finished, and other failures is in analysis.

//Hongxu

The following changes since commit 5ac3dc76a5afc2ed35b1abfc8e330e0c580eadf0:

image.bbclass: fix incomplete .rootfs customization (2016-03-07 22:10:54 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib hongxu/fix-python3-gcc
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-buildpath

Hongxu Jia (1):
tune-ppce500v2.inc: explicitly set gcc float

 meta/conf/machine/include/tune-ppce500v2.inc | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 tune-ppce500v2.inc: explicitly set gcc float

For powerpc*-*-*spe*, default to with_cpu=8548 if --enable-e500-double, and to 8540 otherwise.
vim gcc/config.gcc
...

    powerpc*-*-*spe*)
      if test x$enable_e500_double = xyes; then
         with_cpu=8548
      else
         with_cpu=8540
      fi
      ;;

...

The with_cpu is used for SPE version detection
vim ./gcc/config/rs6000/t-linux
...
7 ifneq (,$(findstring spe,$(target)))
8 MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1) 9 else
10 MULTIARCH_DIRNAME := powerpc-linux-gnu
...

The variable MULTIARCH_DIRNAME is the output of '$CC --print-multiarch'. Without this patch, the output is 'powerpc-linux-gnuspev1' which caused python3 do_configure failed.

Since ppce500v2 -mcpu is 8548, explicitly add --enable-e500-double could fix the issue.

[YOCTO #9226]

---
 meta/conf/machine/include/tune-ppce500v2.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/conf/machine/include/tune-ppce500v2.inc +4 -0
index 20a5f25..70d3078 100644
@@ -18,3 +18,7 @@ AVAILTUNES += "ppce500v2"
 TUNE_FEATURES_tune-ppce500v2 = "m32 spe ppce500v2"
 TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
 PACKAGE_EXTRA_ARCHS_tune-ppce500v2 = "ppce500v2"
+
+# For powerpc*-*-*spe*, default to with_cpu=8548 if
+# --enable-e500-double, and to 8540 otherwise.
+EXTRA_OECONF_GCC_FLOAT += "${@get_gcc_float_setting(bb, d)}"
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 1/1] tune-ppce500v2.inc: explicitly set gcc float

Quoted 47 lines · Hongxu Jia

For powerpc*-*-*spe*, default to with_cpu=8548 if --enable-e500 -double,
and to 8540 otherwise.
vim gcc/config.gcc
...

    powerpc*-*-*spe*)
      if test x$enable_e500_double = xyes; then
         with_cpu=8548
      else
         with_cpu=8540
      fi
      ;;

...

The with_cpu is used for SPE version detection
vim ./gcc/config/rs6000/t-linux
...
7 ifneq (,$(findstring spe,$(target)))
8 MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring
8548,$(with_cpu)),,v1)
9 else
10 MULTIARCH_DIRNAME := powerpc-linux-gnu
...

The variable MULTIARCH_DIRNAME is the output of '$CC --print -multiarch'.
Without this patch, the output is 'powerpc-linux-gnuspev1' which caused
python3 do_configure failed.

Since ppce500v2 -mcpu is 8548, explicitly add --enable-e500-double could fix
the issue.

[YOCTO #9226]

---
 meta/conf/machine/include/tune-ppce500v2.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/conf/machine/include/tune-ppce500v2.inc +0 -0
index 20a5f25..70d3078 100644

meta/conf/machine/include/tune-ppce500v2.inc AVAILTUNES += "ppce500v2" · line 24

Quoted 7 lines
meta/conf/machine/include/tune-ppce500v2.inc +4 -0
@@ -18,3 +18,7 @@ AVAILTUNES += "ppce500v2"
 TUNE_FEATURES_tune-ppce500v2 = "m32 spe ppce500v2"
 TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
 PACKAGE_EXTRA_ARCHS_tune-ppce500v2 = "ppce500v2"
+
+# For powerpc*-*-*spe*, default to with_cpu=8548 if
+# --enable-e500-double, and to 8540 otherwise.
+EXTRA_OECONF_GCC_FLOAT += "${@get_gcc_float_setting(bb, d)}"

This is good to understand what is breaking but the patch as it stands can't be merged as the gcc recipe intentionally doesn't do this, its only done in gcc-target.inc.

Why?

The theory is we should be building one gcc-cross-powerpc, not multiple different variants. I did just try a build and realised that switching machines between p1022ds and qemuppc does rebuild gcc-cross-powerpc but that is a bug. Adding the above is just going to make this harder to fix, and will certainly break the SDK gcc-cross-canadian-gcc.

I'm not sure how we should fix this, particularly given that gcc-cross -powerpc already isn't working properly but the avoid fix isn't right.

Cheers,

Richard

author
#3 lore raw

Re: [PATCH 1/1] tune-ppce500v2.inc: explicitly set gcc float

Quoted 7 lines · Richard Purdie
Quoted 4 lines

+

Review

Quoted 3 lines
(quoted diff) +3 -0
+# For powerpc*-*-*spe*, default to with_cpu=8548 if
+# --enable-e500-double, and to 8540 otherwise.
+EXTRA_OECONF_GCC_FLOAT += "${@get_gcc_float_setting(bb, d)}"

This is good to understand what is breaking but the patch as it stands can't be merged as the gcc recipe intentionally doesn't do this, its only done in gcc-target.inc.

Yes, that is also my worry about, I am not sure why its only done in gcc-tareget.inc.

Quoted 10 lines

Why?

The theory is we should be building one gcc-cross-powerpc, not multiple different variants. I did just try a build and realised that switching machines between p1022ds and qemuppc does rebuild gcc-cross-powerpc but that is a bug. Adding the above is just going to make this harder to fix, and will certainly break the SDK gcc-cross-canadian-gcc.

I'm not sure how we should fix this, particularly given that gcc-cross -powerpc already isn't working properly but the avoid fix isn't right.

1. How about directly fix python3. Allow the platform triplet 'powerpc-linux-gnuspev1', It should not have any side effect on python3

configure.ac +1 -1
index 9eb3d22..9b4e8ab 100644
@@ -850,7 +850,7 @@ fi
 rm -f conftest.c conftest.out
 
 if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
-  if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
+  if test x$PLATFORM_TRIPLET != x$MULTIARCH && test xpowerpc-linux-gnuspev1 != x$MULTIARCH; then
     AC_MSG_ERROR([internal configure error for the platform triplet, 

please file a bug report])
fi
fi

2. Since the above only done in gcc-tareget.inc, how about apply the following fix to gcc-cross.inc and gcc-cross-canadian.inc, we do not check cpu while powerpc pse.

gcc/config/rs6000/t-linux +1 -1
index 4cb63bd..5e10fa4 100644
@@ -5,7 +5,7 @@ ifneq (,$(findstring powerpc64,$(target)))
 MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
 else
 ifneq (,$(findstring spe,$(target)))
-MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
+MULTIARCH_DIRNAME := powerpc-linux-gnuspe
 else
 MULTIARCH_DIRNAME := powerpc-linux-gnu
 endif

I know both of them are workaround.

//Hongxu

Quoted 7 lines

Cheers,

Richard