Skip to content

Commit

Permalink
Remove ELF-only no-plt flag from mingw-w64-environment
Browse files Browse the repository at this point in the history
This is an elf-only flag and specifying it on PE targets has no effect -
except that it actually has a quite negative effect when used with LLVM/Clang
as of LLVM 19 (see
llvm/llvm-project#78890 (comment)).
So it is probably better to avoid this flag (regardless of the used toolchain).
LLVM will also warn about it in the future (see
llvm/llvm-project#124081).
  • Loading branch information
Martchus committed Jan 23, 2025
1 parent e28d40e commit dcbd169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion environment/mingw-w64/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname=mingw-w64-environment
pkgver=1
pkgrel=6
pkgrel=7
arch=('any')
pkgdesc="Script providing common environment variables and functions for MinGW (mingw-w64)"
license=("BSD")
Expand Down
2 changes: 1 addition & 1 deletion environment/mingw-w64/mingw-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_mingw_arch=$1

default_mingw_pp_flags="-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS"
default_mingw_compiler_flags="$default_mingw_pp_flags -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection"
default_mingw_compiler_flags="$default_mingw_pp_flags -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection"
default_mingw_linker_flags="-Wl,-O1,--sort-common,--as-needed -fstack-protector"

export CPPFLAGS="${MINGW_CPPFLAGS:-$default_mingw_pp_flags $CPPFLAGS}"
Expand Down

0 comments on commit dcbd169

Please sign in to comment.