python,python3: limit underlinking behavior to linux platforms
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 14 Mar 2018 14:18:27 +0000 (16:18 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 14 Mar 2018 14:18:30 +0000 (16:18 +0200)
This change was introduced in commit 1c54e2b0fbe2e9a7d to address build
issues on Ubuntu 12.04.

However it was reported to cause issues on Mac OS X.
Report: https://github.com/openwrt/packages/issues/5310

It was also reported that removing this on MacOS X fixes the issue.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python/Makefile
lang/python/python3/Makefile

index c70c486e8a93c8f8160686cf94ed0f339345b70f..5f698888a2651342bd50bc0f728030707da9cd4b 100644 (file)
@@ -268,9 +268,13 @@ define PyPackage/python/filespec
 endef
 
 HOST_LDFLAGS += \
-       -Wl,--no-as-needed -lrt \
        $$$$(pkg-config --static --libs libcrypto libssl)
 
+ifeq ($(HOST_OS),Linux)
+HOST_LDFLAGS += \
+       -Wl,--no-as-needed -lrt
+endif
+
 HOST_CONFIGURE_ARGS+= \
        --without-cxx-main \
        --without-pymalloc \
index cd97378ce535f28448e5b8714ef90f17929f9c5c..794a2bf75e5538f6fb1b68f74cedf58d423a9a5b 100644 (file)
@@ -264,9 +264,13 @@ define Py3Package/python3/filespec
 endef
 
 HOST_LDFLAGS += \
-       -Wl,--no-as-needed -lrt \
        $$$$(pkg-config --static --libs libcrypto libssl)
 
+ifeq ($(HOST_OS),Linux)
+HOST_LDFLAGS += \
+       -Wl,--no-as-needed -lrt
+endif
+
 HOST_CONFIGURE_ARGS+= \
        --without-cxx-main \
        --without-pymalloc \