Skip to content

Commit

Permalink
windows: Link gcc helpers statically on MinGW
Browse files Browse the repository at this point in the history
Fixes #1049

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
  • Loading branch information
tormodvolden committed Mar 16, 2022
1 parent 670f75f commit f9162d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ case $host in
platform=windows
test "x$enable_shared" = xyes && create_import_lib=yes
EXTRA_CFLAGS="-mwin32 -fno-omit-frame-pointer"
EXTRA_LDFLAGS="-static-libgcc"
;;
*)
AC_MSG_RESULT([Null])
Expand Down Expand Up @@ -394,6 +395,8 @@ AC_SUBST(AM_CXXFLAGS)

AC_SUBST(LT_LDFLAGS)

AC_SUBST([EXTRA_LDFLAGS])

dnl set name of html output directory for doxygen
AC_SUBST(DOXYGEN_HTMLDIR, [api-1.0])

Expand Down
2 changes: 1 addition & 1 deletion libusb/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ all-local: .libs/libusb-1.0.dll.a
endif
endif

libusb_1_0_la_LDFLAGS = $(LT_LDFLAGS)
libusb_1_0_la_LDFLAGS = $(LT_LDFLAGS) $(EXTRA_LDFLAGS)
libusb_1_0_la_SOURCES = libusbi.h version.h version_nano.h \
core.c descriptor.c hotplug.c io.c strerror.c sync.c \
$(PLATFORM_SRC) $(OS_SRC)
Expand Down
2 changes: 1 addition & 1 deletion libusb/version_nano.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define LIBUSB_NANO 11697
#define LIBUSB_NANO 11698

0 comments on commit f9162d3

Please sign in to comment.