misc: Use freestanding_headers rather than shipping them

This commit is contained in:
mintsuki 2022-02-15 06:18:57 +01:00
parent d510a29045
commit 27d19e6f11
10 changed files with 4 additions and 63 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/build /build
/toolchain /toolchain
/reduced-gnu-efi /reduced-gnu-efi
/freestanding_headers
/ovmf* /ovmf*
*.o *.o
*.d *.d

View File

@ -9,6 +9,7 @@ test -z "$srcdir" && srcdir=.
cd "$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 stivale ] || git clone https://github.com/stivale/stivale.git
[ -d reduced-gnu-efi ] || git clone https://github.com/limine-bootloader/reduced-gnu-efi.git [ -d reduced-gnu-efi ] || git clone https://github.com/limine-bootloader/reduced-gnu-efi.git

View File

@ -63,7 +63,7 @@ override INTERNAL_CFLAGS := \
-DLIMINE_COPYRIGHT='"$(LIMINE_COPYRIGHT)"' \ -DLIMINE_COPYRIGHT='"$(LIMINE_COPYRIGHT)"' \
-DCOM_OUTPUT=$(COM_OUTPUT) \ -DCOM_OUTPUT=$(COM_OUTPUT) \
-DE9_OUTPUT=$(E9_OUTPUT) \ -DE9_OUTPUT=$(E9_OUTPUT) \
-I../stdinc \ -I../freestanding_headers \
-I. \ -I. \
-I../stivale \ -I../stivale \
-I'$(call SHESCAPE,$(BUILDDIR))/tinf' -I'$(call SHESCAPE,$(BUILDDIR))/tinf'

View File

@ -37,7 +37,7 @@ override INTERNAL_CFLAGS := \
-mno-sse \ -mno-sse \
-mno-sse2 \ -mno-sse2 \
-MMD \ -MMD \
-I../stdinc \ -I../freestanding_headers \
-I. \ -I. \
-I'$(call SHESCAPE,$(BUILDDIR))/tinf' -I'$(call SHESCAPE,$(BUILDDIR))/tinf'

View File

@ -1,6 +0,0 @@
#ifndef __STDALIGN_H__
#define __STDALIGN_H__
#define alignas(a) __attribute__((aligned(a)))
#endif

View File

@ -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

View File

@ -1,9 +0,0 @@
#ifndef __STDBOOL_H__
#define __STDBOOL_H__
#define bool _Bool
#define true 1
#define false 0
#endif

View File

@ -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

View File

@ -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

View File

@ -1,6 +0,0 @@
#ifndef __STDNORETURN_H__
#define __STDNORETURN_H__
#define noreturn __attribute__((noreturn))
#endif