Skip to content

Commit 3ea9dac

Browse files
committed
Define __stack_chk_guard to fix linking error on linux
1 parent 24b8ca2 commit 3ea9dac

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StaticCompiler"
22
uuid = "81625895-6c0f-48fc-b932-11a18313743c"
3-
authors = ["Tom Short"]
4-
version = "0.4.5"
3+
authors = ["Tom Short and contributors"]
4+
version = "0.4.6"
55

66
[deps]
77
Clang_jll = "0ee61d77-7f21-5576-8119-9fcc46b10100"

src/StaticCompiler.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ function generate_executable(f, tt, path=tempname(), name=GPUCompiler.safe_name(
378378
wrapper_path = joinpath(path, "wrapper.c")
379379
f = open(wrapper_path, "w")
380380
print(f, """int julia_$name(int argc, char** argv);
381-
381+
void* __stack_chk_guard = (void*) $(rand(UInt) >> 1);
382+
382383
int main(int argc, char** argv)
383384
{
384385
julia_$name(argc, argv);

0 commit comments

Comments
 (0)