| ... | @@ -1167,7 +1167,9 @@ pub const LibExeObjStep = struct { | ... | @@ -1167,7 +1167,9 @@ pub const LibExeObjStep = struct { |
| 1167 | } | 1167 | } |
| 1168 | switch (self.build_mode) { | 1168 | switch (self.build_mode) { |
| 1169 | builtin.Mode.Debug => { | 1169 | builtin.Mode.Debug => { |
| 1170 | if (!self.disable_libc) { | 1170 | if (self.disable_libc) { |
| | 1171 | %%args.append("-fno-stack-protector"); |
| | 1172 | } else { |
| 1171 | %%args.append("-fstack-protector-strong"); | 1173 | %%args.append("-fstack-protector-strong"); |
| 1172 | %%args.append("--param"); | 1174 | %%args.append("--param"); |
| 1173 | %%args.append("ssp-buffer-size=4"); | 1175 | %%args.append("ssp-buffer-size=4"); |
| ... | @@ -1175,7 +1177,9 @@ pub const LibExeObjStep = struct { | ... | @@ -1175,7 +1177,9 @@ pub const LibExeObjStep = struct { |
| 1175 | }, | 1177 | }, |
| 1176 | builtin.Mode.ReleaseSafe => { | 1178 | builtin.Mode.ReleaseSafe => { |
| 1177 | %%args.append("-O2"); | 1179 | %%args.append("-O2"); |
| 1178 | if (!self.disable_libc) { | 1180 | if (self.disable_libc) { |
| | 1181 | %%args.append("-fno-stack-protector"); |
| | 1182 | } else { |
| 1179 | %%args.append("-D_FORTIFY_SOURCE=2"); | 1183 | %%args.append("-D_FORTIFY_SOURCE=2"); |
| 1180 | %%args.append("-fstack-protector-strong"); | 1184 | %%args.append("-fstack-protector-strong"); |
| 1181 | %%args.append("--param"); | 1185 | %%args.append("--param"); |
| ... | @@ -1184,6 +1188,7 @@ pub const LibExeObjStep = struct { | ... | @@ -1184,6 +1188,7 @@ pub const LibExeObjStep = struct { |
| 1184 | }, | 1188 | }, |
| 1185 | builtin.Mode.ReleaseFast => { | 1189 | builtin.Mode.ReleaseFast => { |
| 1186 | %%args.append("-O2"); | 1190 | %%args.append("-O2"); |
| | 1191 | %%args.append("-fno-stack-protector"); |
| 1187 | }, | 1192 | }, |
| 1188 | } | 1193 | } |
| 1189 | | 1194 | |