This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to define __PIC__ for darwin
> > FYI, I posted a patch in 2004 to fix PRs 6123 and 18382 here:
> > http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00168.html
> >
> > I updated PR 18382 to note this.
> >
> > It would need a global write maintainer to approve it. Would anyone
> > care to preapprove the patch? If so, I'll update it for mainline and
> > add docs plus a testcase.
>
> The problem is that David's objections are still valid. I've got the
> same problem on mips as well.
> -eric
At the time I wrote the patch, (really, just checking the 3.4 sources)
mips-linux unconditionally defined -Dpic/-DPIC. Now that's dependent
on TARGET_ABICALLS in mips/linux.h on mainline, but flag_pic is (and
was) set in mips.c:override_options() depending on TARGET_ABICALLS.
So under the hood, mips-linux appears to coordinate flag_pic and the
macro definitions even more closely than last year when I wrote the
patch. I'm not sure why you consider mips-linux problematic. Instead
of both flag_pic and -Dpic depending on TARGET_ABICALLS, we'll have
flag_pic depending on TARGET_ABICALLS and -Dpic downstream depending
on flag_pic. I believe the end result would be the same from the
user's perspective.
Also, my undestanding is that David's concern about ppc-linux was
addressed by Alan in the thread. See:
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00373.html
Ultimately, I can special-case whatever platforms don't conform. But
the default should be coordinated unless there is a good reason not
to.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu