[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libobjc2 and powerpc.
From: |
bertrand |
Subject: |
Re: libobjc2 and powerpc. |
Date: |
Tue, 20 Mar 2018 22:30:04 +0100 |
Le mardi 20 mars 2018 à 10:46 +0000, David Chisnall a écrit :
> There are two issues. The first is the warnings in the libobjc2 build.
> These warnings are telling you that objc_msgSend and
> imp_implementationWithBlock (neither of which can be implemented in C) are
> not available on your platform. This means that you can’t use blocks as IMPs
> and you must use the older two-stage dispatch mechanism (which clang will
> default to for architectures where libobjc2 does not implement the
> objc_msgSend family).
>
> I would be very happy to help anyone who wants to add PowerPC support to
> these code paths, but I personally have a very low tolerance for PowerPC
> assembly and no easy access to PowerPC hardware, so won’t be doing it myself.
>
> The later errors are coming from gas, which appears not to be supporting some
> of the assembly that clang is generating. You can try using -integrated-as,
> which tells clang to generate object code directly rather than via gas. I
> don’t know what the status is for PowerPC, but a newer version might help
> here (PowerPC in LLVM has had a lot of work from IBM and Argone National Labs
> recently).
>
> David
>
I've set CC to 'clang -integrated-as' and CXX as well. Not a complete
success. But there is some progress. It fails at link times now in
ManyManySelectors.m because objc_msgSend is called . See below.
Thanks,
Bertrand
> [ 0%] Building C object CMakeFiles/objc.dir/abi_version.c.o
> [ 1%] Building C object CMakeFiles/objc.dir/alias_table.c.o
> [ 1%] Building C object CMakeFiles/objc.dir/block_to_imp.c.o
> [ 2%] Building C object CMakeFiles/objc.dir/caps.c.o
> [ 2%] Building C object CMakeFiles/objc.dir/category_loader.c.o
> [ 3%] Building C object CMakeFiles/objc.dir/class_table.c.o
> [ 4%] Building C object CMakeFiles/objc.dir/dtable.c.o
> [ 4%] Building C object CMakeFiles/objc.dir/eh_personality.c.o
> [ 5%] Building C object CMakeFiles/objc.dir/encoding2.c.o
> [ 5%] Building C object CMakeFiles/objc.dir/hash_table.c.o
> [ 6%] Building C object CMakeFiles/objc.dir/hooks.c.o
> [ 6%] Building C object CMakeFiles/objc.dir/ivar.c.o
> [ 7%] Building C object CMakeFiles/objc.dir/legacy_malloc.c.o
> [ 7%] Building C object CMakeFiles/objc.dir/loader.c.o
> [ 8%] Building C object CMakeFiles/objc.dir/mutation.m.o
> [ 8%] Building C object CMakeFiles/objc.dir/protocol.c.o
> [ 9%] Building C object CMakeFiles/objc.dir/runtime.c.o
> [ 10%] Building C object CMakeFiles/objc.dir/sarray2.c.o
> [ 10%] Building C object CMakeFiles/objc.dir/selector_table.c.o
> [ 11%] Building C object CMakeFiles/objc.dir/sendmsg2.c.o
> [ 11%] Building C object CMakeFiles/objc.dir/statics_loader.c.o
> [ 12%] Building C object CMakeFiles/objc.dir/toydispatch.c.o
> [ 12%] Building ASM object CMakeFiles/objc.dir/block_trampolines.S.o
> /home/bertrand/Install_GNUstep/libobjc2/block_trampolines.S:136:2: warning:
> imp_implementationWithBlock() not implemented for your architecture
> [-W#warnings]
> #warning imp_implementationWithBlock() not implemented for your architecture
> ^
> 1 warning generated.
> [ 13%] Building ASM object CMakeFiles/objc.dir/objc_msgSend.S.o
> /home/bertrand/Install_GNUstep/libobjc2/objc_msgSend.S:14:2: warning:
> objc_msgSend() not implemented for your architecture [-W#warnings]
> #warning objc_msgSend() not implemented for your architecture
> ^
> 1 warning generated.
> [ 13%] Building C object CMakeFiles/objc.dir/NSBlocks.m.o
> [ 14%] Building C object CMakeFiles/objc.dir/Protocol2.m.o
> [ 15%] Building C object CMakeFiles/objc.dir/arc.m.o
> [ 15%] Building C object CMakeFiles/objc.dir/associate.m.o
> [ 16%] Building C object CMakeFiles/objc.dir/blocks_runtime.m.o
> [ 16%] Building C object CMakeFiles/objc.dir/properties.m.o
> [ 17%] Building C object CMakeFiles/objc.dir/gc_none.c.o
> [ 17%] Building CXX object CMakeFiles/objc.dir/objcxx_eh.cc.o
> clang: warning: argument unused during compilation: '-integrataed-as'
> [ 18%] Linking C shared library libobjc.so
> [ 18%] Built target objc
> [ 19%] Building C object
> Test/CMakeFiles/CXXExceptions_optimised.dir/CXXException.m.o
> [ 19%] Building CXX object
> Test/CMakeFiles/CXXExceptions_optimised.dir/CXXException.cc.o
> clang: warning: argument unused during compilation: '-integrataed-as'
> [ 20%] Building C object Test/CMakeFiles/CXXExceptions_optimised.dir/Test.m.o
> [ 20%] Linking C executable CXXExceptions_optimised
> [ 20%] Built target CXXExceptions_optimised
> [ 20%] Building C object Test/CMakeFiles/CXXExceptions.dir/CXXException.m.o
> [ 21%] Building CXX object Test/CMakeFiles/CXXExceptions.dir/CXXException.cc.o
> clang: warning: argument unused during compilation: '-integrataed-as'
> [ 22%] Building C object Test/CMakeFiles/CXXExceptions.dir/Test.m.o
> [ 22%] Linking C executable CXXExceptions
> [ 22%] Built target CXXExceptions
> [ 23%] Building C object Test/CMakeFiles/setSuperclass.dir/setSuperclass.m.o
> /home/bertrand/Install_GNUstep/libobjc2/Test/setSuperclass.m:178:30: warning:
> 'Subclass1' may not respond to 'existsOnNotInitializedSuperclass'
> expect([subclass1instance1 existsOnNotInitializedSuperclass]);
> ~~~~~~~~~~~~~~~~~~ ^
> /home/bertrand/Install_GNUstep/libobjc2/Test/setSuperclass.m:144:8: note:
> expanded from macro 'expect'
> if (!(x)) \
> ^
> /home/bertrand/Install_GNUstep/libobjc2/Test/setSuperclass.m:224:30: warning:
> 'Subclass2' may not respond to 'existsOnNotInitializedSuperclass'
> expect([subclass2instance1 existsOnNotInitializedSuperclass]);
> ~~~~~~~~~~~~~~~~~~ ^
> /home/bertrand/Install_GNUstep/libobjc2/Test/setSuperclass.m:144:8: note:
> expanded from macro 'expect'
> if (!(x)) \
> ^
> 2 warnings generated.
> [ 23%] Linking C executable setSuperclass
> [ 23%] Built target setSuperclass
> [ 24%] Building C object
> Test/CMakeFiles/hash_table_delete_optimised.dir/hash_table_delete.c.o
> [ 24%] Linking C executable hash_table_delete_optimised
> [ 24%] Built target hash_table_delete_optimised
> [ 24%] Building C object Test/CMakeFiles/exchange_optimised.dir/exchange.m.o
> [ 25%] Linking C executable exchange_optimised
> [ 25%] Built target exchange_optimised
> [ 25%] Building C object Test/CMakeFiles/exchange.dir/exchange.m.o
> [ 26%] Linking C executable exchange
> [ 26%] Built target exchange
> [ 27%] Building C object
> Test/CMakeFiles/zeroSizedIVar_optimised.dir/zeroSizedIVar.m.o
> [ 28%] Linking C executable zeroSizedIVar_optimised
> [ 28%] Built target zeroSizedIVar_optimised
> [ 29%] Building C object
> Test/CMakeFiles/MethodArguments_optimised.dir/MethodArguments.m.o
> [ 30%] Linking C executable MethodArguments_optimised
> [ 30%] Built target MethodArguments_optimised
> [ 30%] Building C object
> Test/CMakeFiles/NilException_optimised.dir/NilException.m.o
> [ 31%] Linking C executable NilException_optimised
> [ 31%] Built target NilException_optimised
> [ 31%] Building C object Test/CMakeFiles/NilException.dir/NilException.m.o
> [ 32%] Linking C executable NilException
> [ 32%] Built target NilException
> [ 32%] Building C object
> Test/CMakeFiles/msgInterpose_optimised.dir/msgInterpose.m.o
> [ 33%] Linking C executable msgInterpose_optimised
> [ 33%] Built target msgInterpose_optimised
> [ 33%] Building C object
> Test/CMakeFiles/hash_table_delete.dir/hash_table_delete.c.o
> [ 34%] Linking C executable hash_table_delete
> [ 34%] Built target hash_table_delete
> [ 35%] Building C object Test/CMakeFiles/msgInterpose.dir/msgInterpose.m.o
> [ 36%] Linking C executable msgInterpose
> [ 36%] Built target msgInterpose
> [ 36%] Building C object
> Test/CMakeFiles/BoxedForeignException_optimised.dir/BoxedForeignException.m.o
> [ 37%] Linking C executable BoxedForeignException_optimised
> [ 37%] Built target BoxedForeignException_optimised
> [ 37%] Building C object
> Test/CMakeFiles/AssociatedObject.dir/AssociatedObject.m.o
> [ 38%] Linking C executable AssociatedObject
> [ 38%] Built target AssociatedObject
> [ 38%] Building C object Test/CMakeFiles/Forward.dir/Forward.m.o
> [ 39%] Linking C executable Forward
> [ 39%] Built target Forward
> [ 40%] Building C object
> Test/CMakeFiles/ManyManySelectors_optimised.dir/ManyManySelectors.m.o
> /home/bertrand/Install_GNUstep/libobjc2/Test/ManyManySelectors.m:40:2:
> warning:
> implicitly declaring library function 'objc_msgSend' with type
> 'id (id, SEL, ...)'
> objc_msgSend([Test class], nextSel);
> ^
> /home/bertrand/Install_GNUstep/libobjc2/Test/ManyManySelectors.m:40:2: note:
> include the header <objc/message.h> or explicitly provide a declaration
> for 'objc_msgSend'
> 1 warning generated.
> [ 40%] Linking C executable ManyManySelectors_optimised
> CMakeFiles/ManyManySelectors_optimised.dir/ManyManySelectors.m.o: In function
> `main':
> /home/bertrand/Install_GNUstep/libobjc2/Test/ManyManySelectors.m:(.text+0x340):
> undefined reference to `objc_msgSend'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> Test/CMakeFiles/ManyManySelectors_optimised.dir/build.make:95: recipe for
> target 'Test/ManyManySelectors_optimised' failed
> make[2]: *** [Test/ManyManySelectors_optimised] Error 1
> CMakeFiles/Makefile2:872: recipe for target
> 'Test/CMakeFiles/ManyManySelectors_optimised.dir/all' failed
> make[1]: *** [Test/CMakeFiles/ManyManySelectors_optimised.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
- libobjc2 and powerpc., bertrand, 2018/03/19
- Re: libobjc2 and powerpc., Fred Kiefer, 2018/03/19
- Re: libobjc2 and powerpc., David Chisnall, 2018/03/20
- Re: libobjc2 and powerpc.,
bertrand <=
- Re: libobjc2 and powerpc., David Chisnall, 2018/03/21
- GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), bertrand, 2018/03/21
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), David Chisnall, 2018/03/21
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), bertrand, 2018/03/21
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), David Chisnall, 2018/03/21
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), bertrand, 2018/03/22
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), Wolfgang Lux, 2018/03/22
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), Richard Frith-Macdonald, 2018/03/22
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), bertrand, 2018/03/22
- Re: GNUstep + libobjc2 and powerpc ( was "libobjc2 on powerpc"), Richard Frith-Macdonald, 2018/03/22