Kernel: Add macros for current archutecture
This commit is contained in:
parent
337569b0ca
commit
7d8aafa0b5
|
@ -13,7 +13,7 @@ EXEC_PREFIX?=$(PREFIX)
|
|||
BOOTDIR?=$(EXEC_PREFIX)/boot
|
||||
INCLUDEDIR?=$(PREFIX)/include
|
||||
|
||||
CFLAGS:=$(CFLAGS) -D__is_kernel -Iinclude -fstack-protector -ffreestanding -Wall -Wextra -Werror=return-type -fno-omit-frame-pointer -mno-sse -mno-sse2
|
||||
CFLAGS:=$(CFLAGS) -D__is_kernel -D__arch=$(HOSTARCH) -Iinclude -fstack-protector -ffreestanding -Wall -Wextra -Werror=return-type -fno-omit-frame-pointer -mno-sse -mno-sse2
|
||||
CPPFLAGS:=$(CPPFLAGS) -fno-rtti -fno-exceptions
|
||||
LDFLAGS:=$(LDFLAGS)
|
||||
LIBS:=$(LIBS) -nostdlib -lk -lbank -lgcc
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#define ARCH(arch) (__arch == arch)
|
||||
|
||||
#if !defined(__arch) || (__arch != x86_64 && __arch != i386)
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
Loading…
Reference in New Issue