diff --git a/lang/python/python/Makefile b/lang/python/python/Makefile index c70c486e8a..5f698888a2 100644 --- a/lang/python/python/Makefile +++ b/lang/python/python/Makefile @@ -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 \ diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index cd97378ce5..794a2bf75e 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -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 \