[fpc-devel] FPC internal linker issues with Win64 .a startic-link libraries by GCC newer than 4.8.1

Maciej Izak hnb.code at gmail.com
Fri Dec 9 10:32:28 CET 2016

2016-09-18 2:31 GMT+02:00 Benjamin Rosseaux <benjamin at rosseaux.de>:

> i've noticed a weakness of the FPC internal linker at static-linking .a
> libraries on the Win64 target, which're generated by GCC newer than 4.8.1,
> due to the new refptr.* and .refptr.* symbols-can-be-multiple-defined
> stuff (inside one single .a library file), which was introduced in newer
> GCC versions.

I don't have the real patch for this yet but I have my inner tool to rename
all duplicated symbols for statically linking FPC with C++ code (I have
improved cppclass type). My tool uses objconv :
http://www.agner.org/optimize/#objconv . Rename for symbols is simple with
few commands for objconv ("-dfhs" to list symbols and "-nr" to rename).

Anyway your temporary patch might be better for statically linking with

Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20161209/25d3e9bb/attachment.html>

More information about the fpc-devel mailing list