Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-43112: detect musl as a separate SOABI #24502

Merged
merged 10 commits into from
Jan 28, 2022
Merged

Conversation

ncopa
Copy link
Contributor

@ncopa ncopa commented Feb 10, 2021

musl libc and gnu libc are not ABI compatible so we need set different
SOABI for musl and not simply assume that all linux is linux-gnu.

Replace linux-gnu with the detected os for the build from config.guess
for linux-musl*.

https://bugs.python.org/issue43112

Automerge-Triggered-By: GH:brettcannon

musl libc and gnu libc are not ABI compatible so we need set different
SOABI for musl and not simply assume that all linux is linux-gnu.

Replace linux-gnu with the detected os for the build from config.guess
for linux-musl*.
tiran
tiran previously requested changes Feb 10, 2021
Copy link
Member

@tiran tiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also have to re-generate configure script with autoreconf and commit the new configure file.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@ncopa
Copy link
Contributor Author

ncopa commented Feb 10, 2021

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@tiran: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from tiran February 10, 2021 19:05
@tiran
Copy link
Member

tiran commented Feb 11, 2021

@uranusjr
Copy link
Contributor

Unfortunately I don’t have the required autoconf knowledge to understand what’s going on here :(

@stratakis
Copy link
Contributor

I'd remove the runstatedir changes, as those are generated due to either a later version of autoconf, or from one where that change was backported from upstream. However when someone makes another change to the configure script it can be removed again depending on the autoconf capabilities of the developer's machine.

See also: https://bugs.python.org/issue40216

@tiran
Copy link
Member

tiran commented Feb 12, 2021

Unfortunately I don’t have the required autoconf knowledge to understand what’s going on here :(

The magic happens here:

  case "$build_os" in
  linux-musl*)
    PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
    ;;
  esac

The shell code roughly translates to

if build_os.startswith("linux-musl"):
    PLATFORM_TRIPLET = PLATFORM_TRIPLET.replace("linux-gnu", "linux-musl")

This changes the SOABI from cpython-39-x86_64-linux-gnu to cpython-39-x86_64-linux-musl on all platforms that identify as Linux with musl libc.

@uranusjr
Copy link
Contributor

uranusjr commented Feb 12, 2021

Thanks for the explaination. Where does $build_os come from?

Am I correct to assume this needs to be done in the post-processing instead of conftest.c because musl provides no compile time detection on its usage (instead of glibc)?

@tiran
Copy link
Member

tiran commented Feb 12, 2021

build_os is provided by autoconf, https://www.gnu.org/software/autoconf/manual/autoconf-2.68/autoconf.html#index-build_005fos-1848

We could modify conftest.c, but it would take much more effort. We would have add a dozen ifdef checks for musl. GCC uses a similar approach like this patch in https://github.com/gcc-mirror/gcc/blob/master/gcc/config/t-musl . $(subst ...) is a Makefile command to substitute text.

@uranusjr
Copy link
Contributor

Thanks. I still can’t say I really know how the code works, but kind of understand now what’s going on, and the approach makes sense to me.

@ncopa
Copy link
Contributor Author

ncopa commented Mar 2, 2021

I think we may also need something like this:

diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index e279957e26..83ce74aa6f 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -387,10 +387,13 @@ def test_triplet_in_ext_suffix(self):
         if re.match('(i[3-6]86|x86_64)$', machine):
             if ctypes.sizeof(ctypes.c_char_p()) == 4:
                 self.assertTrue(suffix.endswith('i386-linux-gnu.so') or
-                                suffix.endswith('x86_64-linux-gnux32.so'),
+                                suffix.endswith('x86_64-linux-gnux32.so') or
+                                suffix.endswith('i386-linux-musl.so'),
                                 suffix)
             else: # 8 byte pointer size
-                self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix)
+                self.assertTrue(suffix.endswith('x86_64-linux-gnu.so') or
+                                suffix.endswith('x86_64-linux-musl.so'),
+                                suffix)
 
     @unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test')
     def test_osx_ext_suffix(self):

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 2, 2021
@tiran tiran removed their request for review April 17, 2021 21:16
@alex
Copy link
Member

alex commented Nov 1, 2021

@ncopa I believe you are correct that those tests need to be updated

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE RHEL8 LTO + PGO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/458/builds/1303) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/458/builds/1303

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

418 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 3 sec
  • test_multiprocessing_spawn: 1 min 47 sec
  • test_multiprocessing_forkserver: 1 min 14 sec
  • test_tokenize: 1 min 13 sec
  • test_multiprocessing_fork: 1 min 8 sec
  • test_asyncio: 57.7 sec
  • test_unparse: 52.9 sec
  • test_capi: 49.0 sec
  • test_signal: 47.9 sec
  • test_io: 40.7 sec

1 test failed:
test_sysconfig

13 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 3 min 58 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_baa5c5d3'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_987e13b0'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_c047c888'

merwok added a commit that referenced this pull request Jan 29, 2022
@merwok
Copy link
Member

merwok commented Jan 29, 2022

Thanks tianon, created #31001

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE RHEL8 LTO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/361/builds/1306) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/361/builds/1306

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_peg_generator: 7 min 33 sec
  • test_gdb: 4 min 22 sec
  • test_concurrent_futures: 3 min 12 sec
  • test_multiprocessing_spawn: 1 min 58 sec
  • test_multiprocessing_forkserver: 1 min 18 sec
  • test_tokenize: 1 min 15 sec
  • test_multiprocessing_fork: 1 min 8 sec
  • test_asyncio: 1 min 1 sec
  • test_unparse: 58.7 sec
  • test_io: 57.5 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 7 min 56 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_bce9806a'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_9eb00698'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_104a5c42'

pablogsal pushed a commit that referenced this pull request Jan 29, 2022
@ncopa ncopa deleted the bpo-43112 branch March 16, 2022 10:59
@@ -5351,6 +5351,11 @@ EOF

if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
case "$build_os" in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, PLATFORM_TRIPLET should refer to the target platform on which cpython will run. If that is the case, the musl libc vs. glibc decision should be based on $host_os rather than $build_os as the former is based on autoconf's AC_CANONICAL_HOST macro1 which refers to the target platform that might differ from build platform in case of cross-compilation.

For example, the decision based on $build_os leads to
cpython 3.9.13 build failing2 when cross-compiling on AMD64 Linux with glibc for mpc8548 Linux (OpenWrt) with musl. (build runs correctly if $host_os is used)

Footnotes

  1. https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Canonicalizing.html

  2. "internal configure error for the platform triplet, please file a bug report"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the code is wrong. In fact the entire block should be revisited. We really should check for __GLIBC__ and use a heuristic to detect musl. Could you please open a new issue for the problem?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, but there's #87278 already. Is yet another issue needed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #95855

autobakterie added a commit to autobakterie/packages that referenced this pull request Aug 4, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
autobakterie added a commit to autobakterie/packages that referenced this pull request Sep 12, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
neheb pushed a commit to openwrt/packages that referenced this pull request Sep 12, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
BKPepe pushed a commit to openwrt/packages that referenced this pull request Sep 15, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
(cherry picked from commit 992fcd1)
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 7, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 8, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
stokito pushed a commit to stokito/packages that referenced this pull request Dec 6, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Jan 7, 2023
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
(cherry picked from commit 992fcd1)
SibrenVasse pushed a commit to SibrenVasse/packages that referenced this pull request Feb 26, 2023
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
(cherry picked from commit 992fcd1)
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Mar 2, 2024
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
(cherry picked from commit 992fcd1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.