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 include config.mak 1 include config.mak
2 include $(SRC_PATH)/rules.mak 2 include $(SRC_PATH)/rules.mak
3 3
  4 +ifndef TARGET_BASE_ARCH
4 TARGET_BASE_ARCH:=$(TARGET_ARCH) 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 endif 6 endif
  7 +
26 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) 8 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
27 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw 9 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
28 CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H 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,6 +2002,7 @@ case &quot;$target_arch2&quot; in
2002 ;; 2002 ;;
2003 x86_64) 2003 x86_64)
2004 echo "TARGET_ARCH=x86_64" >> $config_mak 2004 echo "TARGET_ARCH=x86_64" >> $config_mak
  2005 + echo "TARGET_BASE_ARCH=i386" >> $config_mak
2005 echo "#define TARGET_ARCH \"x86_64\"" >> $config_h 2006 echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
2006 echo "#define TARGET_I386 1" >> $config_h 2007 echo "#define TARGET_I386 1" >> $config_h
2007 echo "#define TARGET_X86_64 1" >> $config_h 2008 echo "#define TARGET_X86_64 1" >> $config_h
@@ -2070,6 +2071,7 @@ case &quot;$target_arch2&quot; in @@ -2070,6 +2071,7 @@ case &quot;$target_arch2&quot; in
2070 ;; 2071 ;;
2071 mipsn32|mipsn32el) 2072 mipsn32|mipsn32el)
2072 echo "TARGET_ARCH=mipsn32" >> $config_mak 2073 echo "TARGET_ARCH=mipsn32" >> $config_mak
  2074 + echo "TARGET_BASE_ARCH=mips" >> $config_mak
2073 echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h 2075 echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h
2074 echo "#define TARGET_MIPS 1" >> $config_h 2076 echo "#define TARGET_MIPS 1" >> $config_h
2075 echo "#define TARGET_ABI_MIPSN32 1" >> $config_h 2077 echo "#define TARGET_ABI_MIPSN32 1" >> $config_h
@@ -2077,6 +2079,7 @@ case &quot;$target_arch2&quot; in @@ -2077,6 +2079,7 @@ case &quot;$target_arch2&quot; in
2077 ;; 2079 ;;
2078 mips64|mips64el) 2080 mips64|mips64el)
2079 echo "TARGET_ARCH=mips64" >> $config_mak 2081 echo "TARGET_ARCH=mips64" >> $config_mak
  2082 + echo "TARGET_BASE_ARCH=mips" >> $config_mak
2080 echo "#define TARGET_ARCH \"mips64\"" >> $config_h 2083 echo "#define TARGET_ARCH \"mips64\"" >> $config_h
2081 echo "#define TARGET_MIPS 1" >> $config_h 2084 echo "#define TARGET_MIPS 1" >> $config_h
2082 echo "#define TARGET_MIPS64 1" >> $config_h 2085 echo "#define TARGET_MIPS64 1" >> $config_h
@@ -2092,6 +2095,7 @@ case &quot;$target_arch2&quot; in @@ -2092,6 +2095,7 @@ case &quot;$target_arch2&quot; in
2092 ;; 2095 ;;
2093 ppcemb) 2096 ppcemb)
2094 echo "TARGET_ARCH=ppcemb" >> $config_mak 2097 echo "TARGET_ARCH=ppcemb" >> $config_mak
  2098 + echo "TARGET_BASE_ARCH=ppc" >> $config_mak
2095 echo "TARGET_ABI_DIR=ppc" >> $config_mak 2099 echo "TARGET_ABI_DIR=ppc" >> $config_mak
2096 echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h 2100 echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
2097 echo "#define TARGET_PPC 1" >> $config_h 2101 echo "#define TARGET_PPC 1" >> $config_h
@@ -2106,6 +2110,7 @@ case &quot;$target_arch2&quot; in @@ -2106,6 +2110,7 @@ case &quot;$target_arch2&quot; in
2106 ;; 2110 ;;
2107 ppc64) 2111 ppc64)
2108 echo "TARGET_ARCH=ppc64" >> $config_mak 2112 echo "TARGET_ARCH=ppc64" >> $config_mak
  2113 + echo "TARGET_BASE_ARCH=ppc" >> $config_mak
2109 echo "TARGET_ABI_DIR=ppc" >> $config_mak 2114 echo "TARGET_ABI_DIR=ppc" >> $config_mak
2110 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h 2115 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
2111 echo "#define TARGET_PPC 1" >> $config_h 2116 echo "#define TARGET_PPC 1" >> $config_h
@@ -2115,6 +2120,7 @@ case &quot;$target_arch2&quot; in @@ -2115,6 +2120,7 @@ case &quot;$target_arch2&quot; in
2115 ;; 2120 ;;
2116 ppc64abi32) 2121 ppc64abi32)
2117 echo "TARGET_ARCH=ppc64" >> $config_mak 2122 echo "TARGET_ARCH=ppc64" >> $config_mak
  2123 + echo "TARGET_BASE_ARCH=ppc" >> $config_mak
2118 echo "TARGET_ABI_DIR=ppc" >> $config_mak 2124 echo "TARGET_ABI_DIR=ppc" >> $config_mak
2119 echo "TARGET_ARCH2=ppc64abi32" >> $config_mak 2125 echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
2120 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h 2126 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
@@ -2140,6 +2146,7 @@ case &quot;$target_arch2&quot; in @@ -2140,6 +2146,7 @@ case &quot;$target_arch2&quot; in
2140 ;; 2146 ;;
2141 sparc64) 2147 sparc64)
2142 echo "TARGET_ARCH=sparc64" >> $config_mak 2148 echo "TARGET_ARCH=sparc64" >> $config_mak
  2149 + echo "TARGET_BASE_ARCH=sparc" >> $config_mak
2143 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h 2150 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
2144 echo "#define TARGET_SPARC 1" >> $config_h 2151 echo "#define TARGET_SPARC 1" >> $config_h
2145 echo "#define TARGET_SPARC64 1" >> $config_h 2152 echo "#define TARGET_SPARC64 1" >> $config_h
@@ -2148,6 +2155,7 @@ case &quot;$target_arch2&quot; in @@ -2148,6 +2155,7 @@ case &quot;$target_arch2&quot; in
2148 ;; 2155 ;;
2149 sparc32plus) 2156 sparc32plus)
2150 echo "TARGET_ARCH=sparc64" >> $config_mak 2157 echo "TARGET_ARCH=sparc64" >> $config_mak
  2158 + echo "TARGET_BASE_ARCH=sparc" >> $config_mak
2151 echo "TARGET_ABI_DIR=sparc" >> $config_mak 2159 echo "TARGET_ABI_DIR=sparc" >> $config_mak
2152 echo "TARGET_ARCH2=sparc32plus" >> $config_mak 2160 echo "TARGET_ARCH2=sparc32plus" >> $config_mak
2153 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h 2161 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h