Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
I really should make this build system work better
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed May 31, 2021
1 parent b871a54 commit 7b90902
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
TOOLCHAIN=util
BASE=base
export PATH := $(shell $(TOOLCHAIN)/activate.sh)
include build/arch.mk

TARGET=x86_64-pc-toaru
include build/x86_64.mk

CC = ${TARGET}-gcc
NM = ${TARGET}-nm
Expand All @@ -13,14 +12,8 @@ AS = ${TARGET}-as
OC = ${TARGET}-objcopy

KERNEL_CFLAGS = -ffreestanding -O2 -std=gnu11 -g -static

# Arch-specific arguments
KERNEL_CFLAGS += -mno-red-zone -fno-omit-frame-pointer -mfsgsbase
KERNEL_CFLAGS += -mgeneral-regs-only -z max-page-size=0x1000 -nostdlib

# Warnings
KERNEL_CFLAGS += -Wall -Wextra -Wno-unused-function -Wno-unused-parameter
KERNEL_CFLAGS += -pedantic -Wwrite-strings
KERNEL_CFLAGS += -pedantic -Wwrite-strings ${ARCH_KERNEL_CFLAGS}

# Defined constants for the kernel
KERNEL_CFLAGS += -D_KERNEL_ -DKERNEL_ARCH=${ARCH}
Expand Down
1 change: 0 additions & 1 deletion build/arch.mk

This file was deleted.

6 changes: 6 additions & 0 deletions build/x86_64.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARCH=x86_64

ARCH_KERNEL_CFLAGS = -mno-red-zone -fno-omit-frame-pointer -mfsgsbase
ARCH_KERNEL_CFLAGS += -mgeneral-regs-only -z max-page-size=0x1000 -nostdlib

TARGET=x86_64-pc-toaru

0 comments on commit 7b90902

Please sign in to comment.