From: Vincent Fu Date: Thu, 12 Dec 2019 22:22:06 +0000 (-0700) Subject: Makefile: add libssp for Windows X-Git-Tag: fio-3.18~36^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=60ef6b027ec05b5e248901f1d95f1a03434e8ce2;p=fio.git Makefile: add libssp for Windows Recent Cygwin mingw releases require linking against libssp to avoid undefined symbols. See https://github.com/msys2/MINGW-packages/issues/5868 for discussion. https://github.com/msys2/MINGW-packages/issues/5803 also contains discussion of possibly disabling the FORTIFY_SOURCE linker flag. Fixes: https://github.com/axboe/fio/issues/881 Signed-off-by: Vincent Fu --- diff --git a/Makefile b/Makefile index 7aab6abd..4a07fab3 100644 --- a/Makefile +++ b/Makefile @@ -209,7 +209,7 @@ ifeq ($(CONFIG_TARGET_OS), Darwin) endif ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS))) SOURCE += os/windows/posix.c - LIBS += -lpthread -lpsapi -lws2_32 + LIBS += -lpthread -lpsapi -lws2_32 -lssp CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format endif @@ -506,7 +506,7 @@ t/time-test: $(T_TT_OBJS) ifdef CONFIG_HAVE_CUNIT unittests/unittest: $(UT_OBJS) $(UT_TARGET_OBJS) - $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(UT_OBJS) $(UT_TARGET_OBJS) -lcunit + $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(UT_OBJS) $(UT_TARGET_OBJS) -lcunit $(LIBS) endif clean: FORCE