Skip to content

Commit f886662

Browse files
committed
Add -fstack-protector switch on Windows
to avoid linking error: libgmp.a(tdiv_r.o):(.text+0x2ec): more undefined references to `__stack_chk_fail' follow
1 parent dc1f392 commit f886662

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gnat/lsp_server.gpr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ project LSP_Server is
5959
when "static" | "static-pic" =>
6060
case OS is
6161
when "Windows_NT" =>
62-
for Switches ("Ada") use ("-static", "-static-libstdc++", "-static-libgcc");
62+
for Switches ("Ada") use
63+
("-static", "-static-libstdc++", "-static-libgcc",
64+
"-fstack-protector");
65+
-- Stack protector forces libssp.a linking for libgmp.a
6366
when "osx" | "unix" =>
6467
-- On UNIX, we want to link libc dynamically: needed to find
6568
-- a recent version of iconv_open (and a recommended practice)

0 commit comments

Comments
 (0)