This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC/PATCH] Make -fpic and -fPIC on powerpc-Darwin and x86-Darwin to act the same
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Mike Stump <mrs at apple dot com>
- Cc: gcc-patches Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 Feb 2006 19:30:27 -0500
- Subject: Re: [RFC/PATCH] Make -fpic and -fPIC on powerpc-Darwin and x86-Darwin to act the same
- References: <e2be672ec755f64b71f43b2b48251f4d@physics.uc.edu> <6160C43A-3996-479E-869F-2326A53715C1@apple.com>
On Jan 30, 2006, at 3:19 PM, Mike Stump wrote:
On Jan 29, 2006, at 8:00 AM, Andrew Pinski wrote:
OK?
Almost. If I read it right, your change alters the behavior.
Instead, I think:
--- config/darwin.h (revision 110327)
+++ config/darwin.h (working copy)
@@ -708,8 +708,8 @@ enum machopic_addr_class {
#define MACHO_DYNAMIC_NO_PIC_P (TARGET_DYNAMIC_NO_PIC)
#define MACHOPIC_INDIRECT (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
-#define MACHOPIC_JUST_INDIRECT (flag_pic == 1 ||
MACHO_DYNAMIC_NO_PIC_P)
-#define MACHOPIC_PURE (flag_pic == 2 && ! MACHO_DYNAMIC_NO_PIC_P)
+#define MACHOPIC_JUST_INDIRECT (MACHO_DYNAMIC_NO_PIC_P)
+#define MACHOPIC_PURE (flag_pic && ! MACHO_DYNAMIC_NO_PIC_P)
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
Preserves the existing behavior, right?
If you agree, ok with the above edit. If you think the altered
behavior is better, let me know. As for why this is so, see:
I will apply this after one more bootstrap on powerpc-darwin.
This does bootstrap and tested just fine yesterday and a couple
days again.
Thanks,
Andrew Pinski