This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Darwin / Mac OS X native support
"Joseph S. Myers" wrote:
>
> On Thu, 1 Mar 2001, Stan Shebs wrote:
>
> > Although the patch is large, it's already been stripped down to the
> > minimum that still works, there are only a couple changes to generic
> > code (a new macro in varasm.c), and the generic rs6000.* changes are
>
> Where is the documentation for this new macro?
Not written yet - I wanted to be sure that the new macro was an
acceptable approach first.
> > + /* wchar_t is int. */
> > +
> > + #undef WCHAR_TYPE
> > + #define WCHAR_TYPE "int"
> > + #undef WCHAR_TYPE_SIZE
> > + #define WCHAR_TYPE_SIZE 32
>
> Is the GCC default of "unsigned int" correct for wint_t? If not, you
> should define WINT_TYPE as well.
OK thanks, I didn't know that.
> > + #undef CPP_SPEC
> > + #define CPP_SPEC "%{!traditional: -D__STDC__} \
> > + %{mdisable-fpregs:-D__NO_FP__} \
> > + %{F*} %{ansi} %{fno-asm} %{header-mapfile} \
> > + -D__APPLE_CC__=" STRINGIFY(APPLE_CC) " \
> > + %{static:-D__STATIC__}%{!static:-D__DYNAMIC__}\
> > + %{MD:-MD %M} %{MMD:-MMD %M}"
>
> I don't understand exactly what should go in which cpp specs, but are you
> sure that handling of -traditional and -MD belong here when they're
> already handled in a target-independent manner?
Actually, I'm not sure. I'll check on it. Some of the flags (like
-F for frameworks) are only interesting in connection with future
patches, technically should not be part of this patch.
> > + %{dynamiclib:/usr/bin/libtool -arch_only ppc %{!all_load:-noall_load} %J \
> > + %{current_version:}%{compatibility_version:}%{init*}} \
> > + %{!dynamiclib:/usr/bin/ld -arch ppc %{@:-arch_multiple}} \
>
> You seem to be adding various options in specs such as -dynamiclib. These
> should be documented. While many existing targets have such undocumented
> options, they shouldn't be allowed in for new targets.
Hmm, good point. The GCC manual doesn't seem to have a good place
to document compiler flags that only tie into particular systems'
linkers, but I'm open to suggestions. I could write a Darwin section
for chapter 2, or even add a new chapter a la the VMS info.
Stan