summaryrefslogtreecommitdiff
path: root/arch/x86/Makefrag.am
blob: e8ef6a1b603a2ca6b1e75898d88f279075f73901 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
x86_FILES =                             \
	arch/x86/machine/acpimp.c       \
	arch/x86/machine/acpimp.h       \
	arch/x86/machine/asm.h          \
	arch/x86/machine/atomic.h       \
	arch/x86/machine/biosmem.c      \
	arch/x86/machine/biosmem.h      \
	arch/x86/machine/boot_asm.S     \
	arch/x86/machine/boot.c         \
	arch/x86/machine/boot.h         \
	arch/x86/machine/config.h       \
	arch/x86/machine/cga.c          \
	arch/x86/machine/cga.h          \
	arch/x86/machine/cpu_asm.S      \
	arch/x86/machine/cpu.c          \
	arch/x86/machine/cpu.h          \
	arch/x86/machine/elf.h          \
	arch/x86/machine/io.h           \
	arch/x86/machine/lapic.c        \
	arch/x86/machine/lapic.h        \
	arch/x86/machine/mb.h           \
	arch/x86/machine/multiboot.h    \
	arch/x86/machine/param.h        \
	arch/x86/machine/pic.c          \
	arch/x86/machine/pic.h          \
	arch/x86/machine/pit.c          \
	arch/x86/machine/pit.h          \
	arch/x86/machine/pmap.c         \
	arch/x86/machine/pmap.h         \
	arch/x86/machine/strace.c       \
	arch/x86/machine/strace.h       \
	arch/x86/machine/tcb_asm.S      \
	arch/x86/machine/tcb.c          \
	arch/x86/machine/tcb.h          \
	arch/x86/machine/trap_asm.S     \
	arch/x86/machine/trap.c         \
	arch/x86/machine/trap.h         \
	arch/x86/machine/types.h

EXTRA_DIST += arch/x86/x15.lds.S $(x86_FILES)

if X86

# Store unwind information in .debug_frame instead of .eh_frame. Unwind
# tables aren't used at runtime, so using a debug section reduces the kernel
# code size.
AM_CFLAGS += -fno-asynchronous-unwind-tables

# For now, use frame pointers for convenient stack tracing.
AM_CFLAGS += -fno-omit-frame-pointer

# Never generate instructions that are unhandled in kernel mode.
AM_CFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-avx

x15_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096

if I386
AM_CPPFLAGS += -m32
x15_LDFLAGS += -m32
endif I386

if AMD64
AM_CPPFLAGS += -m64
AM_CFLAGS += -mcmodel=kernel -mno-red-zone
x15_LDFLAGS += -m64
endif AMD64

x15_SOURCES += $(x86_FILES)

endif X86