Skip to content

Commit

Permalink
autotools: Eliminate libgcc*.dll dependency in mingw builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Jan 3, 2025
1 parent 5ad6ce7 commit cb0d276
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build-scripts/ltmain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb0d276

Please sign in to comment.