This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Framework support for darwin
- From: Mike Stump <mrs at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 4 Aug 2003 21:39:34 -0700
- Subject: Framework support for darwin
I've cleaned up support for Frameworks on darwin, and include the patch
below for further comments. It isn't quite done, as it needs a
ChangeLog, but since people may want code moved around a bit before the
dust settles doing them up is almost pointless.
It needs to reviewed by the cppfiles.c people for cleanliness.
Roughly, we add two concepts for cpp, one is a callback to synthesize
up filenames given a base directory and a file (construct), and the
other is a context dependent header lookup mechanism
(context_dependent_header). The code should be clean and not violate
the rules, but, let me know if I missed anything. Docs are missing,
let's first figure out if this is the right approach you would like to
see, after the dust settles on the implementation, I can do up more
docs if you'd like for cpplib. The only other issue is that construct
would need to be initialized to 0 by other users of cpplib. I don't
see a good way around this, and I'm not sure if I need to.
The patch for the C frontend code (shared by all C style languages)
adds the general capability for frameworks directly to the frontend and
allows ports to add system framework search paths, if their system has
such directories. On darwin we do.
On systems that don't have such things, and when -F isn't used, we
carefully avoid using either callback, so as to not impact speed or
semantics. We also add a flag, -F to support naming new framework
directories by the user.
It might have been nice to put all the C frontend code into port files,
but, I didn't see a nice way to get -F in there without it, and
existing code uses -F, so changing it isn't much of an option, plus, by
having it in there this way, we prevent anyone else from absconding
with our option, which would be unfortunate. It might be possible to
put all this into the port file, but, it would require oodles of
callback code, and some of it, like FRAMEWORK and FRAMEWORK_SYSTEM are
non-obvious to me. If people don't want it in the C frontend, then the
questions are, how can we reserved -F to not be used, and is there a
way to organize the chain code that so that the changes to the C
frontend are nice?
Without support for Frameworks, gcc isn't a drop in replacement for the
system compiler, which is unfortunate.
[donning asbestos suit, wait, don't want a lawsuit, donning flack
jacket]
Attachment:
frameworka.diffs
Description: Binary data