Commit 16dbd14f195fe17502eb4d7610ed36c5ad3b1896

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent d80438aa

generate ARCH name instead of coding it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 21 additions and 34 deletions
configure
@@ -1496,78 +1496,65 @@ echo &quot;PTHREADLIBS=$PTHREADLIBS&quot; &gt;&gt; $config_mak @@ -1496,78 +1496,65 @@ echo &quot;PTHREADLIBS=$PTHREADLIBS&quot; &gt;&gt; $config_mak
1496 echo "CLOCKLIBS=$CLOCKLIBS" >> $config_mak 1496 echo "CLOCKLIBS=$CLOCKLIBS" >> $config_mak
1497 case "$cpu" in 1497 case "$cpu" in
1498 i386) 1498 i386)
1499 - echo "ARCH=i386" >> $config_mak  
1500 - echo "#define HOST_I386 1" >> $config_h 1499 + ARCH=i386
1501 ;; 1500 ;;
1502 x86_64) 1501 x86_64)
1503 - echo "ARCH=x86_64" >> $config_mak  
1504 - echo "#define HOST_X86_64 1" >> $config_h 1502 + ARCH=x86_64
1505 ;; 1503 ;;
1506 alpha) 1504 alpha)
1507 - echo "ARCH=alpha" >> $config_mak  
1508 - echo "#define HOST_ALPHA 1" >> $config_h 1505 + ARCH=alpha
1509 ;; 1506 ;;
1510 armv4b) 1507 armv4b)
1511 - echo "ARCH=arm" >> $config_mak  
1512 - echo "#define HOST_ARM 1" >> $config_h 1508 + ARCH=arm
1513 ;; 1509 ;;
1514 armv4l) 1510 armv4l)
1515 - echo "ARCH=arm" >> $config_mak  
1516 - echo "#define HOST_ARM 1" >> $config_h 1511 + ARCH=arm
1517 ;; 1512 ;;
1518 cris) 1513 cris)
1519 - echo "ARCH=cris" >> $config_mak  
1520 - echo "#define HOST_CRIS 1" >> $config_h 1514 + ARCH=cris
1521 ;; 1515 ;;
1522 hppa) 1516 hppa)
1523 - echo "ARCH=hppa" >> $config_mak  
1524 - echo "#define HOST_HPPA 1" >> $config_h 1517 + ARCH=hppa
1525 ;; 1518 ;;
1526 ia64) 1519 ia64)
1527 - echo "ARCH=ia64" >> $config_mak  
1528 - echo "#define HOST_IA64 1" >> $config_h 1520 + ARCH=ia64
1529 ;; 1521 ;;
1530 m68k) 1522 m68k)
1531 - echo "ARCH=m68k" >> $config_mak  
1532 - echo "#define HOST_M68K 1" >> $config_h 1523 + ARCH=m68k
1533 ;; 1524 ;;
1534 microblaze) 1525 microblaze)
1535 - echo "ARCH=microblaze" >> $config_mak  
1536 - echo "#define HOST_MICROBLAZE 1" >> $config_h 1526 + ARCH=microblaze
1537 ;; 1527 ;;
1538 mips) 1528 mips)
1539 - echo "ARCH=mips" >> $config_mak  
1540 - echo "#define HOST_MIPS 1" >> $config_h 1529 + ARCH=mips
1541 ;; 1530 ;;
1542 mips64) 1531 mips64)
1543 - echo "ARCH=mips64" >> $config_mak  
1544 - echo "#define HOST_MIPS64 1" >> $config_h 1532 + ARCH=mips64
1545 ;; 1533 ;;
1546 ppc) 1534 ppc)
1547 - echo "ARCH=ppc" >> $config_mak  
1548 - echo "#define HOST_PPC 1" >> $config_h 1535 + ARCH=ppc
1549 ;; 1536 ;;
1550 ppc64) 1537 ppc64)
1551 - echo "ARCH=ppc64" >> $config_mak  
1552 - echo "#define HOST_PPC64 1" >> $config_h 1538 + ARCH=ppc64
1553 ;; 1539 ;;
1554 s390) 1540 s390)
1555 - echo "ARCH=s390" >> $config_mak  
1556 - echo "#define HOST_S390 1" >> $config_h 1541 + ARCH=s390
1557 ;; 1542 ;;
1558 sparc) 1543 sparc)
1559 - echo "ARCH=sparc" >> $config_mak  
1560 - echo "#define HOST_SPARC 1" >> $config_h 1544 + ARCH=sparc
1561 ;; 1545 ;;
1562 sparc64) 1546 sparc64)
1563 - echo "ARCH=sparc64" >> $config_mak  
1564 - echo "#define HOST_SPARC64 1" >> $config_h 1547 + ARCH=sparc64
1565 ;; 1548 ;;
1566 *) 1549 *)
1567 echo "Unsupported CPU = $cpu" 1550 echo "Unsupported CPU = $cpu"
1568 exit 1 1551 exit 1
1569 ;; 1552 ;;
1570 esac 1553 esac
  1554 +echo "ARCH=$ARCH" >> $config_mak
  1555 +arch_name=`echo $ARCH | tr '[:lower:]' '[:upper:]'`
  1556 +echo "#define HOST_$arch_name 1" >> $config_h
  1557 +
1571 if test "$debug_tcg" = "yes" ; then 1558 if test "$debug_tcg" = "yes" ; then
1572 echo "#define DEBUG_TCG 1" >> $config_h 1559 echo "#define DEBUG_TCG 1" >> $config_h
1573 fi 1560 fi