mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
x86: move i386 and x86_64 Makefiles to arch/x86
Moving the ARCH specific Makefiles for i386 and x86_64 required a litle bit tweaking in the top-lvel Makefile. SRCARCH is now set in the top-level Makefile because we need this info to include the correct arch Makefile. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
c9927c2bf4
commit
74b469f2e6
5 changed files with 21 additions and 11 deletions
7
Makefile
7
Makefile
|
@ -196,6 +196,9 @@ CROSS_COMPILE ?=
|
||||||
UTS_MACHINE := $(ARCH)
|
UTS_MACHINE := $(ARCH)
|
||||||
SRCARCH := $(ARCH)
|
SRCARCH := $(ARCH)
|
||||||
|
|
||||||
|
# for i386 and x86_64 we use SRCARCH equal to x86
|
||||||
|
SRCARCH := $(if $(filter x86_64 i386,$(SRCARCH)),x86,$(SRCARCH))
|
||||||
|
|
||||||
KCONFIG_CONFIG ?= .config
|
KCONFIG_CONFIG ?= .config
|
||||||
|
|
||||||
# SHELL used by kbuild
|
# SHELL used by kbuild
|
||||||
|
@ -418,7 +421,7 @@ ifeq ($(config-targets),1)
|
||||||
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
|
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
|
||||||
# KBUILD_DEFCONFIG may point out an alternative default configuration
|
# KBUILD_DEFCONFIG may point out an alternative default configuration
|
||||||
# used for 'make defconfig'
|
# used for 'make defconfig'
|
||||||
include $(srctree)/arch/$(ARCH)/Makefile
|
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||||
export KBUILD_DEFCONFIG
|
export KBUILD_DEFCONFIG
|
||||||
|
|
||||||
config %config: scripts_basic outputmakefile FORCE
|
config %config: scripts_basic outputmakefile FORCE
|
||||||
|
@ -497,7 +500,7 @@ else
|
||||||
KBUILD_CFLAGS += -O2
|
KBUILD_CFLAGS += -O2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(srctree)/arch/$(ARCH)/Makefile
|
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||||
|
|
||||||
ifdef CONFIG_FRAME_POINTER
|
ifdef CONFIG_FRAME_POINTER
|
||||||
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
|
|
13
arch/x86/Makefile
Normal file
13
arch/x86/Makefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Unified Makefile for i386 and x86_64
|
||||||
|
|
||||||
|
# No need to remake these files
|
||||||
|
$(srctree)/arch/x86/Makefile%: ;
|
||||||
|
|
||||||
|
ifeq ($(ARCH),i386)
|
||||||
|
include $(srctree)/arch/x86/Makefile_32
|
||||||
|
else
|
||||||
|
include $(srctree)/arch/x86/Makefile_64
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# i386/Makefile
|
# i386 Makefile
|
||||||
#
|
#
|
||||||
# This file is included by the global makefile so that you can add your own
|
# This file is included by the global makefile so that you can add your own
|
||||||
# architecture-specific flags and dependencies. Remember to do have actions
|
# architecture-specific flags and dependencies. Remember to do have actions
|
||||||
|
@ -17,9 +17,6 @@
|
||||||
# 20050320 Kianusch Sayah Karadji <kianusch@sk-tech.net>
|
# 20050320 Kianusch Sayah Karadji <kianusch@sk-tech.net>
|
||||||
# Added support for GEODE CPU
|
# Added support for GEODE CPU
|
||||||
|
|
||||||
# Fill in SRCARCH
|
|
||||||
SRCARCH := x86
|
|
||||||
|
|
||||||
# BITS is used as extension for files which are available in a 32 bit
|
# BITS is used as extension for files which are available in a 32 bit
|
||||||
# and a 64 bit version to simplify shared Makefiles.
|
# and a 64 bit version to simplify shared Makefiles.
|
||||||
# e.g.: obj-y += foo_$(BITS).o
|
# e.g.: obj-y += foo_$(BITS).o
|
||||||
|
@ -46,7 +43,7 @@ KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
|
||||||
KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
|
KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
|
||||||
|
|
||||||
# CPU-specific tuning. Anything which can be shared with UML should go here.
|
# CPU-specific tuning. Anything which can be shared with UML should go here.
|
||||||
include $(srctree)/arch/i386/Makefile.cpu
|
include $(srctree)/arch/x86/Makefile_32.cpu
|
||||||
|
|
||||||
# temporary until string.h is fixed
|
# temporary until string.h is fixed
|
||||||
cflags-y += -ffreestanding
|
cflags-y += -ffreestanding
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# x86_64/Makefile
|
# x86_64 Makefile
|
||||||
#
|
#
|
||||||
# This file is included by the global makefile so that you can add your own
|
# This file is included by the global makefile so that you can add your own
|
||||||
# architecture-specific flags and dependencies. Remember to do have actions
|
# architecture-specific flags and dependencies. Remember to do have actions
|
||||||
|
@ -21,9 +21,6 @@
|
||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
|
# $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
|
||||||
|
|
||||||
# Fill in SRCARCH
|
|
||||||
SRCARCH := x86
|
|
||||||
|
|
||||||
# BITS is used as extension for files which are available in a 32 bit
|
# BITS is used as extension for files which are available in a 32 bit
|
||||||
# and a 64 bit version to simplify shared Makefiles.
|
# and a 64 bit version to simplify shared Makefiles.
|
||||||
# e.g.: obj-y += foo_$(BITS).o
|
# e.g.: obj-y += foo_$(BITS).o
|
Loading…
Reference in a new issue