This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: objc runtime: cannot find class Object
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: objc runtime: cannot find class Object
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 15 Jun 1999 01:02:37 -0600
- cc: egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199906142129.RAA11559@hiauly1.hia.nrc.ca>you write:
> Another solution is to change the Makefile to compile init.c with
> -fno-inline-functions, or possibly -fkeep-inline-functions. This
> prevents the static function __objc_force_linking from being inlined
> and eliminated at -O3 optimisation.
Err, it can't be __objc_force_linking that's being inlined because it is
self-recursive. We don't inline self recursive functions last I checked.
It is more likely the case that we deferred output of the function because
of automatic inlining, then found out it was never referenced, so the function
was never output.
If that is the case, then an easy solution is to put a reference to the
function in another function or variable that is *always* output. For
example, storing the function's address into a global (non-static variable).
Or just don't compile the target libraries with -O3 at all. Generally I'd
prefer to see folks stick with -O2 -g instead of having everyone using their
own wild and fun CFLAGS which makes problem reproduction a *(&@#$ nightmare.
jeff