From db2540485ec0062db3d18833ec9eab901979ba63 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 24 Nov 2022 21:18:53 +0100 Subject: [PATCH] Link hidapi statically against libgcc When compiling a 32bit dll with the mingw-w64 compiler, some 64bit integer arithmetic operations are implemented using functions from libgcc (e.g. __udivdi3 and __umoddi3 from libgcc_s_dw2-1.dll). This unexpected dependency is inconvenient for applications. The run-time dependency can be avoid by linking statically. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b2a3b1..b23c7f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,7 @@ jobs: tar xzf hidapi-${HIDAPI_VERSION}.tar.gz pushd hidapi-hidapi-${HIDAPI_VERSION} autoreconf --install --force - ./configure --host=${{ matrix.arch }}-w64-mingw32 --prefix=/usr + ./configure --host=${{ matrix.arch }}-w64-mingw32 --prefix=/usr LDFLAGS='-static-libgcc' make make install DESTDIR=$PWD/../artifacts popd