Add -mno-library-call to ia32

H . J . Lu
Sat Jun 17 14:11:00 GMT 2000

On Sat, Jun 17, 2000 at 09:18:13PM +0200, Philipp Thomas wrote:
> * H . J . Lu ( [20000617 19:44]:
> > I really like to get the old gcc behavior at least by switch.
> > It is very useful for Linux kernel.
> IMHO this patch should *not* be accepted but instead the kernel should
> either provide non inlined versions of functions where gcc will eventually
> issue libcalls or use -ffreestanding. Let me quote from
> -ffreestanding'
>      Assert that compilation takes place in a freestanding environment.
>      This implies -fno-builtin'.  A freestanding environment is one
>      in which the standard library may not exist, and program startup
>      may not necessarily be at `Main'.  The most obvious example is an
>      OS kernel.  This is equivalent to -fno-hosted'.
> Notice the mentioning of OS kernel ;-) As I already wrote, Linus would
> accept a patch implementing a non inlined memcpy for ia32.

I had non inlined memcpy and memset for ia32 in my kernel. The
problems are kernel modules and module verioning as I have 
mentioned before. Modules in my kernel compiled with gcc 2.96
call memset and memcpy, which have to be exported unversioned.
It is not impossible. But it is much easier to patch one gcc than
patch N kernels.

BTW, I hope I can still compile recent Linux kernels, like 2.2.1x,
with few changes using gcc 2.96. I don't think it is a good idea
to change the gcc behavior without even a way to get back the old


More information about the Gcc-patches mailing list