Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
toolwhip (Mac OS X cross-compiler) on Gentoo with newer GCC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Tatsh
Apprentice
Apprentice


Joined: 22 Jul 2007
Posts: 178

PostPosted: Mon Aug 22, 2011 2:10 pm    Post subject: toolwhip (Mac OS X cross-compiler) on Gentoo with newer GCC Reply with quote

Has anyone tried this?

http://code.google.com/p/toolwhip/

Google is apparently using it to better automate building for Mac OS X without the need for Macs to be present.

I get as far as building ld64 properly (after some simple patching) and then gcc fails to build because ranlib/libtool crashes:
http://code.google.com/p/toolwhip/issues/detail?id=10 (I'm not the only one)

I tried solving the issue (details in the bug report), spent a few hours with it but nothing useful yet.

Can anyone actually build this thing in newer GCC? According to the bug report, that person was able to solve it by building with GCC 4.1. After finally merging 4.1 (there seem to be some lingering issues regarding -march primarily), I compiled cctools and ld64 again but still no go on GCC at the exact same point as shown in the bug report.

If you want to build ld64 you need to:
#include <stdio.h> in ld64/src/Options.h (I put it after stdint.h)

ld64/src/MachOReaderRelocatable.hpp:
Move the class definition of BaseAtom above this line:

Code:

template <typename A>
 Reference<A>::Reference(Kinds kind, const AtomAndOffset& at, const AtomAndOffset& toTarget)
  : fFixUpOffsetInSrc(at.offset), fToTarget(toTarget), fToTargetName(NULL), fFromTargetName(NULL),


Then there are a few places to place the word typename before mach_o::relocatable::Reader<ppc>::Reader-like patterns:

Code:
+                               return this->addObject(new typename mach_o::relocatable::Reader<ppc>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);


grep for return\ this->addObject\(new and similar.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum