Targeting armv7 and armv7s
Is there a way to build a "universal" binary to target both the armv7 and the armv7s platforms on iOS? Would that require two cross compilers and some support from Xcode? -- Peter Jones --- Love to Develop 303-219-0226 http://devalot.com
You can build 2 cross compilers yes - and fat elf them together. I got that to work - I posted the details to this list previously - good luck
On Feb 21, 2013, at 7:18 PM, Peter Jones
Is there a way to build a "universal" binary to target both the armv7 and the armv7s platforms on iOS?
Would that require two cross compilers and some support from Xcode?
-- Peter Jones --- Love to Develop 303-219-0226 http://devalot.com
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
Robert Lorentz
You can build 2 cross compilers yes - and fat elf them together. I got that to work - I posted the details to this list previously - good luck
Robert, which post are you referring to? Google can't seem to find it. Here is the search I did: Lorentz site:http://www.haskell.org/pipermail/iphone/ Thanks. -- Peter Jones --- Love to Develop 303-219-0226 http://devalot.com
I actually just discovered a happy fact last night: changing -march to
armv7s in env.sh and rebuilding results in a compiler that automagically
builds a fat binary containing armv7 and armv7s! This is on
master-merge-ios, so it's possible it's due to something new but give it a
try!
(you can check what architectures a .a contains with "xcrun -sdk iphoneos
lipo -info <libname>.a")
Cheers
Luke
On Fri, Feb 22, 2013 at 11:49 AM, Peter Jones
Robert Lorentz
writes: You can build 2 cross compilers yes - and fat elf them together. I got that to work - I posted the details to this list previously - good luck
Robert, which post are you referring to? Google can't seem to find it. Here is the search I did:
Lorentz site:http://www.haskell.org/pipermail/iphone/
Thanks.
-- Peter Jones --- Love to Develop 303-219-0226 http://devalot.com
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
Luke, I tried your script with -march=armv7s and it didn't seem to work for me. I'm using a very recent XCode, namely 4.6 (4H127). My linker said ld: warning: ignoring file /Users/blackh/src/Pear/haskell.a, file was built for archive which is not the architecture being linked (armv7): /Users/blackh/src/Pear/haskell.a ...which I assume means I have armv7s but no armv7 Your xcrun command confirms it with input file haskell.a is not a fat file Not-fat file: haskell.a is architecture: armv7s I experimented and was able to build fat .o files (see below). Perhaps we can make a fancy arm-apple-darwin10-gcc script that will do it for each .o as we go. (But what does llvm do?) Steve ----------------------------------------------------- stephen-blackheaths-mac-mini:temp blackh$ vi ~/bin/arm-apple-darwin10-gcc stephen-blackheaths-mac-mini:temp blackh$ arm-apple-darwin10-gcc -c -o fat.o fat.c stephen-blackheaths-mac-mini:temp blackh$ otool -h fat.o fat.o: Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 0xfeedface 12 9 0x00 1 3 500 0x00002000 stephen-blackheaths-mac-mini:temp blackh$ vi ~/bin/arm-apple-darwin10-gcc stephen-blackheaths-mac-mini:temp blackh$ arm-apple-darwin10-gcc -c -o fat7.o fat.c stephen-blackheaths-mac-mini:temp blackh$ vi ~/bin/arm-apple-darwin10-gcc stephen-blackheaths-mac-mini:temp blackh$ arm-apple-darwin10-gcc -c -o fat7s.o fat.c stephen-blackheaths-mac-mini:temp blackh$ lipo fat7.o fat7s.o -create -output fat.o stephen-blackheaths-mac-mini:temp blackh$ otool -h fat.o fat.o (architecture armv7): Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 0xfeedface 12 9 0x00 1 3 500 0x00002000 fat.o (architecture armv7s): Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 0xfeedface 12 11 0x00 1 3 500 0x00002000 stephen-blackheaths-mac-mini:temp blackh$ ----------------------------------------------------- On 23/02/13 13:10, Luke Iannini wrote:
I actually just discovered a happy fact last night: changing -march to armv7s in env.sh and rebuilding results in a compiler that automagically builds a fat binary containing armv7 and armv7s! This is on master-merge-ios, so it's possible it's due to something new but give it a try!
(you can check what architectures a .a contains with "xcrun -sdk iphoneos lipo -info <libname>.a")
Cheers Luke
On Fri, Feb 22, 2013 at 11:49 AM, Peter Jones
mailto:mlists@pmade.com> wrote: Robert Lorentz
mailto:robert.lorentz@me.com> writes: > You can build 2 cross compilers yes - and fat elf them together. I got > that to work - I posted the details to this list previously - good > luck Robert, which post are you referring to? Google can't seem to find it. Here is the search I did:
Lorentz site:http://www.haskell.org/pipermail/iphone/
Thanks.
-- Peter Jones --- Love to Develop 303-219-0226 tel:303-219-0226 http://devalot.com
_______________________________________________ iPhone mailing list iPhone@haskell.org mailto:iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
participants (4)
-
Luke Iannini -
Peter Jones -
Robert Lorentz -
Stephen Blackheath [to GHC-iPhone]