Kaynağa Gözat

[makefile] Kill off arch/$(ARCH)/Config

The arch/i386/Config file has long been marked as deprecated.  Move all
the pertinent bits to arch/i386/Makefile instead and remove
arch/i386/Config.
tags/v0.9.6
Michael Brown 16 yıl önce
ebeveyn
işleme
f0b942ef42
3 değiştirilmiş dosya ile 56 ekleme ve 166 silme
  1. 0
    13
      src/Makefile
  2. 0
    148
      src/arch/i386/Config
  3. 56
    5
      src/arch/i386/Makefile

+ 0
- 13
src/Makefile Dosyayı Görüntüle

@@ -73,19 +73,6 @@ noargs : blib $(BIN)/NIC $(BIN)/gpxe.dsk $(BIN)/gpxe.iso $(BIN)/gpxe.usb $(BIN)/
73 73
 #
74 74
 ARCH		:= $(shell uname -m | sed -e 's,i[3456789]86,i386,')
75 75
 
76
-# handle x86_64 like i386, but set -m32 option for 32bit code only
77
-ifeq ($(ARCH),x86_64)
78
-ARCH		:= i386
79
-CFLAGS		+= -m32
80
-ASFLAGS         += --32
81
-LDFLAGS         += -m elf_i386
82
-endif
83
-
84
-# Drag in architecture-specific Config
85
-#
86
-MAKEDEPS	+= arch/$(ARCH)/Config
87
-include arch/$(ARCH)/Config
88
-
89 76
 # Common flags
90 77
 #
91 78
 CFLAGS		+= -I include -I arch/$(ARCH)/include -I . -DARCH=$(ARCH)

+ 0
- 148
src/arch/i386/Config Dosyayı Görüntüle

@@ -1,148 +0,0 @@
1
-# -*- makefile -*-
2
-
3
-##############################################################################
4
-##############################################################################
5
-#
6
-# IMPORTANT!
7
-# 
8
-# The use of this file to set options that affect only single object
9
-# files is deprecated, because changing anything in this file results
10
-# in a complete rebuild, which is slow.  All options are gradually
11
-# being migrated to config.h, which does not suffer from this problem.
12
-# 
13
-# Only options that affect the entire build (e.g. overriding the $(CC)
14
-# Makefile variable) should be placed in here.
15
-#
16
-##############################################################################
17
-##############################################################################
18
-
19
-
20
-# Config for i386 Etherboot
21
-#
22
-# Do not delete the tag OptionDescription and /OptionDescription
23
-# It is used to automatically generate the documentation.
24
-#
25
-# @OptionDescrition@
26
-#
27
-#	BIOS interface options:
28
-#
29
-#	-DPCBIOS
30
-#			Compile in support for the normal pcbios
31
-#	-DLINUXBIOS
32
-#			Compile in support for LinuxBIOS
33
-#	-DBBS_BUT_NOT_PNP_COMPLIANT
34
-#			Some BIOSes claim to be PNP but they don't conform
35
-#			to the BBS spec which specifies that ES:DI must
36
-#			point to the string $PnP on entry. This option
37
-#			works around those. This option must be added to
38
-#			LCONFIG.
39
-#	-DNO_DELAYED_INT
40
-#			Take control as soon as BIOS detects the ROM.
41
-#			Normally hooks onto INT18H or INT19H. Use only if you
42
-#			have a very non-conformant BIOS as it bypasses
43
-#			BIOS initialisation of devices. This only works for
44
-#			legacy ROMs, i.e. PCI_PNP_HEADER not defined.
45
-#			This option was formerly called NOINT19H.
46
-#	-DBOOT_INT18H
47
-#			Etherboot normally hooks onto INT19H for legacy ROMs.
48
-#			You can choose to hook onto INT18H (BASIC interpreter
49
-#			entry point) instead. This entry point is used when
50
-#			all boot devices have been exhausted. This option must
51
-#			be added to LCONFIG.
52
-#	-DCONFIG_PCI_DIRECT
53
-#			Define this for PCI BIOSes that do not implement
54
-#			BIOS32 or not correctly. Normally not needed.
55
-#			Only works for BIOSes of a certain era.
56
-#	-DCONFIG_TSC_CURRTICKS
57
-#			Uses the processor time stamp counter instead of reading
58
-#			the BIOS time counter.  This allows Etherboot to work
59
-#			even without a BIOS.  This only works on late model
60
-#			486s and above.
61
-#	-DCONFIG_NO_TIMER2
62
-#			Some systems do not have timer2 implemented.
63
-#			If you have a RTC this will allow you to roughly calibrate
64
-#			it using outb instructions.
65
-#
66
-#	Extended cpu options
67
-
68
-#	-DCONFIG_X86_64	
69
-#			Compile in support for booting x86_64 64bit binaries.
70
-#
71
-#	PXE loader options:
72
-#
73
-#	-DPXELOADER_KEEP_ALL
74
-#			Prevent PXE loader (prefix) from unloading the
75
-#			PXE stack.  You will want to use this if, for
76
-#			example, you are booting via PXE-on-floppy.
77
-#			You may want to use it under certain
78
-#			circumstances when using the Etherboot UNDI
79
-#			driver; these are complex and best practice is
80
-#			not yet established.
81
-#			
82
-#	Obscure options you probably don't need to touch:
83
-#
84
-#	-DIGNORE_E820_MAP
85
-#			Ignore the memory map returned by the E820 BIOS
86
-#			call.  May be necessary on some buggy BIOSes.
87
-#	-DT503_AUI
88
-#			Use AUI by default on 3c503 cards.
89
-#	-DFLATTEN_REAL_MODE
90
-# 			Use 4GB segment limits when calling out to or
91
-#			returning to real-mode code.  This is necessary to
92
-#			work around some buggy code (e.g. OpenBSD's pxeboot)
93
-#			that uses flat real-mode without being sufficiently
94
-#			paranoid about the volatility of its segment limits.
95
-
96
-#
97
-# @/OptionDescription@
98
-
99
-# BIOS select don't change unless you know what you are doing
100
-# CFLAGS+=	-DPCBIOS
101
-
102
-# Compile in k8/hammer support
103
-# CFLAGS+=	-DCONFIG_X86_64
104
-
105
-# Options to make a version of Etherboot that will work under linuxBIOS.
106
-# CFLAGS+=	-DLINUXBIOS -DCONFIG_TSC_CURRTICKS  -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE 
107
-
108
-# These options affect the loader that is prepended to the Etherboot image
109
-# LCONFIG+=	-DBBS_BUT_NOT_PNP_COMPLIANT
110
-# LCONFIG+=	-DBOOT_INT18H
111
-
112
-# Produce code that will work with OpenBSD's pxeboot
113
-# CFLAGS+=	-DFLATTEN_REAL_MODE
114
-
115
-CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386
116
-# Squeeze the code in as little space as possible.
117
-# gcc3 needs a different syntax to gcc2 if you want to avoid spurious warnings.
118
-GCC_VERSION	 = $(subst ., ,$(shell $(CC) -dumpversion))
119
-GCC_MAJORVERSION = $(firstword $(GCC_VERSION))
120
-ifeq ($(GCC_MAJORVERSION),2)
121
-CFLAGS+=	-malign-jumps=1 -malign-loops=1 -malign-functions=1
122
-else
123
-CFLAGS+=	-falign-jumps=1 -falign-loops=1 -falign-functions=1
124
-endif
125
-
126
-# this is almost always a win. the kernel uses it, too.
127
-CFLAGS+= -mpreferred-stack-boundary=2
128
-
129
-# use regparm for all functions - C functions called from assembly (or
130
-# vice versa) need __cdecl now
131
-CFLAGS+= -mregparm=3
132
-
133
-# use -mrtd (same __cdecl requirements as above)
134
-CFLAGS+= -mrtd
135
-
136
-# this is the logical complement to -mregparm=3. 
137
-# it doesn't currently buy us anything, but if anything ever tries
138
-# to return small structures, let's be prepared
139
-CFLAGS+= -freg-struct-return
140
-
141
-LDFLAGS+=	-N --no-check-sections
142
-
143
-ifeq "$(shell uname -s)" "FreeBSD"
144
-CFLAGS+=	-DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE
145
-endif
146
-
147
-# An alternate location for isolinux.bin can be set here
148
-# ISOLINUX_BIN=/path/to/isolinux.bin

+ 56
- 5
src/arch/i386/Makefile Dosyayı Görüntüle

@@ -1,3 +1,59 @@
1
+# Force i386-only instructions
2
+#
3
+CFLAGS		+= -march=i386
4
+
5
+# Code size reduction.
6
+#
7
+CFLAGS		+= -fstrength-reduce -fomit-frame-pointer
8
+
9
+# Code size reduction.  gcc3 needs a different syntax to gcc2 if you
10
+# want to avoid spurious warnings.
11
+#
12
+GCC_VERSION	:= $(subst ., ,$(shell $(CC) -dumpversion))
13
+GCC_MAJOR	:= $(firstword $(GCC_VERSION))
14
+ifeq ($(GCC_MAJOR),2)
15
+CFLAGS		+= -malign-jumps=1 -malign-loops=1 -malign-functions=1
16
+else
17
+CFLAGS		+= -falign-jumps=1 -falign-loops=1 -falign-functions=1
18
+endif
19
+
20
+# Code size reduction.  This is almost always a win.  The kernel uses it, too.
21
+#
22
+CFLAGS		+= -mpreferred-stack-boundary=2
23
+
24
+# Code size reduction.  Use regparm for all functions - C functions
25
+# called from assembly (or vice versa) need __cdecl now
26
+#
27
+CFLAGS		+= -mregparm=3
28
+
29
+# Code size reduction.  Use -mrtd (same __cdecl requirements as above)
30
+CFLAGS		+= -mrtd
31
+
32
+# Code size reduction.  This is the logical complement to -mregparm=3.
33
+# It doesn't currently buy us anything, but if anything ever tries to
34
+# return small structures, let's be prepared
35
+#
36
+CFLAGS		+= -freg-struct-return
37
+
38
+# Stop ld from complaining about our customised linker script
39
+#
40
+LDFLAGS		+= -N --no-check-sections
41
+
42
+# Force 32-bit code even on an x86-64 machine
43
+#
44
+CFLAGS		+= -m32
45
+ASFLAGS         += --32
46
+LDFLAGS         += -m elf_i386
47
+
48
+# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
49
+#
50
+CFLAGS		+= -fshort-wchar
51
+
52
+# We need to undefine the default macro "i386" when compiling .S
53
+# files, otherwise ".arch i386" translates to ".arch 1"...
54
+#
55
+CFLAGS			+= -Ui386
56
+
1 57
 # Locations of utilities
2 58
 #
3 59
 ISOLINUX_BIN	= /usr/lib/syslinux/isolinux.bin
@@ -25,11 +81,6 @@ NON_AUTO_SRCS	+= arch/i386/core/wince_loader.c
25 81
 OBJS_unnrv2b		= unnrv2b unnrv2b16
26 82
 CFLAGS_unnrv2b16	= -DCODE16
27 83
 
28
-# We need to undefine the default macro "i386" when compiling .S
29
-# files, otherwise ".arch i386" translates to ".arch 1"...
30
-#
31
-CFLAGS_S		+= -Ui386
32
-
33 84
 # The i386 linker script
34 85
 #
35 86
 LDSCRIPT		= arch/i386/scripts/i386.lds

Loading…
İptal
Kaydet