Re: Assembler issues while compiling pkgsrc packages

John Klos <[email protected]>
Newsgroups gmane.os.netbsd.ports.arm
Message-ID <[email protected]>
>> Who does generate it? This is a common bug in hand written assembler files
>> when the author does not think back to armv4. The fix is pretty simple
>> (when no thumb code is involved), something like:
>>
>> #if defined (_ARM_ARCH_4T) || defined(__ARM_ARCH_ISA_THUMB)
>> # define RET            bx              lr
>> #else
>> # define RET            mov             pc, lr
>> #endif
>>
>> and then use RET everywhere instead of "bx lr".
>>
>> Martin
>
>> From the GNU assembler manual:
>
> --fix-v4bx
>
>    Allow BX instructions in ARMv4 code. This is intended for use with the linker option of the same name.
>
> I presume the LLVM tools have a similar option.  The intent is to allow 
> BX in object files, but for the linker to translate them into MOV PC, LR 
> if the final link step indicates that the image is intended to run on an 
> Armv4 target.

Good to know about both things. Although there are others, security/nettle 
blocks a good number of other packages. I'll search through other earmv4 
build failures looking for other instances.

Thanks!
John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.