From 27d19e6f11d94674d7d2ebc2a9f7f0950877586a Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 15 Feb 2022 06:18:57 +0100 Subject: [PATCH] misc: Use freestanding_headers rather than shipping them --- .gitignore | 1 + autogen.sh | 1 + common/GNUmakefile | 2 +- decompressor/GNUmakefile | 2 +- stdinc/stdalign.h | 6 ------ stdinc/stdarg.h | 10 ---------- stdinc/stdbool.h | 9 --------- stdinc/stddef.h | 14 -------------- stdinc/stdint.h | 16 ---------------- stdinc/stdnoreturn.h | 6 ------ 10 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 stdinc/stdalign.h delete mode 100644 stdinc/stdarg.h delete mode 100644 stdinc/stdbool.h delete mode 100644 stdinc/stddef.h delete mode 100644 stdinc/stdint.h delete mode 100644 stdinc/stdnoreturn.h diff --git a/.gitignore b/.gitignore index bd764927..419ae40e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /build /toolchain /reduced-gnu-efi +/freestanding_headers /ovmf* *.o *.d diff --git a/autogen.sh b/autogen.sh index 65a41b76..7fa7dc5a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,6 +9,7 @@ test -z "$srcdir" && srcdir=. cd "$srcdir" +[ -d freestanding_headers ] || git clone https://github.com/mintsuki/freestanding_headers.git [ -d stivale ] || git clone https://github.com/stivale/stivale.git [ -d reduced-gnu-efi ] || git clone https://github.com/limine-bootloader/reduced-gnu-efi.git diff --git a/common/GNUmakefile b/common/GNUmakefile index 29a4a1e6..38924924 100644 --- a/common/GNUmakefile +++ b/common/GNUmakefile @@ -63,7 +63,7 @@ override INTERNAL_CFLAGS := \ -DLIMINE_COPYRIGHT='"$(LIMINE_COPYRIGHT)"' \ -DCOM_OUTPUT=$(COM_OUTPUT) \ -DE9_OUTPUT=$(E9_OUTPUT) \ - -I../stdinc \ + -I../freestanding_headers \ -I. \ -I../stivale \ -I'$(call SHESCAPE,$(BUILDDIR))/tinf' diff --git a/decompressor/GNUmakefile b/decompressor/GNUmakefile index cf008888..fb307ff1 100644 --- a/decompressor/GNUmakefile +++ b/decompressor/GNUmakefile @@ -37,7 +37,7 @@ override INTERNAL_CFLAGS := \ -mno-sse \ -mno-sse2 \ -MMD \ - -I../stdinc \ + -I../freestanding_headers \ -I. \ -I'$(call SHESCAPE,$(BUILDDIR))/tinf' diff --git a/stdinc/stdalign.h b/stdinc/stdalign.h deleted file mode 100644 index e0f666e8..00000000 --- a/stdinc/stdalign.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __STDALIGN_H__ -#define __STDALIGN_H__ - -#define alignas(a) __attribute__((aligned(a))) - -#endif diff --git a/stdinc/stdarg.h b/stdinc/stdarg.h deleted file mode 100644 index 72c8707e..00000000 --- a/stdinc/stdarg.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __STDARG_H__ -#define __STDARG_H__ - -typedef __builtin_va_list va_list; - -#define va_start(v, l) __builtin_va_start(v, l) -#define va_end(v) __builtin_va_end(v) -#define va_arg(v, l) __builtin_va_arg(v, l) - -#endif diff --git a/stdinc/stdbool.h b/stdinc/stdbool.h deleted file mode 100644 index 1308f450..00000000 --- a/stdinc/stdbool.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __STDBOOL_H__ -#define __STDBOOL_H__ - -#define bool _Bool - -#define true 1 -#define false 0 - -#endif diff --git a/stdinc/stddef.h b/stdinc/stddef.h deleted file mode 100644 index b5ad4bb6..00000000 --- a/stdinc/stddef.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __STDDEF_H__ -#define __STDDEF_H__ - -typedef __SIZE_TYPE__ size_t; - -#ifdef NULL -#undef NULL -#endif - -#define NULL ((void *)0) - -#define offsetof(s, m) __builtin_offsetof(s, m) - -#endif diff --git a/stdinc/stdint.h b/stdinc/stdint.h deleted file mode 100644 index b937d413..00000000 --- a/stdinc/stdint.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __STDINT_H__ -#define __STDINT_H__ - -typedef __UINT8_TYPE__ uint8_t; -typedef __UINT16_TYPE__ uint16_t; -typedef __UINT32_TYPE__ uint32_t; -typedef __UINT64_TYPE__ uint64_t; - -typedef __INT8_TYPE__ int8_t; -typedef __INT16_TYPE__ int16_t; -typedef __INT32_TYPE__ int32_t; -typedef __INT64_TYPE__ int64_t; - -typedef __UINTPTR_TYPE__ uintptr_t; - -#endif diff --git a/stdinc/stdnoreturn.h b/stdinc/stdnoreturn.h deleted file mode 100644 index fa6603d2..00000000 --- a/stdinc/stdnoreturn.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __STDNORETURN_H__ -#define __STDNORETURN_H__ - -#define noreturn __attribute__((noreturn)) - -#endif