mirror of https://git.wownero.com/dsc/mxe.git
libzmq: compatibility workaround for mingw 7
"...with mingw-w64 if you define _FORTIFY_SOUECE to something greater than zero you have to link against libssp, either by adding -fstack-protector or -lssp, because mingw-w64, unlike GNU libc, does not provide fortified functions." https://github.com/msys2/MINGW-packages/issues/5868
This commit is contained in:
parent
26405f3593
commit
61f377cc11
|
@ -13,6 +13,7 @@ define $(PKG)_BUILD
|
|||
# build and install the library
|
||||
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
|
||||
-DBUILD_TESTS=OFF \
|
||||
-DCMAKE_CXX_FLAGS='-D_WIN32_WINNT=0x0600 -fstack-protector' \
|
||||
-DWITH_DOC=OFF \
|
||||
-DWITH_LIBSODIUM=ON \
|
||||
-DWITH_PERF_TOOL=OFF
|
||||
|
@ -27,7 +28,7 @@ define $(PKG)_BUILD
|
|||
echo 'Requires: libsodium'; \
|
||||
echo 'Libs: -lzmq'; \
|
||||
echo 'Libs.private: -lws2_32 -lrpcrt4 -liphlpapi'; \
|
||||
echo 'Cflags.private: -DZMQ_STATIC';) \
|
||||
echo 'Cflags.private: -DZMQ_STATIC -fstack-protector';) \
|
||||
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc'
|
||||
|
||||
# test pkg-config
|
||||
|
@ -41,6 +42,7 @@ define $(PKG)_BUILD
|
|||
cd '$(BUILD_DIR).test-cmake' && '$(TARGET)-cmake' \
|
||||
-DPKG=$(PKG) \
|
||||
-DPKG_VERSION=$($(PKG)_VERSION) \
|
||||
-DCMAKE_CXX_FLAGS='-fstack-protector' \
|
||||
'$(PWD)/src/cmake/test'
|
||||
$(MAKE) -C '$(BUILD_DIR).test-cmake' -j 1 install
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue