summaryrefslogtreecommitdiff
path: root/mk/defaults.mk
blob: 2c06603bfaf31b3066a70c42b0c64fdc86fff302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# Copyright (c) 2025, Ian Moffett
# Provided under the BSD-3 clause.
#

ARCH = x86_64
QEMU = qemu-system-$(ARCH)

CC = $(shell pwd)/var/cc/gcc/bin/$(ARCH)-pc-osmora-gcc
LD = $(shell pwd)/var/cc/toolchain/build-binutils/bin/$(ARCH)-pc-osmora-ld
AR = $(shell pwd)/var/cc/toolchain/build-binutils/bin/$(ARCH)-pc-osmora-ar

SYS_CFLAGS =			\
	-nostdlib			\
	-nostdinc			\
	-ffreestanding		\
	-fexceptions		\
	--std=gnu11			\
	-mcmodel=kernel		\
	-Wno-attributes

ifeq ($(ARCH),x86_64)
	SYS_CFLAGS += 		\
		-mno-sse		\
		-mno-sse2		\
		-mno-sse3		\
		-mno-avx		\
		-mno-avx2		\
		-mno-80387		\
		-mno-3dnow
endif