From: Bruce J. <bru...@go...> - 2012-05-25 08:45:06
|
Hi Arno I understand, but what I wish to do is to use the xmlvm target=posix to produce a collection of C sources that I can then compile as a library for the iPhone. I do not wish to create an iphone project in Xcode, just the raw C which I can turn into a library. To do this, I need the GC library also for iPhone. The configure script is fine if you wish to create a GC library that will run on the host, but it doesn't work if you want to create a GC that is targetted to a different architecture. For example, Im building on a Mac, so when I run configure it naturally picks up the config for Darwin/x86_64 which is not what I want: I want Darwin/armv6. Ivan's reply to your mail suggested that he didn't use configure to produce the GC for iOS (and he didn't as it doesn't work!) but the reply he gave wasn't entirely correct. The gcc line I posted in my email will build GC correctly and produce a binary library for my desired configuration (Darwin/armv6). Thanks Bruce On 23 May 2012, at 17:31, Arno Puder wrote: > > Bruce: I'm not sure what you mean with "cross compiling the GC library". > The GC is written in C with a lot of platform-specific code. The > configure script is used to adapt the GC to a specific platform. The > purpose of the mail I posted on the Boehm GC was to determine the > correct configure options for iOS. > > When using --target=iphonec, XMLVM will copy a pre-configured GC that is > bundled with XMLVM. When using --target=posix it is expected that the > target platform has an installation of the Boehm GC. That is why I > included the instructions in the Makefile. Please note that Boehm GC has > moved to GitHub and you should get the latest version from there: > http://www.hpl.hp.com/personal/Hans_Boehm/gc/ > > Arno > > > On 5/23/12 2:05 AM, Bruce Jackson wrote: >> Hi Paul >> >> Actually, that's the problem: if you want to build the posix target >> for iPhone, then you need to cross compile the GC library. Following >> the instructions below doesn't work, this will build a library for the >> host system and not the target system. >> >> This is further compounded by the change Apple has made to its >> compilers (llvm over gcc) and the location that is used to store them >> with XCode 4.3+. >> >> Having spent some time on this, I have now got it working, which may >> be useful for others: >> >> Arno asked this question on the boehmgc mail list last year, as you >> can see here: >> >> http://article.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/4613/match=ios >> >> I wasn't sure about Ivan's reply, but it turns out he was almost >> correct. If you: >> >> cvs -d:pserver:ano...@bd...:/cvsroot/bdwgc co bdwgc >> cd bdwgc >> gcc -I include -I libatomic_ops/src -arch armv6 -O2 -c -isysroot >> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk >> -s -DALL_INTERIOR_POINTERS -DGC_THREADS -DTHREAD_LOCAL_ALLOC >> -DPARALLEL_MARK -DUSE_MMAP -DUSE_MUNMAP -DNO_DYLD_BIND_FULLY_IMAGE >> tests/test.c extra/gc.c >> >> …you'll actually build the garbage collector (the output file gc.o is >> all you need) which you can then link against the output from an XMLVM >> posix project for iPhone. >> >> Best regards >> >> Bruce >> >> On Tue, May 22, 2012 at 11:38 PM, Paul Poley<bay...@gm...> wrote: >>> In xmlvm/var/posix/Makefile, you can find the instructions at the top. Here >>> is the comment: >>> >>> # This Makefile relies on an installation of the Boehm Garbage Collector >>> # for the target platform. The Boehm GC can be downloaded, configured and >>> # installed as follows: >>> # >>> # cvs -d:pserver:ano...@bd...:/cvsroot/bdwgc co bdwgc >>> # cd bdwgc >>> # ./configure --enable-threads=posix --enable-thread-local-alloc >>> --enable-parallel-mark >>> # make >>> # make install >>> >>> I have done this as well to run posix targets. >>> >>> Thanks, >>> Paul >>> >>> >>> On Tue, May 22, 2012 at 1:21 PM, Bruce Jackson<bru...@go...> >>> wrote: >>>> >>>> Hi All >>>> >>>> I'm trying to compile the boehmgc for use with XMLVM posix target to >>>> produce a library I can use on iPhone. >>>> I've seen much discussion on this subject: >>>> >>>> >>>> http://article.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/4560/match=iphone >>>> >>>> …and a question by Arno about the options used to ./configure, but this >>>> still seems to be something that isn't obvious/possible at all. >>>> >>>> Does anyone know: is it possible to build the gc using the ./configure >>>> tools, and if so, what are the options used? If not, how have people gone >>>> about building it? >>>> >>>> Thanks >>>> >>>> Bruce >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> xmlvm-users mailing list >>>> xml...@li... >>>> https://lists.sourceforge.net/lists/listinfo/xmlvm-users >>>> >>> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |