From owner-freebsd-hackers Tue Apr 25 00:17:44 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA17187 for hackers-outgoing; Tue, 25 Apr 1995 00:17:44 -0700 Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id AAA17181 for ; Tue, 25 Apr 1995 00:17:43 -0700 Received: (from julian@localhost) by ref.tfs.com (8.6.8/8.6.6) id AAA05801; Tue, 25 Apr 1995 00:17:36 -0700 From: Julian Elischer Message-Id: <199504250717.AAA05801@ref.tfs.com> Subject: Re: Patches to compile Kernel and Libraries with '-O3 -fomit-frame-pointer' To: Dirk.Steinberg@gmd.de Date: Tue, 25 Apr 1995 00:17:36 -0700 (PDT) Cc: hackers@FreeBSD.org In-Reply-To: <9504211500.ZM15146@tonic.gmd.de> from "Dirk Steinberg" at Apr 21, 95 05:00:44 pm Content-Type: text Content-Length: 946 Sender: hackers-owner@FreeBSD.org Precedence: bulk > 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.