Added code to determine RPM CPU type for the host OS. This is

needed to determine that on x86-linux, RPM builds "i386" RPMs
while on Sparc/Solaris, it builds "sparc" RPMs.  Since the
buildall script installs the binutils RPM to build the gccnewlib
RPM, it needs to know this.
This commit is contained in:
Joel Sherrill
2000-05-21 15:23:02 +00:00
parent f9c0574793
commit 58271f676d
2 changed files with 20 additions and 2 deletions

View File

@@ -6,6 +6,8 @@
RTEMS_DIR=`dirname $0`
CFG=./setup.cache
dst=@RPM_SPECSdir@
target=@target@
rpm_cpu=@RPM_CPU@
usage()
{
@@ -135,8 +137,8 @@ do
# now build gcc/newlib
# NOTE: This requires having binutils installed and we immediately
# remove it once finished.
base_binutils_rpm=${dst}/../RPMS/i386/rtems-base-binutils-${binutils}-${binutils_rpm_release}.i386.rpm
binutils_rpm=${dst}/../RPMS/i386/${target}-binutils-${binutils}-${binutils_rpm_release}.i386.rpm
base_binutils_rpm=${dst}/../RPMS/${rpm_cpu}/rtems-base-binutils-${binutils}-${binutils_rpm_release}.${rpm_cpu}.rpm
binutils_rpm=${dst}/../RPMS/${rpm_cpu}/${target}-binutils-${binutils}-${binutils_rpm_release}.${rpm_cpu}.rpm
if [ ! -f ${binutils_rpm} ] ; then
echo There is no RPM for binutils for ${target}.
echo Looked for ${binutils_rpm}.

View File

@@ -31,6 +31,21 @@ fi
AC_MSG_RESULT($RPM_SPECSdir)
AC_SUBST(RPM_SPECSdir)
AC_CANONICAL_HOST
AC_MSG_CHECKING(for RPM CPU type)
changequote(,)dnl
case "${host}" in
i[34567]86-*linux*) RPM_CPU=i386 ;;
i[34567]86-pc-cygwin*) RPM_CPU=i386 ;;
sparc-sun-solaris*) RPM_CPU=sparc ;;
*)
AC_MSG_ERROR(RPM CPU for ${target} is unknown)
;;
esac
changequote([,])dnl
AC_MSG_RESULT($RPM_CPU)
GCCNEWLIBVERS="gcc-${gcc_version}-newlib-${newlib_version}"
AC_SUBST(GCCNEWLIBVERS)
BINUTILSVERS="binutils-${binutils_version}"
@@ -40,6 +55,7 @@ AC_SUBST(GDBVERS)
BSPVERS="${rtems_version}"
AC_SUBST(RTEMS_VERSION)
AC_SUBST(BSPVERS)
AC_SUBST(RPM_CPU)
AC_OUTPUT(
Makefile