This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, target]: use -lobjc-gnu at 64-bit on Darwin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]