package/python3: fix configure issue for musl/uclibc GCC 8+ toolchains on powerpc
PATCH 1/1 package/python3: fix configure issue for musl/uclibc GCC 8+ toolchains on powerpc
Fixes:
http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b
GCC commit 6834b83784dcf0364eb820e8 (multiarch support for non-glibc linux systems), which is part of GCC 8+, changed the multiarch logic to use $arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu.
This then causes the python3 configure script to error out:
checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu
configure: error: internal configure error for the platform triplet, please file a bug report
http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b
As it requires that the --print-multiarch output (if not empty) matches the deduced triplet (which always uses -linux-gnu).
It isn't quite clear why --print-multiarch returns something for a non-multiarch toolchain on some architectures (E.G. PowerPC), but as a workaround, add a patch to rewrite the --print-multiarch output to match older GCC versions to keep the configure script happy.
--- ...c-fixup-CC-print-multiarch-output-for-mus.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/python3/0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch
package/python3/0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch new file +48 -0
@@ -0,0 +1,48 @@ +From e1a2c27bcb9091f851ef7a9c7d59822a125a0b8e Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard <[email protected]> +Date: Fri, 2 Aug 2019 15:53:16 +0200 +Subject: [PATCH] configure.ac: fixup $CC --print-multiarch output for + musl/uclibc GCC 8+ toolchains + +GCC commit 6834b83784dcf0364eb820e8 (multiarch support for non-glibc linux +systems), which is part of GCC 8+, changed the multiarch logic to use +$arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu. + +This then causes the python3 configure script to error out: + +checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu +configure: error: internal configure error for the platform triplet, please file a bug report + +http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b + +As it requires that the --print-multiarch output (if not empty) matches the +deduced triplet (which always uses -linux-gnu). + +It isn't quite clear why --print-multiarch returns something for a +non-multiarch toolchain on some architectures (E.G. PowerPC), but as a +workaround, rewrite the --print-multiarch output to match older GCC versions +to keep the configure script happy. + +Signed-off-by: Peter Korsgaard <[email protected]> +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e5fb7e7b0b..9c64f960d6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -724,7 +724,9 @@ then + fi + + +-MULTIARCH=$($CC --print-multiarch 2>/dev/null) ++# GCC 8+ returns $arch-linux-{musl,uclibc} for musl/uClibc based ++# toolchains confusing python. Fix that up ++MULTIARCH=$($CC --print-multiarch 2>/dev/null | sed -E 's/-linux-(musl|uclibc)*$/-linux-gnu/') + AC_SUBST(MULTIARCH) + + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +-- +2.11.0 +
Signature · 1 line
2.11.0
Arnout Vandecappelle
AppliedPATCH 1/1 package/python3: fix configure issue for musl/uclibc GCC 8+ toolchains on powerpc
Quoted 17 lines · Peter Korsgaard
Fixes:
http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05bGCC commit
6834b83784dcf0364eb820e8(multiarch support for non-glibc linux systems), which is part of GCC 8+, changed the multiarch logic to use $arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu.This then causes the python3 configure script to error out:
checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu
configure: error: internal configure error for the platform triplet, please file a bug reporthttp://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b
As it requires that the --print-multiarch output (if not empty) matches the deduced triplet (which always uses -linux-gnu).
Quoted 6 lines
It isn't quite clear why --print-multiarch returns something for a non-multiarch toolchain on some architectures (E.G. PowerPC), but as a workaround, add a patch to rewrite the --print-multiarch output to match older GCC versions to keep the configure script happy.
Signed-off-by Peter Korsgaard <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 60 lines
--- ...c-fixup-CC-print-multiarch-output-for-mus.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/python3/0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patchpackage/python3/0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch new file +48
-0@@ -0,0 +1,48 @@ +From e1a2c27bcb9091f851ef7a9c7d59822a125a0b8e Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard <[email protected]> +Date: Fri, 2 Aug 2019 15:53:16 +0200 +Subject: [PATCH] configure.ac: fixup $CC --print-multiarch output for + musl/uclibc GCC 8+ toolchains + +GCC commit 6834b83784dcf0364eb820e8 (multiarch support for non-glibc linux +systems), which is part of GCC 8+, changed the multiarch logic to use +$arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu. + +This then causes the python3 configure script to error out: + +checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu +configure: error: internal configure error for the platform triplet, please file a bug report + +http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b + +As it requires that the --print-multiarch output (if not empty) matches the +deduced triplet (which always uses -linux-gnu). + +It isn't quite clear why --print-multiarch returns something for a +non-multiarch toolchain on some architectures (E.G. PowerPC), but as a +workaround, rewrite the --print-multiarch output to match older GCC versions +to keep the configure script happy. + +Signed-off-by: Peter Korsgaard <[email protected]> +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e5fb7e7b0b..9c64f960d6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -724,7 +724,9 @@ then + fi + + +-MULTIARCH=$($CC --print-multiarch 2>/dev/null) ++# GCC 8+ returns $arch-linux-{musl,uclibc} for musl/uClibc based ++# toolchains confusing python. Fix that up ++MULTIARCH=$($CC --print-multiarch 2>/dev/null | sed -E 's/-linux-(musl|uclibc)*$/-linux-gnu/') + AC_SUBST(MULTIARCH) + + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +-- +2.11.0 +
PATCH 1/1 package/python3: fix configure issue for musl/uclibc GCC 8+ toolchains on powerpc
In reply to Peter KorsgaardQuoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
Fixes:
http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05bGCC commit
6834b83784dcf0364eb820e8(multiarch support for non-glibc linux systems), which is part of GCC 8+, changed the multiarch logic to use $arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu.This then causes the python3 configure script to error out:
checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu
configure: error: internal configure error for the platform triplet, please file a bug reporthttp://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b
As it requires that the --print-multiarch output (if not empty) matches the deduced triplet (which always uses -linux-gnu).
Quoted 6 lines
It isn't quite clear why --print-multiarch returns something for a non-multiarch toolchain on some architectures (E.G. PowerPC), but as a workaround, add a patch to rewrite the --print-multiarch output to match older GCC versions to keep the configure script happy.
Signed-off-by Peter Korsgaard <[email protected]>
Committed to 2019.02.x and 2019.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard