This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, target]: use -lobjc-gnu at 64-bit on Darwin
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, geoffk at apple dot com, mrs at apple dot com
- Date: Sun, 08 Oct 2006 16:54:11 -0700
- Subject: Re: [Patch, target]: use -lobjc-gnu at 64-bit on Darwin
- References: <20061008234512.93F951000D@bromo.msbb.uc.edu>
On Sun, 2006-10-08 at 19:45 -0400, Jack Howarth wrote:
> The proposed patch causes libobjc-gnu to be automatically used
> on Darwin at 64-bit since no 64-bit system objc runtime exists
> in any currently shipping version of MacOS X. It would have been
> better to do this conditionally with something like...
>
> %{m64:%:version-compare(< 10.5 mmacosx-version-min= %{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)})}\
>
> but the current version-compare only takes simple strings as its
> third argument. Okay for gcc trunk?
This is only part of the story, you need also to patch config/darwin.h
(and c-common) to change how NEXT_OBJC_RUNTIME is defined so you get the
front-end defaulting to the GNU runtime.
>From c-common.c:
#ifdef NEXT_OBJC_RUNTIME
int flag_next_runtime = 1;
#else
int flag_next_runtime = 0;
#endif
In fact you have to a lot more changes.
-- Pinski