| author | |
| committer | |
| log | 084eab03d75187df41fbda5e4bd78e89d96297ff |
| tree | b2576b40b3e75ba953a3b18d5173508c118b1ef7 |
| parent | 99b90a431538de898ad2d49fb719f64572d849ab |
Otherwise gcc will refuse to compile the bootstrap compiler_rt.c.
Excerpt of the errors:
/builds/sertonix/aports/community/zig/src/zig-0.16.0/build/compiler_rt.c:1459:21: error: conflicting types for 'memcpy'; have 'uint8_t *(uint8_t *, const uint8_t *, uintptr_t)' {aka 'unsigned char *(unsigned char *, const unsigned char *, unsigned int)'}
1459 | zig_extern uint8_t *memcpy(uint8_t *a0 zig_nonstring, uint8_t const *a1 zig_nonstring, uintptr_t a2);
| ^~~~~~
/builds/sertonix/aports/community/zig/src/zig-0.16.0/stage1/zig.h:510:18: note: previous declaration of 'memcpy' with type 'void *(void *, const void *, unsigned int)'
510 | zig_extern void *memcpy (void *zig_restrict, void const *zig_restrict, size_t);
| ^~~~~~
/builds/sertonix/aports/community/zig/src/zig-0.16.0/build/compiler_rt.c: In function 'zig_e___negxf2':
/builds/sertonix/aports/community/zig/src/zig-0.16.0/build/compiler_rt.c:1758:9: error: passing argument 1 of 'memcpy' from incompatible pointer type [-Wincompatible-pointer-types]
1758 | memcpy(&t0, &a0, 16);
| ^~~
| |
| zig_u128 *1 files changed, 3 insertions(+), 3 deletions(-)
lib/compiler_rt/arm.zig+3-3| ... | ... | @@ -57,9 +57,9 @@ const __udivmodsi4 = @import("int.zig").__udivmodsi4; |
| 57 | 57 | const __divmoddi4 = @import("int.zig").__divmoddi4; |
| 58 | 58 | const __udivmoddi4 = @import("int.zig").__udivmoddi4; |
| 59 | 59 | |
| 60 | extern fn memset(dest: ?[*]u8, c: i32, n: usize) ?[*]u8; | |
| 61 | extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) ?[*]u8; | |
| 62 | extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) ?[*]u8; | |
| 60 | extern fn memset(dest: ?*anyopaque, c: i32, n: usize) ?*anyopaque; | |
| 61 | extern fn memcpy(noalias dest: ?*anyopaque, noalias src: ?*const anyopaque, n: usize) ?*anyopaque; | |
| 62 | extern fn memmove(dest: ?*anyopaque, src: ?*const anyopaque, n: usize) ?*anyopaque; | |
| 63 | 63 | |
| 64 | 64 | pub fn __aeabi_memcpy(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { |
| 65 | 65 | @setRuntimeSafety(false); |