Arla on Linux/Alpha

Assar Westerlund assar at stacken.kth.se
Thu Aug 5 13:49:34 CEST 1999


Chris Wing <wingc at engin.umich.edu> writes:
> Hi. I recently installed Linux on an Alpha system and thought I would try
> out Arla. I am pleased to note that Arla is working quite flawlessly on
> the Alpha so far!

Great.

> There were a few compiler warnings about casting between pointers and ints
> of different size; none look dangerous and I'll go over them in a future
> e-mail to the list.

Yes, I think we went through them at a point and figured that they
should be fixed but they weren't fatal.

> I'm using Red Hat Linux 6.0 on the Alpha, in other words, Linux 2.2.5.
> Apparently, Linux (2.2?) on the Alpha uses register 8 to store the current
> task pointer, which necessitates using -ffixed-8 when compiling all kernel
> code; the following quick hack was needed to get xfs to compile:

Yes, we also had some problems with this.  If I recall correctly it
was the case that we included <asm/current.h> rather late and then gcc
had already started using register 8 for something else and only then
was told that that register was special.  But what Magnus did to solve
that was just moving <asm/current.h> earlier.  See
xfs/linux/xfs/xfs_locl.h:1.30.  (And that fix should be in 0.26).  But
it seems to still give problems, so I moved it up a little bit more.

Index: xfs/linux/xfs/xfs_locl.h
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/linux/xfs/xfs_locl.h,v
retrieving revision 1.31
diff -u -w -u -w -r1.31 xfs_locl.h
--- xfs_locl.h	1999/07/19 20:48:51	1.31
+++ xfs_locl.h	1999/08/05 11:41:46
@@ -43,6 +43,9 @@
 #include <config.h>
 #endif
 
+#ifdef HAVE_ASM_CURRENT_H
+#include <asm/current.h>
+#endif
 #include <linux/config.h>
 #ifdef CONFIG_MODVERSIONS
 #define MODVERSIONS
@@ -53,9 +56,6 @@
 #include <linux/version.h>
 #include <linux/module.h>
 #include <linux/errno.h>
-#ifdef HAVE_ASM_CURRENT_H
-#include <asm/current.h>
-#endif
 #include <linux/fs.h>
 #include <linux/malloc.h>
 #include <linux/sched.h>

> (obviously, this should be put into autoconf so that configure adds
> -ffixed-8 to CFLAGS for xfs, when compiling on Linux/Alpha-- but I haven't
> done that yet, sorry...)

Try the appended patch:

/assar

Index: configure.in
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/configure.in,v
retrieving revision 1.297
diff -u -w -u -w -r1.297 configure.in
--- configure.in	1999/08/02 02:25:30	1.297
+++ configure.in	1999/08/05 11:44:59
@@ -305,6 +305,10 @@
      AC_MSG_RESULT(yes)
   fi
   KERNEL_CFLAGS="-DMODULE -D__KERNEL__ $smp"
+  case "$target_cpu" in
+  alpha*)
+    KERNEL_CFLAGS="$KERNEL_CFLAGS -ffixed-8" ;;
+  esac
   test_KERNEL_CFLAGS=$KERNEL_CFLAGS
   XFS_SUBDIR=linux
   KERNEL=/dev/null





More information about the Arla-drinkers mailing list