Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 1995 00:17:36 -0700 (PDT)
From:      Julian Elischer <julian@ref.tfs.com>
To:        Dirk.Steinberg@gmd.de
Cc:        hackers@FreeBSD.org
Subject:   Re: Patches to compile Kernel and Libraries with '-O3 -fomit-frame-pointer'
Message-ID:  <199504250717.AAA05801@ref.tfs.com>
In-Reply-To: <9504211500.ZM15146@tonic.gmd.de> from "Dirk Steinberg" at Apr 21, 95 05:00:44 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
has anyone followed up on this?

julian
> Hi,
> 
> After some deadly failures I succeeded in compiling and running
> FreeBSD-950417 with maximum gcc optimization: "-O3 -fomit-frame-pointer".
> 
> As for the gcc flags, this is easily accomplished by editing /etc/make.conf
> for the user-level code. For the kernel itself the appropriate line in the
> Makefile
> containing the "COPTFLAGS" definition needs to be adapted.
> 
> Needless to say, for both the kernel and the user-land, this didn't work at
> first:
> 
> /usr/libexec/ld.so fails horribly when compiled with "-fomit-frame-pointer".
> I learned the hard way :-(  (after compiling /bin and /sbin dynamically...).
> 
> For the kernel compile, the functions dummyinit() in in kern/init_main.c
> and dummy_cleanup() in kern/kern_xxx.c get optimized away by gcc
> when compiling with an optimization setting higher than "-O2", e.g.
> "-O3".
> 
> The following patch fixes these problems.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504250717.AAA05801>