| ... | ... | @@ -269,6 +269,7 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 269 | 269 | return comp.build_crt_file("Scrt1", .Obj, &[_]Compilation.CSourceFile{ start_os, abi_note_o }); |
| 270 | 270 | }, |
| 271 | 271 | .libc_nonshared_a => { |
| 272 | const target = comp.getTarget(); |
| 272 | 273 | const s = path.sep_str; |
| 273 | 274 | const linux_prefix = lib_libc_glibc ++ |
| 274 | 275 | "sysdeps" ++ s ++ "unix" ++ s ++ "sysv" ++ s ++ "linux" ++ s; |
| ... | ... | @@ -354,6 +355,13 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 354 | 355 | }); |
| 355 | 356 | try add_include_dirs(comp, arena, &args); |
| 356 | 357 | |
| 358 | if (target.cpu.arch == .i386) { |
| 359 | // This prevents i386/sysdep.h from trying to do some |
| 360 | // silly and unnecessary inline asm hack that uses weird |
| 361 | // syntax that clang does not support. |
| 362 | try args.append("-DCAN_USE_REGISTER_ASM_EBP"); |
| 363 | } |
| 364 | |
| 357 | 365 | const shared_def = switch (dep.flavor) { |
| 358 | 366 | .shared => "-DSHARED", |
| 359 | 367 | .nonshared => "-DLIBC_NONSHARED=1", |