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 installed] PRs 6123 & 18382, centralize defining __PIC__/__pic__


On Mon, Nov 21, 2005 at 10:24:31PM -0500, Kaveh R. Ghazi wrote:
> 
> As per:
> http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00775.html
> I've installed my fix for these PRs.  Updated patch below which I
> retested with mainline on x86_64-unknown-linux-gnu.

  Sorry for being that late.

> diff -rup orig/egcc-SVN20051120/gcc/c-cppbuiltin.c egcc-SVN20051120/gcc/c-cppbuiltin.c
> --- orig/egcc-SVN20051120/gcc/c-cppbuiltin.c	2005-11-03 10:40:14.000000000 -0500
> +++ egcc-SVN20051120/gcc/c-cppbuiltin.c	2005-11-21 15:36:08.000000000 -0500
> @@ -419,6 +419,11 @@ c_cpp_builtins (cpp_reader *pfile)
>      cpp_define (pfile, "__FINITE_MATH_ONLY__=1");
>    else
>      cpp_define (pfile, "__FINITE_MATH_ONLY__=0");
> +  if (flag_pic)
> +    {
> +      builtin_define_with_int_value ("__pic__", flag_pic);
> +      builtin_define_with_int_value ("__PIC__", flag_pic);
> +    }
>  
>    if (flag_iso)
>      cpp_define (pfile, "__STRICT_ANSI__");

  I know that most/all ports did it that way. Still, if a port would like
  todo it differently, then its impossible with this implementation. What
  about moving that hunk into a TARGET_XXX_CPP_DEFINE with this as default
  value? That would allow a port to override/change the behaviour for this
  define.

  Gunther


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