Add super-H arch support (rhbz#432496)
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 4 Mar 2008 06:16:02 +0000 (08:16 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 4 Mar 2008 06:16:02 +0000 (08:16 +0200)
Patch from Masaki Chikama

configure.ac
installplatform
rpmrc.in

index f52bd34..71072cb 100644 (file)
@@ -1007,6 +1007,8 @@ arm*)             RPMCANONCOLOR=0; RPMCANONARCH=arm ;;
 mipsel*)       RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
 mips*)         RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
 m68k*)         RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
+sh3*)          RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;;
+sh4*)          RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;;
 *)             RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
 esac
 case "${host_os_noversion}" in
index dd3c6f9..de458a7 100755 (executable)
@@ -21,7 +21,7 @@ E_O_F
 
 RPM="./rpm --rcfile=$TEMPRC --macros=$MACROS"
 
-canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_;s,\(ia32e\|amd64\),x86_64,'
+canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_;s,\(ia32e\|amd64\),x86_64,;s_sh4a_sh4_'
 arch="`$RPM --eval '%{_arch}'|sed -e "$canonarch_sed"`"
 VENDOR="`$RPM --eval '%{_vendor}'`"
 OS="`$RPM --eval '%{_os}'`"
@@ -33,6 +33,7 @@ case "$arch" in
   i[3456]86|pentium[34]|athlon|geode) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_ s_i386_geode_' ;;
   alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
   arm*) SUBSTS='s_arm_armv3l_ s_arm_armv4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_' ;;
+  sh4*) SUBSTS='s_sh4_sh4_ s_sh4_sh4a_' ;;
   sparc*) SUBSTS='s_sparc\(64\|64v\|v9v\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
   powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
   s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;;
index e3ac84e..8432d86 100644 (file)
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -77,6 +77,10 @@ optflags: hades -O2 -g -fomit-frame-pointer
 optflags: s390 -O2 -g
 optflags: s390x -O2 -g
 
+optflags: sh3 -O2 -g
+optflags: sh4 -O2 -g
+optflags: sh4a -O2 -g
+
 #############################################################
 # Canonical arch names and numbers
 
@@ -153,6 +157,9 @@ arch_canon:    ppc64pseries: ppc64pseries  16
 arch_canon:    ppc64iseries: ppc64iseries  16
 
 arch_canon:    sh: sh          17
+arch_canon:    sh3: sh3        17
+arch_canon:    sh4: sh4        17
+arch_canon:    sh4a: sh4a      17
 arch_canon:    xtensa: xtensa  18
 
 #############################################################
@@ -256,6 +263,10 @@ buildarchtranslate: x86_64: x86_64
 buildarchtranslate: amd64: x86_64
 buildarchtranslate: ia32e: x86_64
 
+buildarchtranslate: sh3: sh3
+buildarchtranslate: sh4: sh4
+buildarchtranslate: sh4a: sh4
+
 #############################################################
 # Architecture compatibility
 
@@ -340,6 +351,10 @@ arch_compat: x86_64: amd64 athlon noarch
 arch_compat: amd64: x86_64 athlon noarch
 arch_compat: ia32e: x86_64 athlon noarch
 
+arch_compat: sh3: noarch
+arch_compat: sh4: noarch
+arch_compat: sh4a: sh4
+
 os_compat:   IRIX64: IRIX
 os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6
 os_compat: solaris2.6: solaris2.3 solaris2.4 solaris2.5
@@ -444,5 +459,9 @@ buildarch_compat: x86_64: noarch
 buildarch_compat: amd64: x86_64
 buildarch_compat: ia32e: x86_64
 
+buildarch_compat: sh3: noarch
+buildarch_compat: sh4: noarch
+buildarch_compat: sh4a: sh4
+
 # \endverbatim
 #*/