lkml.org 
[lkml]   [1999]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible GCC contamination of Linux
On Wed, 22 Sep 1999, Horst von Brand wrote:

> "Richard B. Johnson" <root@chaos.analogic.com> said:
> > On Wed, 22 Sep 1999, Artur Skawina wrote:
> > > Kurt Garloff wrote:
> > > > a patch which adds -fno-builtins to the Makefile and makes the abs() work.
>
> > > why?
>
> > So you can compile a i386 or i486 kernel with a 'C' compiler that was
> > built on a i686 machine. It took me a week to find the reason why
> > a kernel, configured to run on a 486 (or even 386) would crash on
> > the boot of a 486.
>
> If the compiler gives you i686 instructions for a i486 target that you
> correctly specified, then the compiler is broken, pure and simple. Are you
> sure the Makefiles do set the target right? What gcc version are you using?
> Did you report the problem to the egcs folks?
> --

I've been through this too many times already. The makefile is set up
right, the .config is set up right. I have used three versions of
the gcc compiler, never egcs.

gcc 2.7.2, gcc 2.7.3, and gcc 2.8.1

Compilers built on i486 machines build code that boots on an i486 with
no FPU.

Compilers built on my i686 machine build code that crashes right after
"Booting kernel..", after the uncompress.

This was traced to built-ins (read libgcc.a) being linked with the
kernel. If the makefile specifies -fno-builtins, the kernel will boot.

The only built-in I found in use, found only as an undefined symbol
during link, was abs(). There may be other built-ins in use, but
are resolved by kernel code once the -fno-builtins is put on the
command-line.

My suggestion was to not use any built-ins in the kernel. In other
words, if the kernel requires code it should be generated by kernel
source, not C-compiler source.


Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [from the cache]
©2003-2011 Jasper Spaans