Changeset 38214


Ignore:
Timestamp:
2013-09-26T19:53:32+02:00 (4 years ago)
Author:
nbd
Message:

build: include the cpu type as part of the toolchain/target directory name

Signed-off-by: Felix Fietkau <nbd@…>

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/target.mk

    r38213 r38214  
    255255         echo 'Target-Depends: $(DEPENDS)'; \ 
    256256         echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \ 
     257         echo 'CPU-Type: $(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))'; \ 
    257258         echo 'Linux-Version: $(LINUX_VERSION)'; \ 
    258259         echo 'Linux-Release: $(LINUX_RELEASE)'; \ 
  • trunk/rules.mk

    r37770 r38214  
    5555HOST_FPIC:=-fPIC 
    5656 
    57 ARCH_SUFFIX:= 
     57ARCH_SUFFIX:=$(call qstrip,$(CONFIG_CPU_TYPE)) 
    5858GCC_ARCH:= 
    5959 
     60ifneq ($(ARCH_SUFFIX),) 
     61  ARCH_SUFFIX:=_$(ARCH_SUFFIX) 
     62endif 
    6063ifneq ($(filter -march=armv%,$(TARGET_OPTIMIZATION)),) 
    61   ARCH_SUFFIX:=_$(patsubst -march=arm%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION))) 
    6264  GCC_ARCH:=$(patsubst -march=%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION))) 
    63 endif 
    64 ifneq ($(filter -mips%r2,$(TARGET_OPTIMIZATION)),) 
    65   ARCH_SUFFIX:=_r2 
    66 endif 
    67 ifneq ($(filter -mdsp,$(TARGET_OPTIMIZATION)),) 
    68   ARCH_SUFFIX:=$(ARCH_SUFFIX)_dsp 
    69 endif 
    70 ifneq ($(filter -mdspr2,$(TARGET_OPTIMIZATION)),) 
    71   ARCH_SUFFIX:=$(ARCH_SUFFIX)_dspr2 
    7265endif 
    7366ifdef CONFIG_HAS_SPE_FPU 
  • trunk/scripts/metadata.pl

    r37679 r38214  
    5454                /^Target-Description:/ and $target->{desc} = get_multiline(*FILE); 
    5555                /^Target-Optimization:\s*(.+)\s*$/ and $target->{cflags} = $1; 
     56                /^CPU-Type:\s*(.+)\s*$/ and $target->{cputype} = $1; 
    5657                /^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1; 
    5758                /^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1; 
     
    373374        } 
    374375        print "\tdefault \"-Os -pipe -funit-at-a-time\"\n"; 
     376        print <<EOF; 
     377 
     378config CPU_TYPE 
     379        string 
     380EOF 
     381        foreach my $target (@target) { 
     382                next if @{$target->{subtargets}} > 0; 
     383                print "\tdefault \"".$target->{cputype}."\" if TARGET_".$target->{conf}."\n"; 
     384        } 
     385        print "\tdefault \"\"\n"; 
    375386 
    376387        my %kver; 
Note: See TracChangeset for help on using the changeset viewer.