[M3devel] advise on handling iphone/ARM_DARWIN? (long version)

Jay jay.krell at cornell.edu
Tue May 12 12:32:42 CEST 2009


so..I have an iphone.
(Jail broken but also in use with AT&T as a real phone/computer.)
No Intel Mac yet to do official development on.
I built a C cross compiler on a PPC Mac.
The various directions out there say it'll work on a variety
of platforms but I had not great luck.
 
 
I'm looking through Apple's "gcc-5490" for "Apple local".
There are 11,000+ instances.
Usually/always in begin/end pairs, so 5,500+.
 

Skimming through some of them...lots of stuff to ignore..:   
  some are to enable #pragmas in C/C++ front end    
  some are Objective C specific  
  some are for compatibility with CodeWarrior assembly blocks  
  some are specific to PowerPC, AMD64, etc.    
  lots are specific to ARM -- that is what is of interest  
  some are in the testsuite  
  some are for kernel code  
  some are for "cfstrings" and "pascal strings"  
  some is to adapt for use with their linker  
  some I think is the "driver", which we don't use  
 
 
Ok, so let's just delete some directories (testsuite, doc, ada, cp, doc, libstdc++, libjava, libiberty (not very interesting generally), i386, rs6000,
pa (yes, really, they have changes here), ia64 (yes, really), c-*
(though really, reviewing the i386 and rs6000 directories, could be some
important fixes?))
 

That gets it down to around 4,000.

 
Anyone have any suggestions for what to do?
 
 
I'm not even sure what the gcc base is for this stuff.
I think it is 4.0.1, judging from the changelog.
 

Maybe we should import their code into cvs and apply our patches?
I know it'd really bloat up our tree, but I think it might
be one of the better options.
We could prune it down heavily as indicated, just striving
for enough to target ARM_DARWIN, or maybe *_DARWIN, but
still dropping the other front-ends for example.
 

Note that this isn't even the toolset I built.
That is something else. I think maybe llvm based.

 
Btw, gcc has a "plugin" interface now.
I don't know what all it can do.
But I wonder..this might be an avenue that helps us, at least
where cc=gcc (ie: where gcc is already available).
 
 
On the other hand, I'm still very tempted by a C-generating backend,
for greater portability..
 
 
 
 - Jay


More information about the M3devel mailing list