ia64/xen-unstable

view xen/arch/x86/Rules.mk @ 3510:b65d76ce54d5

bitkeeper revision 1.1159.226.2 (41f530d3LtbkTKUSgcI8LiQlQRJG0w)

Fix Xen's linker command line.
author kaf24@scramble.cl.cam.ac.uk
date Mon Jan 24 17:30:59 2005 +0000 (2005-01-24)
parents 708bd9c8362b
children 8e9727839e1d e2f1686415aa
line source
1 ########################################
2 # x86-specific definitions
4 CC := gcc
5 LD := ld
7 CFLAGS := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
8 CFLAGS += -iwithprefix include -Wall -Werror -pipe
9 CFLAGS += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
11 ifeq ($(optimize),y)
12 CFLAGS += -O3 -fomit-frame-pointer
13 else
14 x86_32/usercopy.o: CFLAGS += -O1
15 endif
17 # Prevent floating-point variables from creeping into Xen.
18 CFLAGS += -msoft-float
20 # Disable PIE/SSP if GCC supports them. They can break us.
21 CFLAGS += $(call test-gcc-flag,-nopie)
22 CFLAGS += $(call test-gcc-flag,-fno-stack-protector)
23 CFLAGS += $(call test-gcc-flag,-fno-stack-protector-all)
25 ifeq ($(TARGET_SUBARCH),x86_32)
26 CFLAGS += -m32 -march=i686
27 LDFLAGS := -m elf_i386
28 endif
30 ifeq ($(TARGET_SUBARCH),x86_64)
31 CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
32 CFLAGS += -fno-asynchronous-unwind-tables
33 LDFLAGS := -m elf_x86_64
34 endif
36 # Test for at least GCC v3.2.x.
37 gcc-ver = $(shell $(CC) -dumpversion | sed -e 's/^\(.\)\.\(.\)\.\(.\)/\$(1)/')
38 ifeq ($(call gcc-ver,1),1)
39 $(error gcc-1.x.x unsupported - upgrade to at least gcc-3.2.x)
40 endif
41 ifeq ($(call gcc-ver,1),2)
42 $(error gcc-2.x.x unsupported - upgrade to at least gcc-3.2.x)
43 endif
44 ifeq ($(call gcc-ver,1),3)
45 ifeq ($(call gcc-ver,2),0)
46 $(error gcc-3.0.x unsupported - upgrade to at least gcc-3.2.x)
47 endif
48 ifeq ($(call gcc-ver,2),1)
49 $(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x)
50 endif
51 endif