Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using Static libraries having Universal binaries on and intel Mac



Hi ,
 
 
I  am  using gcc4.0 amd the MacOSXSDK 10.4u for the intel version and gcc3.3 and the 10.3.9 sdk for the ppc version of the build .
 
I then use lipo to create a universal binary and then archive them into a static library .
 
The above two steps are done on an intel mac 10.4  
 
I create quite a many static llibraries from the above build .
 
I now intend to use these universal static libraries to create executables on ppc and when I try to link these libraries on ppc using gcc 3.3 , I get a lot many errors
 
 
ld: ../src/liblmgr.a(wurzl34.o) r_type field of relocation entry 3751 in section (__TEXT,__text) invalid
ld: ../src/liblmgr.a(wurzl34.o) stray relocation PPC_RELOC_PAIR entry (3752) in section (__TEXT,__text) .
 
I also tried creating a thin library from the universal version of the library and using this tin library to link with the other object files/libraries to create an executable . But even that seems to fail with the same error.
 
The compiler flags and other details that I have set for the build are
        ARCH_i386 = -arch i386
        SDKROOT_i386 = $(shell $(GPLATARGS_CMD) -sdk_i386)
        CFLAGS_i386 = $(INCFLAGS) $(DEBUGFLAG) $(XTRACFLAG) -isysroot $(SDKROOT_i386) $(THREADFLAG) $(ACTFLAGS) $(ARCH_i386)
        CC_i386 = gcc-4.0
 
        ARCH_ppc = -arch ppc
        SDKROOT_ppc = $(shell $(GPLATARGS_CMD) -sdk_ppc)
        CFLAGS_ppc = $(INCFLAGS) $(DEBUGFLAG) $(XTRACFLAG) $(THREADFLAG) $(ACTFLAGS) -isystem $(SDKROOT_ppc) $(ARCH_ppc)
        CC_ppc = gcc-3.3
 
 
        $(CC_i386) -c $(CFLAGS_i386) -S $< -o $*i.s
        $(CC_i386) -c $(CFLAGS_i386) $*i.s -o $*i.o
 
        $(CC_ppc) -c  $(CFLAGS_ppc) -S  $< -o $*p.s
        $(CC_ppc) -c  $(CFLAGS_ppc) $*p.s -o $*p.o
 
        lipo -create -o $@ $*i.o $*p.o
 
        rm $*p.s $*i.s $*i.o $*p.o
 
 
I have searched for all the help I could get from the existing archives and forums ,but in vain .
 
Can any one help me on this . Please
 
Shweta.


Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.