-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathconfig.mk
More file actions
21 lines (20 loc) · 832 Bytes
/
config.mk
File metadata and controls
21 lines (20 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CFLAGS = -std=gnu99 -Os -Wall -Wextra -nostdinc -fno-builtin -ffreestanding \
-m32 -fno-asynchronous-unwind-tables -fno-common -fno-pie -march=i486
# SSP causes compilation problems on Ubuntu
CFLAGS += -fno-stack-protector
#K_EXTRA_CFLAGS = -g3
# Place each function or data item into a separate section
CFLAGS += -ffunction-sections -fdata-sections
CPPFLAGS += -I$(shell $(CC) -m32 --print-file-name=include)
# enable dlmalloc self-corruption tests.
#CPPFLAGS += -DDEBUG=1 -DFOOTERS=1
ASFLAGS = -m32
LDFLAGS = -nostdlib -m32 -Wl,--build-id=none -nostartfiles -static
# Tell `ld` we don't need an executable stack
LDFLAGS += -Wl,-znoexecstack
# Detect and remove unused sections while linking the objects
LDFLAGS += -Wl,--gc-sections
#LDFLAGS += -Wl,--print-gc-sections
ARFLAGS = src
INSTALL = install -C -D
INSTALL_ROOT ?= iso