From b1619be7fae74c157476f62ea509aed028abe5f6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 22 Feb 2015 23:16:58 -0600 Subject: rework CFLAGS and default gcc --with-cpu usage For better maintenance, rework hardware model specific CFLAGS. Work in progress, needs moe testing. --- toolchain/gcc/Makefile | 65 +++++++++++--------------------------------------- 1 file changed, 14 insertions(+), 51 deletions(-) (limited to 'toolchain/gcc/Makefile') diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index d6f7abd62..e1734a8e3 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -84,11 +84,24 @@ endif # # architecture specific # +ifneq ($(ADK_TARGET_CPU),) +GCC_CONFOPTS+= --with-cpu=$(ADK_TARGET_CPU) +endif -ifneq ($(ADK_TARGET_ARCH_ARM)$(ADK_TARGET_ARCH_MIPS)$(ADK_TARGET_ARCH_PPC),) ifneq ($(ADK_TARGET_FLOAT),) GCC_CONFOPTS+= --with-float=$(ADK_TARGET_FLOAT) endif + +ifneq ($(ADK_TARGET_FPU),) +GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU) +endif + +ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB),y) +GCC_CONFOPTS+= --with-mode=thumb +endif + +ifeq ($(ADK_CPU_CF),y) +GCC_CONFOPTS+= --enable-multilib --with-arch=cf endif ifeq ($(ADK_TARGET_ARCH_M68K)$(ADK_TARGET_ARCH_SH)$(ADK_TARGET_ARCH_X86_64)$(ADK_TARGET_ARCH_X86),) @@ -125,56 +138,6 @@ ifeq ($(ADK_TARGET_ARCH_PPC),y) GCC_CONFOPTS+= --with-long-double-64 --enable-secureplt endif -ifeq ($(ADK_TARGET_ARCH_ARM),y) -ifneq ($(ADK_TARGET_FPU),) -GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU) -endif -endif - -ifeq ($(ADK_CPU_ARM926EJ_S),y) -GCC_CONFOPTS+= --with-cpu=arm926ej-s -endif - -ifeq ($(ADK_CPU_ARM1176JZF_S),y) -GCC_CONFOPTS+= --with-cpu=arm1176jzf-s -endif - -ifeq ($(ADK_CPU_CORTEX_M3),y) -GCC_CONFOPTS+= --with-cpu=cortex-m3 --with-mode=thumb -endif - -ifeq ($(ADK_CPU_CORTEX_M4),y) -GCC_CONFOPTS+= --with-cpu=cortex-m4 --with-mode=thumb -endif - -ifeq ($(ADK_CPU_CORTEX_A7),y) -GCC_CONFOPTS+= --with-cpu=cortex-a7 -endif - -ifeq ($(ADK_CPU_CORTEX_A9),y) -GCC_CONFOPTS+= --with-cpu=cortex-a9 -endif - -ifeq ($(ADK_CPU_XSCALE),y) -GCC_CONFOPTS+= --with-cpu=xscale -endif - -ifeq ($(ADK_CPU_SPARC_V8),y) -GCC_CONFOPTS+= --with-cpu=v8 -endif - -ifeq ($(ADK_CPU_SPARC_V9),y) -GCC_CONFOPTS+= --with-cpu=ultrasparc -endif - -ifeq ($(ADK_CPU_ARC),y) -GCC_CONFOPTS+= --with-cpu=arc700 -endif - -ifeq ($(ADK_CPU_CF_5208),y) -GCC_CONFOPTS+= --enable-multilib --with-arch=cf --with-cpu=5208 -endif - ifneq ($(ADK_TARGET_MIPS_ABI),) GCC_CONFOPTS+= --with-abi=${ADK_TARGET_MIPS_ABI} endif -- cgit v1.2.3