This is the mail archive of the 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: gcc corrections for better pie support

What with all the comments about procedure, I've kind-of lost track of
this thread.  At the risk of repeating what's already been suggested..

"Peter S. Mazinger" <> writes:
> diff -urN gcc.old/gcc/config/mips/linux.h gcc/gcc/config/mips/linux.h
> --- gcc.old/gcc/config/mips/linux.h	Wed Sep  8 02:17:15 2004
> +++ gcc/gcc/config/mips/linux.h	Mon Nov  8 11:04:47 2004
> @@ -97,9 +97,7 @@
>  #define SUBTARGET_CPP_SPEC "\
> -%{fno-PIC:-U__PIC__ -U__pic__} %{fno-pic:-U__PIC__ -U__pic__} \
> -%{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} \
> -%{pthread:-D_REENTRANT}"
> +%{fno-PIC|fno-pic:-U__PIC__ -U__pic__} %{pthread:-D_REENTRANT}"
>  /* From iris5.h */
>  /* -G is incompatible with -KPIC which is the default, so only allow objects

I think you should just remove all the PIC stuff from SUBTARGET_CPP_SPEC
and guard the builtin_defines in linux.h with flag_shlib instead.

> @@ -123,7 +121,7 @@
>  #define SUBTARGET_ASM_SPEC "\
>  %{mabi=64: -64} \
>  %{!fno-PIC:%{!fno-pic:-KPIC}} \
> -%{fno-PIC:-non_shared} %{fno-pic:-non_shared}"
> +%{fno-PIC|fno-pic:-non_shared}"

If this is causing trouble, you should be able to get rid of all the
PIC stuff here too.  GAS assumes -non_shared by default and GCC uses
.abicalls if it wants -KPIC.


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