Bug 1724914 - Build libotr for win32 with -static-libgcc. r=clokep

Win32 builds need to pick up two functions from libgcc (__udivdi3, __umoddi3).
Statically link it so that we do not need to ship an additional DLL.

Differential Revision: https://phabricator.services.mozilla.com/D122237

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Rob Lemley 2021-08-11 04:06:49 +00:00
Родитель 929ce06962
Коммит 6757b6274f
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -127,9 +127,6 @@ function build_libotr() {
autoconf
automake
# CFLAGS="${CFLAGS_otr} ${CFLAGS}"
# LDFLAGS="${LDFLAGS_otr} ${LDFLAGS}"
./configure ${_CONFIGURE_FLAGS} --enable-shared --with-pic \
--with-libgcrypt-prefix="${_PREFIX}"
@ -143,7 +140,7 @@ function build_libotr() {
case "${_TARGET_OS}" in
win*)
cd src
"${CC}" -shared -Wl,-no-undefined ${LDFLAGS} -o libotr.dll \
"${CC}" -static-libgcc -shared -Wl,-no-undefined ${LDFLAGS} -o libotr.dll \
*.o \
-L"${_PREFIX}/lib" "${_PREFIX}/lib/libgcrypt.a" "${_PREFIX}/lib/libgpg-error.a" \
-L"${_LIBDIR}" -lws2_32 -lssp