diff --git a/build-scripts/ltmain.sh b/build-scripts/ltmain.sh index 67d2fd74..5c26903b 100644 --- a/build-scripts/ltmain.sh +++ b/build-scripts/ltmain.sh @@ -4785,7 +4785,7 @@ func_mode_link () # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|-static-*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" diff --git a/configure b/configure index 8b1083e1..c48e73a9 100755 --- a/configure +++ b/configure @@ -16377,6 +16377,11 @@ printf "%s\n" "$have_no_cygwin" >&6; } BASE_LDFLAGS="-mno-cygwin" fi ;; + *-*-mingw*) + #Eliminate libgcc*.dll dependency + BASE_CFLAGS="-static-libgcc" + BASE_LDFLAGS="-Wc,-static-libgcc" + ;; *-*-os2*) # disable static builds on os/2 enable_static=no diff --git a/configure.ac b/configure.ac index ccec258b..66596886 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,11 @@ case "$host" in BASE_LDFLAGS="-mno-cygwin" fi ;; + *-*-mingw*) + #Eliminate libgcc*.dll dependency + BASE_CFLAGS="-static-libgcc" + BASE_LDFLAGS="-Wc,-static-libgcc" + ;; *-*-os2*) # disable static builds on os/2 enable_static=no