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] Totally Fix PR target/10129 ADA bootstrap failure on Darwin


On Sunday, Jul 6, 2003, at 19:56 US/Eastern, Geoff Keating wrote:
This patch looks like the right direction, but it could do with some
cleaning up:

- The comments need to be rechecked.  Some of the old ones are no
  longer right, and the new ones are not formatted properly.  You
  should never say that something is the 'new way' in a comment, since
  it won't be new in 10 years time, and the comment will still be
  around; just say how the existing code works.

I Removed the "New" comment and the static comment because that comment no longer
applies.



- It doesn't remove the FIXME. The FIXME is the underlying cause of these problems. In fact, I think it makes it worse by creating two strings that are modified instead of one. There's no need to allocate the string using GCC if it's only going to be passed directly to printf, you can just use a static variable.

The string returned from machopic_function_base_name now never changes and I
changed machopic_real_function_base_name to machopic_output_function_base_name
taking a FILE* so it never returns anything but just prints out the pic base.



- The objective-C stuff should go.  I think it's no longer used,
  but you'd want to test that.
It is gone from rs6000.c from what I say and I tested an objective-c program to make sure
it does nothing wrong.


- I bet this breaks x86-darwin.

Yes it does, fixed by adding a check in machopic_classify_ident for the PIC base.


- What's with the change to darwin_encode_section_info?

That is part of a different change that is need for Ada to build, I submitted it separately already <http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00171.html>, I will not include it in this updated patch though.


Here is an updated patch which is tested on i686-darwin cross compiler (just running make and making sure it does not ICE on a small test program that accesses global variable). Also bootstrapped on powerpc-apple-darwin6.6.

ChangeLog:

2003-07-07 Andrew Pinski <pinskia@physics.uc.edu>

* config/darwin.c (machopic_function_base_name): Only Return "<pic base>".
(machopic_output_function_base_name): New; print the true pic label.
(machopic_classify_ident): Pic Base is always a defined data.
* config/darwin.h (ASM_OUTPUT_LABELREF): Support the pic base label.
* config/darwin-proto.h (machopic_output_function_base_name): Prototype.


Patch:

Attachment: temp2.diff.txt
Description: Text document




Thanks, Andrew Pinski

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