Files
MSYS2-packages/libtool/0004-Fix-linking-with-fstack-protector.mingw.patch
2014-09-02 11:01:17 +04:00

30 lines
1.3 KiB
Diff

[PATCH 4/6] Fix linking with -fstack-protector
* build-aux/ltmain.in (func_mode_link): Pass -fstack-protector*
to the linker as it is required at link time to resolve libssp symbols.
Note: this patch is necessary but not sufficient for -fstack-protector* + C++.
---
build-aux/ltmain.in | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index eda7790..74ab26a 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5086,10 +5086,12 @@ func_mode_link ()
# -stdlib=* select c++ std lib with clang
# -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
# link against specified runtime library
+ # -fstack-protector* stack protector flags for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-stdlib=*| \
- -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++)
+ -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++| \
+ -fstack-protector*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
--
1.7.1