blob: 829466034b179cc53dbf4bbc50e913feec5a20db (
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
32
33
34
35
36
|
ARCH=i686
# define compiler, linker, archiver and strip and their flags
# FIXME: cpp threadsafe statics
AS := i686-elf-as
CC := i686-elf-gcc
CCID := $(shell ${CC} --version | head -n1)
CFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion -fanalyzer -ffreestanding -std=gnu11 \
-mgeneral-regs-only \
$(shell echo ${CONFIG_CFLAGS})
CXX := i686-elf-g++
CXXID := $(shell ${CXX} --version | head -n1)
CXXFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion -ffreestanding -std=c++17 \
-mgeneral-regs-only -fno-use-cxa-atexit -fno-threadsafe-statics -fno-exceptions -fno-rtti \
$(shell echo ${CONFIG_CXXFLAGS})
LD := i686-elf-ld
LDID := $(shell ${LD} --version | head -n1)
LDFLAGS := -static -nostdlib \
$(shell echo ${CONFIG_LDFLAGS})
AR := i686-elf-ar
ARFLAGS := -crus
STRIP := i686-elf-strip
# define compiler and flags for test targets
TEST_CXX := g++
TEST_CXXFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Werror=conversion -g -Og \
$(shell pkg-config --cflags --libs gtest gtest_main gmock)
# emulator name and flags
QEMU := qemu-system-i386 -accel kvm -machine pc
|