This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
> not quite ... your code would use "powerpc64" for ppc64 hosts and newer > kernels ... it's just "powerpc" I misread you. This patch should do it then. Thanks for your comments. Jim. -- Jim Lemke jwlemke@wasabisystems.com Orillia, Ontario
--- crosstool.sh-orig 2006-02-25 21:14:13.000000000 -0500
+++ crosstool.sh 2006-04-10 09:55:43.000000000 -0400
@@ -215,7 +215,21 @@ esac
set -ex
-# map TARGET to Linux equivalent
+# Autodetect kernel version from contents of Makefile.
+# Use it to determine correct kernel target.
+KERNEL_VERSION=`awk '/^VERSION =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
+KERNEL_PATCHLEVEL=`awk '/^PATCHLEVEL =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
+KERNEL_SUBLEVEL=`awk '/^SUBLEVEL =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
+ppc=ppc
+ppc64=ppc64
+k_vps=`printf '%u%02u%02u' $KERNEL_VERSION $KERNEL_PATCHLEVEL $KERNEL_SUBLEVEL`
+if test $k_vps -ge 20615; then
+ ppc=powerpc
+ ppc64=powerpc
+fi
+unset KERNEL_SUBLEVEL k_vps
+
+# map TARGET to Linux kernel equivalent
case $TARGET in
alpha*) ARCH=alpha ;;
arm*) ARCH=arm ;;
@@ -226,8 +240,8 @@ case $TARGET in
ia64*) ARCH=ia64 ;;
mips*) ARCH=mips ;;
m68k*) ARCH=m68k ;;
- powerpc64*) ARCH=ppc64 ;;
- powerpc*) ARCH=ppc ;;
+ powerpc64*) ARCH=$ppc64 ;;
+ powerpc*) ARCH=$ppc ;;
ppc*) abort "Target $TARGET incompatible with binutils and gcc regression tests; use target powerpc-* or powerpc64-* instead";;
s390*) ARCH=s390 ;;
sh*) ARCH=sh ;;
@@ -237,6 +251,7 @@ case $TARGET in
x86_64*) ARCH=x86_64 ;;
*) abort "Bad target $TARGET"
esac
+unset ppc ppc64
# Make all paths absolute (it's so confusing otherwise)
# FIXME: this doesn't work well with some automounters
@@ -322,10 +337,6 @@ if test -f .config; then
yes "" | make ARCH=$ARCH oldconfig
fi
-# autodetect kernel version from contents of Makefile
-KERNEL_VERSION=`awk '/^VERSION =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
-KERNEL_PATCHLEVEL=`awk '/^PATCHLEVEL =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
-
case "$KERNEL_VERSION.$KERNEL_PATCHLEVEL.x" in
2.2.x|2.4.x) make ARCH=$ARCH symlinks include/linux/version.h
;;
-- For unsubscribe information see http://sourceware.org/lists.html#faq
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |