discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libobjc2 and powerpc.


From: David Chisnall
Subject: Re: libobjc2 and powerpc.
Date: Tue, 20 Mar 2018 10:46:27 +0000

On 19 Mar 2018, at 22:06, Fred Kiefer <address@hidden> wrote:
> 
> 
> 
>> Am 19.03.2018 um 22:36 schrieb bertrand <address@hidden>:
>> 
>> 
>> Hi everyone,
>> I'm trying to build GNUstep with CLang, libdispatch and libobjc2 on a 
>> fresh install of Debian Jessie on powerpc32 system. I'm trying on Jessie 
>> because it's the last debian stable version for powerpc and I don't want to 
>> switch 
>> to debian unstable for now.
>> 
>> 
>> I've installed the build dependencies, I've built cmake-3.7 from source, I 
>> have cloned the current libobcj2 git repo and I'm now trying to build it.
>> 
>> libobjc2 fails to build with stock debian clang-3.5. 
>> 
>> It fails when building arc.m with the following :
>> 
>> 
>> [ 71%] 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. 
>> [ 75%] 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. 
>> [ 78%] Building C object CMakeFiles/objc.dir/NSBlocks.m.o 
>> [ 81%] Building C object CMakeFiles/objc.dir/Protocol2.m.o 
>> [ 84%] Building C object CMakeFiles/objc.dir/arc.m.o 
>> /tmp/arc-feaf47.s: Messages de l'assembleur: 
>> /tmp/arc-feaf47.s:5157: Erreur: Nom de symbole manquant dans la directive 
>> /tmp/arc-feaf47.s:5157: Erreur: type de symbole non reconnu « 
>> .objc_sel_nameaddObject » 
>> /tmp/arc-feaf47.s:5157: Erreur: rebut à la fin de la ligne, premier 
>> caractère non reconnu est « : » 
>> /tmp/arc-feaf47.s:5159: Erreur: Nom de symbole manquant dans la directive 
>> /tmp/arc-feaf47.s:5159: Erreur: rebut à la fin de la ligne, premier 
>> caractère non reconnu est « " » 
>> /tmp/arc-feaf47.s:5160: Erreur: rebut à la fin de la ligne, premier 
>> caractère non reconnu est « " » 
>> /tmp/arc-feaf47.s:5162: Erreur: virgule attendue après le nom «  » dans la 
>> directive .size 
>> /tmp/arc-feaf47.s:5195: Erreur: « " »  inattendue dans l'expression 
>> clang: error: assembler command failed with exit code 1 (use -v to see 
>> invocation) 
>> CMakeFiles/objc.dir/build.make:670: recipe for target 
>> 'CMakeFiles/objc.dir/arc.m.o' failed 
>> make[2]: *** [CMakeFiles/objc.dir/arc.m.o] Error 1 
>> CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/objc.dir/all' failed 
>> make[1]: *** [CMakeFiles/objc.dir/all] Error 2 
>> Makefile:149: recipe for target 'all' failed 
>> make: *** [all] Error 2 
>> 
>> Sorry for the french parts of the message, I don't know how to temporary 
>> change my locale. 
>> 
>> I hope someone could help here : do I need a more recent clang than 
>> clang-3.5 to build the current libobjc2 ? Will libobjc2 ever build on ppc ?
> 
> No, a newer version of clang won’t help you here. As the message says 
> libobjc2 is not prepared to support powerpc. You will need somebody with 
> assembler skills for this processor to write the small piece of code needed 
> for message sends.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]