Changeset 20215


Ignore:
Timestamp:
2010-03-14T19:24:05+01:00 (6 years ago)
Author:
nbd
Message:

add an arch suffix for handling different variants of arm/mips for the toolchain/target directories

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/rules.mk

    r19998 r20215  
    4343else 
    4444  FPIC:=-fpic 
     45endif 
     46 
     47ARCH_SUFFIX:= 
     48ifneq ($(findstring -mips32r2,$(TARGET_OPTIMIZATION)),) 
     49  ARCH_SUFFIX:=_r2 
     50endif 
     51ifneq ($(findstring -march=armv4,$(TARGET_OPTIMIZATION)),) 
     52  ARCH_SUFFIX:=_v4 
     53endif 
     54ifneq ($(findstring -march=armv4t,$(TARGET_OPTIMIZATION)),) 
     55  ARCH_SUFFIX:=_v4t 
     56endif 
     57ifneq ($(findstring -march=armv5t,$(TARGET_OPTIMIZATION)),) 
     58  ARCH_SUFFIX:=_v5t 
     59endif 
     60ifneq ($(findstring -march=armv5te,$(TARGET_OPTIMIZATION)),) 
     61  ARCH_SUFFIX:=_v5te 
    4562endif 
    4663 
     
    5976  GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux 
    6077  DIR_SUFFIX:=_$(LIBC)-$(LIBCV)$(if $(CONFIG_EABI_SUPPORT),_eabi) 
    61   BUILD_DIR:=$(BUILD_DIR_BASE)/target-$(ARCH)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) 
    62   STAGING_DIR:=$(TOPDIR)/staging_dir/target-$(ARCH)$(DIR_SUFFIX) 
    63   BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(ARCH)_gcc-$(GCCV)$(DIR_SUFFIX) 
    64   TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(ARCH)_gcc-$(GCCV)$(DIR_SUFFIX) 
     78  BUILD_DIR:=$(BUILD_DIR_BASE)/target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) 
     79  STAGING_DIR:=$(TOPDIR)/staging_dir/target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX) 
     80  BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX) 
     81  TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX) 
    6582  PACKAGE_DIR:=$(BIN_DIR)/packages 
    6683else 
Note: See TracChangeset for help on using the changeset viewer.