Re: Bug#79180: mtools doesn't work on Debian/ARM 2.2r2
On Sat, 9 Dec 2000, Reuben Thomas wrote:
> Package: mtools
> Version: 3.9.6-3.1
>
> On my ARM system (Acorn RISC PC, StrongARM, kernel 2.2.16-rmk3, libc
> 2.1.3-13), issuing a command such as "mcopy" or "mdir" gives the error:
>
> Mtools has not been correctly compiled
> Recompile it using a more recent compiler
>
> This message appears to be bogus; what is most likely is that it is a
> structure packing error. Philip Blundell, who has worked on ARM Linux a lot,
> says:
>
> This is a structure packing problem of some kind. I imagine building with
> -mstructure-size-boundary=8, or adding strategic "__attribute__ ((packed))"
> directives, should fix it.
>...
I tried to fix the unstable version of mtools (on debussy). It seems the
following patch solved the problem:
--- mtools-3.9.7+20001126.orig/configure.in
+++ mtools-3.9.7+20001126/configure.in
@@ -286,6 +286,15 @@
fi
if [ "$host_os3" = linux ] ; then
CFLAGS="$CFLAGS -fno-strength-reduce"
+ if [ "$host_cpu" = armv4l ] ; then
+ CFLAGS="$CFLAGS -mstructure-size-boundary=8"
+ fi
+ fi
+ if [ "$host_os3" = linux_gnu ] ; then
+ CFLAGS="$CFLAGS -fno-strength-reduce"
+ if [ "$host_cpu" = armv4l ] ; then
+ CFLAGS="$CFLAGS -mstructure-size-boundary=8"
+ fi
fi
if [ "$host_os3" = aux ] ; then
CFLAGS="$CFLAGS -ZP"
@@ -308,6 +317,10 @@
if [ $host_vendor = linux ] ; then
+ LDFLAGS="$LDFLAGS -z"
+fi
+
+if [ $host_vendor = linux_gnu ] ; then
LDFLAGS="$LDFLAGS -z"
fi
I have some questions:
1. Are the Linux/arm machines all called "armv4l"?
2. Why does config.guess report *-linux-gnu instead of *-linux ?
3. Is this patch all right?
Sorry if these questions are perhaps FAQs, but I'm only a package
maintainer that has no knowledge about the specialities of the ARM port.
cu,
Adrian
--
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
-- Mahatma Ghandi
Reply to: