All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] python3: fix build on softfloat mips
@ 2019-06-06 15:59 Matthias Schoepfer
  2019-06-06 16:03 ` Burton, Ross
  2019-06-08  4:09 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Schoepfer @ 2019-06-06 15:59 UTC (permalink / raw)
  To: openembedded-core

This patch originally only meant to correct the python3 build for mips
with softfloat, as the original test only checked for mips hardfloat.

Replaced custom C Program for triplet detection with autotools triplet
detection.

Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196]

Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
---
 ...-detection-of-mips-architecture-for-.patch | 198 ++++++++++++++++++
 meta/recipes-devtools/python/python3_3.7.3.bb |   1 +
 2 files changed, 199 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch

diff --git a/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
new file mode 100644
index 0000000000..8325cecc29
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
@@ -0,0 +1,198 @@
+From 7535c39951b9d15dd64c4669092a8582ba555466 Mon Sep 17 00:00:00 2001
+From: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
+Date: Fri, 31 May 2019 15:34:34 +0200
+Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft
+ float
+
+When (cross) compiling for softfloat mips, __mips_hard_float will not be
+defined and detection of OS triplet in configure.ac / configure will fail.
+
+This also has to do with the custom detection of the build triplet. Trying
+to do this in a more autoconf/autotools manner.
+---
+ configure.ac | 169 ++++++---------------------------------------------
+ 1 file changed, 17 insertions(+), 152 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a7de901e08..a73e2de51b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -727,158 +727,23 @@ fi
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+ AC_SUBST(MULTIARCH)
+ 
+-AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
+-cat >> conftest.c <<EOF
+-#undef bfin
+-#undef cris
+-#undef fr30
+-#undef linux
+-#undef hppa
+-#undef hpux
+-#undef i386
+-#undef mips
+-#undef powerpc
+-#undef sparc
+-#undef unix
+-#if defined(__ANDROID__)
+-    # Android is not a multiarch system.
+-#elif defined(__linux__)
+-# if defined(__x86_64__) && defined(__LP64__)
+-        x86_64-linux-gnu
+-# elif defined(__x86_64__) && defined(__ILP32__)
+-        x86_64-linux-gnux32
+-# elif defined(__i386__)
+-        i386-linux-gnu
+-# elif defined(__aarch64__) && defined(__AARCH64EL__)
+-#  if defined(__ILP32__)
+-        aarch64_ilp32-linux-gnu
+-#  else
+-        aarch64-linux-gnu
+-#  endif
+-# elif defined(__aarch64__) && defined(__AARCH64EB__)
+-#  if defined(__ILP32__)
+-        aarch64_be_ilp32-linux-gnu
+-#  else
+-        aarch64_be-linux-gnu
+-#  endif
+-# elif defined(__alpha__)
+-        alpha-linux-gnu
+-# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
+-#  if defined(__ARMEL__)
+-        arm-linux-gnueabihf
+-#  else
+-        armeb-linux-gnueabihf
+-#  endif
+-# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
+-#  if defined(__ARMEL__)
+-        arm-linux-gnueabi
+-#  else
+-        armeb-linux-gnueabi
+-#  endif
+-# elif defined(__hppa__)
+-        hppa-linux-gnu
+-# elif defined(__ia64__)
+-        ia64-linux-gnu
+-# elif defined(__m68k__) && !defined(__mcoldfire__)
+-        m68k-linux-gnu
+-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
+-#  if _MIPS_SIM == _ABIO32
+-        mipsisa32r6el-linux-gnu
+-#  elif _MIPS_SIM == _ABIN32
+-        mipsisa64r6el-linux-gnuabin32
+-#  elif _MIPS_SIM == _ABI64
+-        mipsisa64r6el-linux-gnuabi64
+-#  else
+-#   error unknown platform triplet
+-#  endif
+-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
+-#  if _MIPS_SIM == _ABIO32
+-        mipsisa32r6-linux-gnu
+-#  elif _MIPS_SIM == _ABIN32
+-        mipsisa64r6-linux-gnuabin32
+-#  elif _MIPS_SIM == _ABI64
+-        mipsisa64r6-linux-gnuabi64
+-#  else
+-#   error unknown platform triplet
+-#  endif
+-# elif defined(__mips_hard_float) && defined(_MIPSEL)
+-#  if _MIPS_SIM == _ABIO32
+-        mipsel-linux-gnu
+-#  elif _MIPS_SIM == _ABIN32
+-        mips64el-linux-gnuabin32
+-#  elif _MIPS_SIM == _ABI64
+-        mips64el-linux-gnuabi64
+-#  else
+-#   error unknown platform triplet
+-#  endif
+-# elif defined(__mips_hard_float)
+-#  if _MIPS_SIM == _ABIO32
+-        mips-linux-gnu
+-#  elif _MIPS_SIM == _ABIN32
+-        mips64-linux-gnuabin32
+-#  elif _MIPS_SIM == _ABI64
+-        mips64-linux-gnuabi64
+-#  else
+-#   error unknown platform triplet
+-#  endif
+-# elif defined(__or1k__)
+-        or1k-linux-gnu
+-# elif defined(__powerpc__) && defined(__SPE__)
+-        powerpc-linux-gnuspe
+-# elif defined(__powerpc64__)
+-#  if defined(__LITTLE_ENDIAN__)
+-        powerpc64le-linux-gnu
+-#  else
+-        powerpc64-linux-gnu
+-#  endif
+-# elif defined(__powerpc__)
+-        powerpc-linux-gnu
+-# elif defined(__s390x__)
+-        s390x-linux-gnu
+-# elif defined(__s390__)
+-        s390-linux-gnu
+-# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
+-        sh4-linux-gnu
+-# elif defined(__sparc__) && defined(__arch64__)
+-        sparc64-linux-gnu
+-# elif defined(__sparc__)
+-        sparc-linux-gnu
+-# elif defined(__riscv)
+-#  if __riscv_xlen == 32
+-        riscv32-linux-gnu
+-#  elif __riscv_xlen == 64
+-        riscv64-linux-gnu
+-#  else
+-#   error unknown platform triplet
+-#  endif
+-# else
+-#   error unknown platform triplet
+-# endif
+-#elif defined(__FreeBSD_kernel__)
+-# if defined(__LP64__)
+-        x86_64-kfreebsd-gnu
+-# elif defined(__i386__)
+-        i386-kfreebsd-gnu
+-# else
+-#   error unknown platform triplet
+-# endif
+-#elif defined(__gnu_hurd__)
+-        i386-gnu
+-#elif defined(__APPLE__)
+-        darwin
+-#else
+-# error unknown platform triplet
+-#endif
+-
+-EOF
+-
+-if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
+-  PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' 	'`
+-  AC_MSG_RESULT([$PLATFORM_TRIPLET])
+-else
+-  AC_MSG_RESULT([none])
+-fi
+-rm -f conftest.c conftest.out
++AC_CANONICAL_TARGET
++## Not using $target to filter out vendor
++## Need to handle macos, vxworks and hurd special (?) :-/
++case ${target_os} in
++     darwin*)
++     	PLATFORM_TRIPLET=darwin
++	;;
++     hurd*)
++     	PLATFORM_TRIPLET=i386-gnu
++	;;
++     vxworks*)
++     	PLATFORM_TRIPLET=vxworks
++	;;
++     *)
++	PLATFORM_TRIPLET=${target_cpu}-${target_os}
++	;;
++esac	
+ 
+ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
+   if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
+-- 
+2.21.0
+
diff --git a/meta/recipes-devtools/python/python3_3.7.3.bb b/meta/recipes-devtools/python/python3_3.7.3.bb
index 413d35ae10..832ef1b3c3 100644
--- a/meta/recipes-devtools/python/python3_3.7.3.bb
+++ b/meta/recipes-devtools/python/python3_3.7.3.bb
@@ -23,6 +23,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
            file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
            file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
+	   file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
            "
 
 SRC_URI_append_class-native = " \
-- 
2.21.0



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

* Re: [PATCH v2] python3: fix build on softfloat mips
  2019-06-06 15:59 [PATCH v2] python3: fix build on softfloat mips Matthias Schoepfer
@ 2019-06-06 16:03 ` Burton, Ross
  2019-06-08  4:09 ` ✗ patchtest: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2019-06-06 16:03 UTC (permalink / raw)
  To: Matthias Schoepfer; +Cc: OE-core

Sorry, but:

On Thu, 6 Jun 2019 at 17:00, Matthias Schoepfer via Openembedded-core
<openembedded-core@lists.openembedded.org> wrote:
> This patch originally only meant to correct the python3 build for mips
> with softfloat, as the original test only checked for mips hardfloat.
>
> Replaced custom C Program for triplet detection with autotools triplet
> detection.
>
> Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196]

^-- this

>
> Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
> ---
>  ...-detection-of-mips-architecture-for-.patch | 198 ++++++++++++++++++
>  meta/recipes-devtools/python/python3_3.7.3.bb |   1 +
>  2 files changed, 199 insertions(+)
>  create mode 100644 meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
>
> diff --git a/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
> new file mode 100644
> index 0000000000..8325cecc29
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
> @@ -0,0 +1,198 @@
> +From 7535c39951b9d15dd64c4669092a8582ba555466 Mon Sep 17 00:00:00 2001
> +From: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
> +Date: Fri, 31 May 2019 15:34:34 +0200
> +Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft
> + float
> +
> +When (cross) compiling for softfloat mips, __mips_hard_float will not be
> +defined and detection of OS triplet in configure.ac / configure will fail.
> +
> +This also has to do with the custom detection of the build triplet. Trying
> +to do this in a more autoconf/autotools manner.

<-- goes here, along with another S-o-b.

The point being that without the git history, we can still identify
who sent a patch and whether it was a backport, isn't suitable for
upstreaming, etc.

> +---
> + configure.ac | 169 ++++++---------------------------------------------
> + 1 file changed, 17 insertions(+), 152 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index a7de901e08..a73e2de51b 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -727,158 +727,23 @@ fi
> + MULTIARCH=$($CC --print-multiarch 2>/dev/null)
> + AC_SUBST(MULTIARCH)
> +
> +-AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
> +-cat >> conftest.c <<EOF
> +-#undef bfin
> +-#undef cris
> +-#undef fr30
> +-#undef linux
> +-#undef hppa
> +-#undef hpux
> +-#undef i386
> +-#undef mips
> +-#undef powerpc
> +-#undef sparc
> +-#undef unix
> +-#if defined(__ANDROID__)
> +-    # Android is not a multiarch system.
> +-#elif defined(__linux__)
> +-# if defined(__x86_64__) && defined(__LP64__)
> +-        x86_64-linux-gnu
> +-# elif defined(__x86_64__) && defined(__ILP32__)
> +-        x86_64-linux-gnux32
> +-# elif defined(__i386__)
> +-        i386-linux-gnu
> +-# elif defined(__aarch64__) && defined(__AARCH64EL__)
> +-#  if defined(__ILP32__)
> +-        aarch64_ilp32-linux-gnu
> +-#  else
> +-        aarch64-linux-gnu
> +-#  endif
> +-# elif defined(__aarch64__) && defined(__AARCH64EB__)
> +-#  if defined(__ILP32__)
> +-        aarch64_be_ilp32-linux-gnu
> +-#  else
> +-        aarch64_be-linux-gnu
> +-#  endif
> +-# elif defined(__alpha__)
> +-        alpha-linux-gnu
> +-# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
> +-#  if defined(__ARMEL__)
> +-        arm-linux-gnueabihf
> +-#  else
> +-        armeb-linux-gnueabihf
> +-#  endif
> +-# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
> +-#  if defined(__ARMEL__)
> +-        arm-linux-gnueabi
> +-#  else
> +-        armeb-linux-gnueabi
> +-#  endif
> +-# elif defined(__hppa__)
> +-        hppa-linux-gnu
> +-# elif defined(__ia64__)
> +-        ia64-linux-gnu
> +-# elif defined(__m68k__) && !defined(__mcoldfire__)
> +-        m68k-linux-gnu
> +-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
> +-#  if _MIPS_SIM == _ABIO32
> +-        mipsisa32r6el-linux-gnu
> +-#  elif _MIPS_SIM == _ABIN32
> +-        mipsisa64r6el-linux-gnuabin32
> +-#  elif _MIPS_SIM == _ABI64
> +-        mipsisa64r6el-linux-gnuabi64
> +-#  else
> +-#   error unknown platform triplet
> +-#  endif
> +-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
> +-#  if _MIPS_SIM == _ABIO32
> +-        mipsisa32r6-linux-gnu
> +-#  elif _MIPS_SIM == _ABIN32
> +-        mipsisa64r6-linux-gnuabin32
> +-#  elif _MIPS_SIM == _ABI64
> +-        mipsisa64r6-linux-gnuabi64
> +-#  else
> +-#   error unknown platform triplet
> +-#  endif
> +-# elif defined(__mips_hard_float) && defined(_MIPSEL)
> +-#  if _MIPS_SIM == _ABIO32
> +-        mipsel-linux-gnu
> +-#  elif _MIPS_SIM == _ABIN32
> +-        mips64el-linux-gnuabin32
> +-#  elif _MIPS_SIM == _ABI64
> +-        mips64el-linux-gnuabi64
> +-#  else
> +-#   error unknown platform triplet
> +-#  endif
> +-# elif defined(__mips_hard_float)
> +-#  if _MIPS_SIM == _ABIO32
> +-        mips-linux-gnu
> +-#  elif _MIPS_SIM == _ABIN32
> +-        mips64-linux-gnuabin32
> +-#  elif _MIPS_SIM == _ABI64
> +-        mips64-linux-gnuabi64
> +-#  else
> +-#   error unknown platform triplet
> +-#  endif
> +-# elif defined(__or1k__)
> +-        or1k-linux-gnu
> +-# elif defined(__powerpc__) && defined(__SPE__)
> +-        powerpc-linux-gnuspe
> +-# elif defined(__powerpc64__)
> +-#  if defined(__LITTLE_ENDIAN__)
> +-        powerpc64le-linux-gnu
> +-#  else
> +-        powerpc64-linux-gnu
> +-#  endif
> +-# elif defined(__powerpc__)
> +-        powerpc-linux-gnu
> +-# elif defined(__s390x__)
> +-        s390x-linux-gnu
> +-# elif defined(__s390__)
> +-        s390-linux-gnu
> +-# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
> +-        sh4-linux-gnu
> +-# elif defined(__sparc__) && defined(__arch64__)
> +-        sparc64-linux-gnu
> +-# elif defined(__sparc__)
> +-        sparc-linux-gnu
> +-# elif defined(__riscv)
> +-#  if __riscv_xlen == 32
> +-        riscv32-linux-gnu
> +-#  elif __riscv_xlen == 64
> +-        riscv64-linux-gnu
> +-#  else
> +-#   error unknown platform triplet
> +-#  endif
> +-# else
> +-#   error unknown platform triplet
> +-# endif
> +-#elif defined(__FreeBSD_kernel__)
> +-# if defined(__LP64__)
> +-        x86_64-kfreebsd-gnu
> +-# elif defined(__i386__)
> +-        i386-kfreebsd-gnu
> +-# else
> +-#   error unknown platform triplet
> +-# endif
> +-#elif defined(__gnu_hurd__)
> +-        i386-gnu
> +-#elif defined(__APPLE__)
> +-        darwin
> +-#else
> +-# error unknown platform triplet
> +-#endif
> +-
> +-EOF
> +-
> +-if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
> +-  PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d '      '`
> +-  AC_MSG_RESULT([$PLATFORM_TRIPLET])
> +-else
> +-  AC_MSG_RESULT([none])
> +-fi
> +-rm -f conftest.c conftest.out
> ++AC_CANONICAL_TARGET
> ++## Not using $target to filter out vendor
> ++## Need to handle macos, vxworks and hurd special (?) :-/
> ++case ${target_os} in
> ++     darwin*)
> ++      PLATFORM_TRIPLET=darwin
> ++      ;;
> ++     hurd*)
> ++      PLATFORM_TRIPLET=i386-gnu
> ++      ;;
> ++     vxworks*)
> ++      PLATFORM_TRIPLET=vxworks
> ++      ;;
> ++     *)
> ++      PLATFORM_TRIPLET=${target_cpu}-${target_os}
> ++      ;;
> ++esac
> +
> + if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
> +   if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
> +--
> +2.21.0
> +
> diff --git a/meta/recipes-devtools/python/python3_3.7.3.bb b/meta/recipes-devtools/python/python3_3.7.3.bb
> index 413d35ae10..832ef1b3c3 100644
> --- a/meta/recipes-devtools/python/python3_3.7.3.bb
> +++ b/meta/recipes-devtools/python/python3_3.7.3.bb
> @@ -23,6 +23,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
>             file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
>             file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
>             file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
> +          file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
>             "
>
>  SRC_URI_append_class-native = " \
> --
> 2.21.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* ✗ patchtest: failure for python3: fix build on softfloat mips
  2019-06-06 15:59 [PATCH v2] python3: fix build on softfloat mips Matthias Schoepfer
  2019-06-06 16:03 ` Burton, Ross
@ 2019-06-08  4:09 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-06-08  4:09 UTC (permalink / raw)
  To: Andrii Bordunov via Openembedded-core; +Cc: openembedded-core

== Series Details ==

Series: python3: fix build on softfloat mips
Revision: 1
URL   : https://patchwork.openembedded.org/series/18027/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch)

* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

end of thread, other threads:[~2019-06-08  4:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 15:59 [PATCH v2] python3: fix build on softfloat mips Matthias Schoepfer
2019-06-06 16:03 ` Burton, Ross
2019-06-08  4:09 ` ✗ patchtest: failure for " Patchwork

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.