forked from Imagelibrary/rtems
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:
@@ -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}.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user