diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-11-05 12:18:35 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-11-05 22:41:09 +0100 |
| commit | f973d3e93e9bb419212a187e787de94929de928d (patch) | |
| tree | 75e5b300531e5efe5a67beb443337d59586b8174 /src | |
| parent | 2a65b84572f19369e831d71c513da88a295193c8 (diff) | |
| download | zig-f973d3e93e9bb419212a187e787de94929de928d.tar.gz zig-f973d3e93e9bb419212a187e787de94929de928d.zip | |
glibc, musl, wasi-libc: Don't explicitly pass -fno-stack-protector.
This is already handled by build_crt_file().
Diffstat (limited to 'src')
| -rw-r--r-- | src/glibc.zig | 1 | ||||
| -rw-r--r-- | src/musl.zig | 15 | ||||
| -rw-r--r-- | src/wasi_libc.zig | 1 |
3 files changed, 3 insertions, 14 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index c7f84a797c..f1ac544163 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -373,7 +373,6 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre "-fmerge-all-constants", "-frounding-math", "-Wno-unsupported-floating-point-opt", // For targets that don't support -frounding-math. - "-fno-stack-protector", "-fno-common", "-fmath-errno", "-ftls-model=initial-exec", diff --git a/src/musl.zig b/src/musl.zig index eb83bcf901..ec2b0674ff 100644 --- a/src/musl.zig +++ b/src/musl.zig @@ -59,10 +59,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro .crt1_o => { var args = std.ArrayList([]const u8).init(arena); try addCcArgs(comp, arena, &args, false); - try args.appendSlice(&[_][]const u8{ - "-fno-stack-protector", - "-DCRT", - }); + try args.append("-DCRT"); var files = [_]Compilation.CSourceFile{ .{ .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ @@ -79,10 +76,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro .rcrt1_o => { var args = std.ArrayList([]const u8).init(arena); try addCcArgs(comp, arena, &args, false); - try args.appendSlice(&[_][]const u8{ - "-fno-stack-protector", - "-DCRT", - }); + try args.append("-DCRT"); var files = [_]Compilation.CSourceFile{ .{ .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ @@ -100,10 +94,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro .scrt1_o => { var args = std.ArrayList([]const u8).init(arena); try addCcArgs(comp, arena, &args, false); - try args.appendSlice(&[_][]const u8{ - "-fno-stack-protector", - "-DCRT", - }); + try args.append("-DCRT"); var files = [_]Compilation.CSourceFile{ .{ .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ diff --git a/src/wasi_libc.zig b/src/wasi_libc.zig index c9fbbc6e7c..ce6131a470 100644 --- a/src/wasi_libc.zig +++ b/src/wasi_libc.zig @@ -279,7 +279,6 @@ fn addCCArgs( try args.appendSlice(&[_][]const u8{ "-std=gnu17", "-fno-trapping-math", - "-fno-stack-protector", "-w", // ignore all warnings o_arg, |
