Skip to content

Commit 9ed8979

Browse files
committed
build: fix static dll link for mingw
dll's are no longer dynamically linked to libgcc/libstdc++/libssp
1 parent 19df238 commit 9ed8979

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

configure.ac

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ case $host in
226226
*) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;;
227227
esac
228228
AC_SUBST(WINDOWS_BITS)
229+
230+
dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
231+
dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override
232+
dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are
233+
dnl also overridden to prevent their insertion later.
234+
dnl This should only affect dll's.
235+
archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
236+
postdeps_CXX=
237+
229238
;;
230239
*darwin*)
231240
TARGET_OS=darwin

0 commit comments

Comments
 (0)