[fpc-devel] Solaris and binutils 2.22 break fpc linking and workaround

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Nov 20 15:35:54 CET 2012


On 20 Nov 2012, at 14:52, Helmut Hartl wrote:

> While building under SmartOS in a buildzone
> (IllumOS, former OpenSolaris) i have the problem that with
> binutils 2.22 the fpc generated linker script line in ppas.sh
>
> /opt/local/bin/gld -melf_x86_64    -s -L. -o my_program link.res
>
> is not working anymore. Because the only targets the new binutils  
> 2.22 support on solaris are elf_x86_64_sol2 and elf_i386_sol2.

That's probably "supported by default". I'm sure it's possible to  
still build a binutils version that still supports regular elf_x86_64.

My suggestion would be to simply change the compiler to always use  
elf_x86_64_sol2/elf_i386_sol2 and require binutils 2.21 or higher on  
Solaris. It's not like there is a massive user base for that platform,  
nor very old Solaris/x86 systems that will have trouble supporting  
newer binutils versions.

Apparently the Solaris ABI is in fact different from the regular x86  
ELF abi, which is why that change was made in the first place. So the  
programs generated with -melf_x86_64/-m-melf_i386 were not properly  
ABI-compliant in the first place.


Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20121120/d29709b3/attachment.html>


More information about the fpc-devel mailing list