summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-05-21 15:23:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-05-21 15:23:02 +0000
commit58271f676d4e7a8effe597389f0a2bc1ae7eafa0 (patch)
tree7f0f05f7888b0ec2d0038eae4917b8aa3e9b057e /scripts
parentThis is an update of all Classic API Message Manager tests to (diff)
downloadrtems-58271f676d4e7a8effe597389f0a2bc1ae7eafa0.tar.bz2
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildall.in6
-rw-r--r--scripts/configure.in16
2 files changed, 20 insertions, 2 deletions
diff --git a/scripts/buildall.in b/scripts/buildall.in
index 79cdb53b1e..e2221043b9 100755
--- a/scripts/buildall.in
+++ b/scripts/buildall.in
@@ -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}.
diff --git a/scripts/configure.in b/scripts/configure.in
index 296939a60a..4d76547e37 100644
--- a/scripts/configure.in
+++ b/scripts/configure.in
@@ -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