From 1aad54a99b6ce316c851ba99b2efe41998cfd37d Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 18 Nov 2008 17:33:48 +0900 Subject: sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. This moves in the necessary libgcc bits for SUPERH32 and drops the libgcc linking for the regular targets. This in turn allows us to rip out quite a few hacks both in sh_ksyms_32 and arch/sh/Makefile. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index c43eb0d7fa3..22a1794287a 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -34,22 +34,6 @@ cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \ $(call cc-option,-m4a-nofpu,) cflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,) -ifeq ($(cflags-y),) -# -# In the case where we are stuck with a compiler that has been uselessly -# restricted to a particular ISA, a favourite default of newer GCCs when -# extensive multilib targets are not provided, ensure we get the best fit -# regarding FP generation. This is necessary to avoid references to FP -# variants in libgcc where integer variants exist, which otherwise result -# in link errors. This is intentionally stupid (albeit many orders of -# magnitude less than GCC's default behaviour), as anything with a large -# number of multilib targets better have been built correctly for -# the target in mind. -# -cflags-y += $(shell $(CC) $(KBUILD_CFLAGS) -print-multi-lib | \ - grep nofpu | sed q | sed -e 's/^/-/;s/;.*$$//') -endif - cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml @@ -176,8 +160,7 @@ KBUILD_AFLAGS += $(cflags-y) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) -libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) -libs-y += $(LIBGCC) +libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) $(LIBGCC) PHONY += maketools FORCE -- cgit v1.2.3 From 709420dd4e75083ee7920e61c2d0bcc3db9b7405 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 18 Nov 2008 17:35:45 +0900 Subject: sh: Specify sane default image targets for the SH-2 platforms. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 22a1794287a..227207b9b7a 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -63,6 +63,9 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment \ # Give the various platforms the opportunity to set default image types defaultimage-$(CONFIG_SUPERH32) := zImage defaultimage-$(CONFIG_SH_SH7785LCR) := uImage +defaultimage-$(CONFIG_SH_RSK7203) := uImage +defaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux +defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux # Set some sensible Kbuild defaults KBUILD_DEFCONFIG := shx3_defconfig -- cgit v1.2.3 From 8bcc5c1c332af97ba731f99fda780a47911e476f Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 20 Nov 2008 15:28:47 +0900 Subject: sh: Add -m4al tuning for SH4AL-DSP. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 227207b9b7a..fac1567b2af 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -32,6 +32,7 @@ cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \ $(call cc-option,-mno-implicit-fp,-m4-nofpu) cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \ $(call cc-option,-m4a-nofpu,) +cflags-$(CONFIG_CPU_SH4AL_DSP) += $(call cc-option,-m4al,) cflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,) cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb -- cgit v1.2.3 From 5dd614761f05f56b93c94541aa92e6449920516c Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 26 Nov 2008 04:21:36 +0900 Subject: sh: Re-add support for best fit ISA tuning if none is available. This was removed in the libgcc integration, but there are still some compilers that need this. We also relax the rules on the ISA tuning in the cases where there are no matches for the CPU tuning and adopt the -any default, which matches the intent of the isa-y target list. This compensates for mismatches where binutils supports a wide array of targets whilst the compiler is much more restricted. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index fac1567b2af..ad009615178 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -35,11 +35,21 @@ cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \ cflags-$(CONFIG_CPU_SH4AL_DSP) += $(call cc-option,-m4al,) cflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,) -cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb -cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml - -cflags-y += $(call cc-option,-mno-fdpic) - +ifeq ($(cflags-y),) +# +# In the case where we are stuck with a compiler that has been uselessly +# restricted to a particular ISA, a favourite default of newer GCCs when +# extensive multilib targets are not provided, ensure we get the best fit +# regarding FP generation. This is intentionally stupid (albeit many +# orders of magnitude less than GCC's default behaviour), as anything +# with a large number of multilib targets better have been built +# correctly for the target in mind. +# +cflags-y += $(shell $(CC) $(KBUILD_CFLAGS) -print-multi-lib | \ + grep nofpu | sed q | sed -e 's/^/-/;s/;.*$$//') +# At this point, anything goes. +isaflags-y := $(call as-option,-Wa$(comma)-isa=any,) +else # # -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that # support it, while -Wa,-dsp by itself limits the range of usable opcodes @@ -52,7 +62,12 @@ isaflags-y := $(call as-option,-Wa$(comma)-isa=$(isa-y),) isaflags-$(CONFIG_SH_DSP) := \ $(call as-option,-Wa$(comma)-isa=$(isa-y),-Wa$(comma)-dsp) +endif + +cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb +cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml +cflags-y += $(call cc-option,-mno-fdpic) cflags-y += $(isaflags-y) -ffreestanding cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ -- cgit v1.2.3 From ea0aac1e1327476d2f6a38f08145281237cf1b03 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 8 Dec 2008 14:32:03 +0900 Subject: sh: Consolidate rsk7203/7201 in to a new mach-rsk. RSK+ platforms have quite a few characteristics in common, so roll them together in to a shiny new RSK mach-type. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index ad009615178..d56889e62a9 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -135,6 +135,7 @@ machdir-$(CONFIG_SH_LANDISK) += mach-landisk machdir-$(CONFIG_SH_TITAN) += mach-titan machdir-$(CONFIG_SH_LBOX_RE2) += mach-lboxre2 machdir-$(CONFIG_SH_CAYMAN) += mach-cayman +machdir-$(CONFIG_SH_RSK) += mach-rsk ifneq ($(machdir-y),) core-y += $(addprefix arch/sh/boards/, \ -- cgit v1.2.3 From 180ae2037f5bc33b0597ddbb76d36b08a74a238a Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Fri, 12 Dec 2008 16:53:14 +0900 Subject: sh: Provide sdivsi3/udivsi3/udivdi3 for sh64, kill off libgcc linking. This moves in the necessary libgcc bits and kills off the libgcc linking for sh64 kernels as well. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index d56889e62a9..c59098dcdfa 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -177,10 +177,8 @@ KBUILD_CFLAGS += -pipe $(cflags-y) KBUILD_CPPFLAGS += $(cflags-y) KBUILD_AFLAGS += $(cflags-y) -LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) - libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) -libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) $(LIBGCC) +libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) PHONY += maketools FORCE -- cgit v1.2.3 From 6f5cd2bd59c3bbaf073a7a52fcdefded939bd306 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 22 Dec 2008 03:26:26 +0900 Subject: sh: mach-rsk: Use uImage generation by default for rsk7201/7203. Signed-off-by: Paul Mundt --- arch/sh/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/Makefile') diff --git a/arch/sh/Makefile b/arch/sh/Makefile index c59098dcdfa..4067b0d9287 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -79,7 +79,7 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment \ # Give the various platforms the opportunity to set default image types defaultimage-$(CONFIG_SUPERH32) := zImage defaultimage-$(CONFIG_SH_SH7785LCR) := uImage -defaultimage-$(CONFIG_SH_RSK7203) := uImage +defaultimage-$(CONFIG_SH_RSK) := uImage defaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux -- cgit v1.2.3