diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-14 10:46:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-14 10:46:43 +0100 |
commit | d938920a33f03124f4e211a67d9291283442caa1 (patch) | |
tree | 8df88b987b9cf96366e7bdab6bec0f5606c6153d /sys-boot/refind/files | |
parent | 8d3092381b8c63ad0261911737e91cc4fda109c9 (diff) |
gentoo auto-resync : 14:09:2023 - 10:46:43
Diffstat (limited to 'sys-boot/refind/files')
-rw-r--r-- | sys-boot/refind/files/refind-0.14.0.2-clang.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/sys-boot/refind/files/refind-0.14.0.2-clang.patch b/sys-boot/refind/files/refind-0.14.0.2-clang.patch new file mode 100644 index 000000000000..fe2323390355 --- /dev/null +++ b/sys-boot/refind/files/refind-0.14.0.2-clang.patch @@ -0,0 +1,62 @@ +Fix compilation with clang. + +Clang does not support nested functions (a gcc extension), so move it outside. + +Compiling with _FORTIFY_SOURCE and -ffreestanding results in +nanojpeg.c:(.text+0xa28): undefined reference to `__memset_chk' + +See also: https://bugs.gentoo.org/881131 + +--- a/filesystems/crc32c.c ++++ b/filesystems/crc32c.c +@@ -22,25 +22,24 @@ + + static uint32_t crc32c_table [256]; + +-static void +-init_crc32c_table (void) ++uint32_t reflect (uint32_t ref, int len) + { +- auto uint32_t reflect (uint32_t ref, int len); +- uint32_t reflect (uint32_t ref, int len) +- { +- uint32_t result = 0; +- int i; ++ uint32_t result = 0; ++ int i; + +- for (i = 1; i <= len; i++) +- { +- if (ref & 1) +- result |= 1 << (len - i); +- ref >>= 1; +- } +- +- return result; ++ for (i = 1; i <= len; i++) ++ { ++ if (ref & 1) ++ result |= 1 << (len - i); ++ ref >>= 1; + } + ++ return result; ++} ++ ++static void ++init_crc32c_table (void) ++{ + static int crc32c_table_inited; + if(crc32c_table_inited) + return; +--- a/libeg/nanojpeg.c ++++ b/libeg/nanojpeg.c +@@ -112,6 +112,8 @@ + #ifndef _NANOJPEG_H + #define _NANOJPEG_H + ++#undef _FORTIFY_SOURCE ++ + // Modified: Map libc-style free() and malloc() to their EFI equivalents.... + #define free MyFreePool + #define malloc AllocatePool |