--- zzzz-none-000/linux-2.6.39.4/arch/arm/Makefile 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/arch/arm/Makefile 2021-11-10 13:23:09.000000000 +0000 @@ -88,8 +88,10 @@ tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) -tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) -tune-$(CONFIG_CPU_V6K) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) +#tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) +tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=arm1136jfs) +tune-$(CONFIG_CPU_V6K) :=$(call cc-option, -mtune=arm1176jz-s, -mcpu=arm1176jz-s) + ifeq ($(CONFIG_AEABI),y) CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork @@ -97,8 +99,15 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) endif +# Need -Uarm for gcc < 3.x +CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm +AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float + +# mbahr: Compiler 4.7.1: the new option -munaligned-access is active by default: arm1176 doesn't support unaligned-access +KBUILD_CFLAGS += -mno-unaligned-access + ifeq ($(CONFIG_ARM_UNWIND),y) -CFLAGS_ABI +=-funwind-tables +CFLAGS_ABI +=#-funwind-tables endif ifeq ($(CONFIG_THUMB2_KERNEL),y) @@ -116,6 +125,48 @@ KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float +############################################################################################ +# ACHTUNG: Der gcc-4.8.1 hat einen Compilerfehler der dafür sorgt, dass der Returnwert +# manchmal nach der korrektur des Stack (local stack frame) von zuvor bereits +# freigegebene stackbereich gelesen wird. Das hat zur Folge, dass sollte +# zwischendurch ein IRQ auftreten der Returnwert unter Umständen zerstört wird +# und die Funktion somit einen unsinnigen Wert zurückliefert. +# +# Das lässt sich durch das setzen der Option -fno-reorder-blocks unterdrücken. +############################################################################################ +ifeq ($(FRITZ_BOX_GCC_VERSION),040802) + +KBUILD_CFLAGS += -fstrict-volatile-bitfields -mno-unaligned-access -fno-aggressive-loop-optimizations \ + -fno-reorder-blocks + +KBUILD_AFLAGS += -fstrict-volatile-bitfields -fno-aggressive-loop-optimizations \ + -fno-reorder-blocks +endif +ifeq ($(FRITZ_BOX_GCC_VERSION),040801) + +KBUILD_CFLAGS += -fstrict-volatile-bitfields -mno-unaligned-access -fno-aggressive-loop-optimizations \ + -fno-reorder-blocks + +KBUILD_AFLAGS += -fstrict-volatile-bitfields -fno-aggressive-loop-optimizations \ + -fno-reorder-blocks +endif +ifeq ($(FRITZ_BOX_GCC_VERSION),040800) +KBUILD_CFLAGS += -fstrict-volatile-bitfields -mno-unaligned-access +KBUILD_AFLAGS += -fstrict-volatile-bitfields +endif +ifeq ($(FRITZ_BOX_GCC_VERSION),040704) +KBUILD_CFLAGS += -fstrict-volatile-bitfields -mno-unaligned-access +KBUILD_AFLAGS += -fstrict-volatile-bitfields +endif +ifeq ($(FRITZ_BOX_GCC_VERSION),040703) +KBUILD_CFLAGS += -fstrict-volatile-bitfields -mno-unaligned-access +KBUILD_AFLAGS += -fstrict-volatile-bitfields +endif +ifeq ($(FRITZ_BOX_GCC_VERSION),040702) +KBUILD_CFLAGS += -fstrict-volatile-bitfields -mno-unaligned-access +KBUILD_AFLAGS += -fstrict-volatile-bitfields +endif + CHECKFLAGS += -D__arm__ #Default value @@ -201,6 +252,8 @@ machine-$(CONFIG_MACH_SPEAR310) := spear3xx machine-$(CONFIG_MACH_SPEAR320) := spear3xx machine-$(CONFIG_MACH_SPEAR600) := spear6xx +machine-$(CONFIG_ARCH_AVALANCHE) := avalanche +textofs-$(CONFIG_ARCH_AVALANCHE) := 0x00008000 # Platform directory name. This list is sorted alphanumerically # by CONFIG_* macro name. @@ -228,6 +281,12 @@ # The byte offset of the kernel image in RAM from the start of RAM. TEXT_OFFSET := $(textofs-y) +ifeq ($(incdir-y),) +incdir-y := $(machine-y) +endif +INCDIR := arch-$(incdir-y) + + # The first directory contains additional information for the boot setup code ifneq ($(machine-y),) MACHINE := arch/arm/mach-$(word 1,$(machine-y))/ @@ -261,8 +320,11 @@ core-y += $(machdirs) $(platdirs) drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ +#drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ +#drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ libs-y := arch/arm/lib/ $(libs-y) +libs-$(CONFIG_AVM_ENHANCED) += arch/arm/avm_enh/ # Default target when executing plain make ifeq ($(CONFIG_XIP_KERNEL),y)