[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rtems and coldfire: cannot build tools



Benjamin Herrenschmidt wrote:

> On Thu, Feb 11, 1999, Ralf Corsepius <corsepiu at faw.uni-ulm.de> wrote:
>
> >> I'll try to investigate more. I'm not really a unix-guru (I don't know
> >> 1/10 of the shell and makefile commands), but I do know about kernels and
> >> low-level things (I will probably be able to work with rtems provided
> >> that I manage to build the tools ;-)
> >
> >I have to repeat my question, which OS do you use?
>
> Sorry.
>
> So the machine is a PowerMac running an "special" version of glibc (1.99,
> I didn't update all my stuff to the new glibs 2.1 yet).
>

Ok, thanks a lot, it's linux, that's what I wanted to know (Running linux on
PowerMac isn't  obvious, at least for me)

>
> The kernel is a 2.2.0pre4 (from vger), this machine has a quite good
> uptime, si I didn't update to 2.2.1 yet.

Then you probably suffer from the same problems as I do
(i686/linux-2.2.1/glibc2.0pre7+bugfixes).

The cause for this problem is "rmdir" behaving different on linux versions
2.1.X/2.2.X than egcs/gcc/fixincludes requires.

You can easily check if you are affected by the problem:

mkdir <somedir>
cd <somedir>
rmdir .

Under linux-2.1.X/2.2X the rmdir command above succeeds, under other OSes this
gives an error.

This causes fixincludes not to work properly for cross-building egcs, because
fixincludes requires "rmdir ."to fail to work properly.

>
> The distrib is based on a RedHat, I beleive it's a 5.0.
>
> bash is 1.14.76b

This explains why my patch failed to work (bash 1.14.X is pretty old), OTOH it
revealed a portabilty bug in the patch (;-).

Ralf.

PS.: Joel, below is a corrected version of the egcs-fixincludes-patch. Though
it's a one-liner, you should consider this to be reason enough to release a new
version of RTEMS-4.0.0 egcs-patches (linux-2.2.X is officially out and more and
more people will probably be affected by this bug).

--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de           FAX: +49/731/501-999
http://www.faw.uni-ulm.de


-------------- next part --------------
--- egcs-1.1b.orig/gcc/fixincludes	Thu Sep  3 01:39:06 1998
+++ egcs-1.1b/gcc/fixincludes	Thu Oct 15 11:30:43 1998
@@ -3123,7 +3123,7 @@
 cd $LIB
 files=`find . -type d -print | sort -r`
 for file in $files; do
-  rmdir $LIB/$file > /dev/null 2>&1
+  test x"$file" = x"." || rmdir $LIB/$file > /dev/null 2>&1
 done