summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_sysconfig.py8
-rw-r--r--Misc/NEWS.d/next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst1
-rwxr-xr-xconfigure5
-rw-r--r--configure.ac5
4 files changed, 15 insertions, 4 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 80fe9c8..7ba004d 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -433,11 +433,11 @@ class TestSysConfig(unittest.TestCase):
self.assertTrue('linux' in suffix, suffix)
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)
+ expected_suffixes = 'i386-linux-gnu.so', 'x86_64-linux-gnux32.so', 'i386-linux-musl.so'
else: # 8 byte pointer size
- self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix)
+ expected_suffixes = 'x86_64-linux-gnu.so', 'x86_64-linux-musl.so'
+ self.assertTrue(suffix.endswith(expected_suffixes),
+ f'unexpected suffix {suffix!r}')
@unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test')
def test_osx_ext_suffix(self):
diff --git a/Misc/NEWS.d/next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst b/Misc/NEWS.d/next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst
new file mode 100644
index 0000000..0e250ed
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-02-10-17-54-04.bpo-43112.H5Lat6.rst
@@ -0,0 +1 @@
+Detect musl libc as a separate SOABI (tagged as ``linux-musl``). \ No newline at end of file
diff --git a/configure b/configure
index 22c65e4..da4af32 100755
--- a/configure
+++ b/configure
@@ -6090,6 +6090,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
+ linux-musl*)
+ PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
+ ;;
+ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
$as_echo "$PLATFORM_TRIPLET" >&6; }
else
diff --git a/configure.ac b/configure.ac
index 9bc6e3b..5a07664 100644
--- a/configure.ac
+++ b/configure.ac
@@ -981,6 +981,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
+ linux-musl*)
+ PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
+ ;;
+ esac
AC_MSG_RESULT([$PLATFORM_TRIPLET])
else
AC_MSG_RESULT([none])