Commit 0ba99fc6a188988f11361cb41eba7c1afce346d4

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent 3b47612b

configure already knows what TARGET_BASE_ARCH we need, no need to put the logic in Makefile.target

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 2 changed files with 10 additions and 20 deletions
Makefile.target
1 1 include config.mak
2 2 include $(SRC_PATH)/rules.mak
3 3  
  4 +ifndef TARGET_BASE_ARCH
4 5 TARGET_BASE_ARCH:=$(TARGET_ARCH)
5   -ifeq ($(TARGET_ARCH), x86_64)
6   -TARGET_BASE_ARCH:=i386
7   -endif
8   -ifeq ($(TARGET_ARCH), mipsn32)
9   -TARGET_BASE_ARCH:=mips
10   -endif
11   -ifeq ($(TARGET_ARCH), mips64)
12   -TARGET_BASE_ARCH:=mips
13   -endif
14   -ifeq ($(TARGET_ARCH), ppc64)
15   -TARGET_BASE_ARCH:=ppc
16   -endif
17   -ifeq ($(TARGET_ARCH), ppc64h)
18   -TARGET_BASE_ARCH:=ppc
19   -endif
20   -ifeq ($(TARGET_ARCH), ppcemb)
21   -TARGET_BASE_ARCH:=ppc
22   -endif
23   -ifeq ($(TARGET_ARCH), sparc64)
24   -TARGET_BASE_ARCH:=sparc
25 6 endif
  7 +
26 8 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
27 9 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
28 10 CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
... ...
configure
... ... @@ -2002,6 +2002,7 @@ case &quot;$target_arch2&quot; in
2002 2002 ;;
2003 2003 x86_64)
2004 2004 echo "TARGET_ARCH=x86_64" >> $config_mak
  2005 + echo "TARGET_BASE_ARCH=i386" >> $config_mak
2005 2006 echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
2006 2007 echo "#define TARGET_I386 1" >> $config_h
2007 2008 echo "#define TARGET_X86_64 1" >> $config_h
... ... @@ -2070,6 +2071,7 @@ case &quot;$target_arch2&quot; in
2070 2071 ;;
2071 2072 mipsn32|mipsn32el)
2072 2073 echo "TARGET_ARCH=mipsn32" >> $config_mak
  2074 + echo "TARGET_BASE_ARCH=mips" >> $config_mak
2073 2075 echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h
2074 2076 echo "#define TARGET_MIPS 1" >> $config_h
2075 2077 echo "#define TARGET_ABI_MIPSN32 1" >> $config_h
... ... @@ -2077,6 +2079,7 @@ case &quot;$target_arch2&quot; in
2077 2079 ;;
2078 2080 mips64|mips64el)
2079 2081 echo "TARGET_ARCH=mips64" >> $config_mak
  2082 + echo "TARGET_BASE_ARCH=mips" >> $config_mak
2080 2083 echo "#define TARGET_ARCH \"mips64\"" >> $config_h
2081 2084 echo "#define TARGET_MIPS 1" >> $config_h
2082 2085 echo "#define TARGET_MIPS64 1" >> $config_h
... ... @@ -2092,6 +2095,7 @@ case &quot;$target_arch2&quot; in
2092 2095 ;;
2093 2096 ppcemb)
2094 2097 echo "TARGET_ARCH=ppcemb" >> $config_mak
  2098 + echo "TARGET_BASE_ARCH=ppc" >> $config_mak
2095 2099 echo "TARGET_ABI_DIR=ppc" >> $config_mak
2096 2100 echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
2097 2101 echo "#define TARGET_PPC 1" >> $config_h
... ... @@ -2106,6 +2110,7 @@ case &quot;$target_arch2&quot; in
2106 2110 ;;
2107 2111 ppc64)
2108 2112 echo "TARGET_ARCH=ppc64" >> $config_mak
  2113 + echo "TARGET_BASE_ARCH=ppc" >> $config_mak
2109 2114 echo "TARGET_ABI_DIR=ppc" >> $config_mak
2110 2115 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
2111 2116 echo "#define TARGET_PPC 1" >> $config_h
... ... @@ -2115,6 +2120,7 @@ case &quot;$target_arch2&quot; in
2115 2120 ;;
2116 2121 ppc64abi32)
2117 2122 echo "TARGET_ARCH=ppc64" >> $config_mak
  2123 + echo "TARGET_BASE_ARCH=ppc" >> $config_mak
2118 2124 echo "TARGET_ABI_DIR=ppc" >> $config_mak
2119 2125 echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
2120 2126 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
... ... @@ -2140,6 +2146,7 @@ case &quot;$target_arch2&quot; in
2140 2146 ;;
2141 2147 sparc64)
2142 2148 echo "TARGET_ARCH=sparc64" >> $config_mak
  2149 + echo "TARGET_BASE_ARCH=sparc" >> $config_mak
2143 2150 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
2144 2151 echo "#define TARGET_SPARC 1" >> $config_h
2145 2152 echo "#define TARGET_SPARC64 1" >> $config_h
... ... @@ -2148,6 +2155,7 @@ case &quot;$target_arch2&quot; in
2148 2155 ;;
2149 2156 sparc32plus)
2150 2157 echo "TARGET_ARCH=sparc64" >> $config_mak
  2158 + echo "TARGET_BASE_ARCH=sparc" >> $config_mak
2151 2159 echo "TARGET_ABI_DIR=sparc" >> $config_mak
2152 2160 echo "TARGET_ARCH2=sparc32plus" >> $config_mak
2153 2161 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
... ...