View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003006||OpenFOAM||Patch||public||2018-07-12 21:08||2018-07-17 23:09|
|Platform||Linux 2.6.32-573.51.1.el6.x86_64||OS||Other||OS Version||(please specify)|
|Fixed in Version||dev|
|Summary||0003006: Tweak wmake rules to avoid ld.gold linker issues|
|Description||It is known that OpenFOAM cannot be built using the ld.gold linker. This can be remedied by patching the wmake rules by adding the -fuse-ld=bfd option to LINKEXE (c,c++) and LINKLIBSO (c).|
At the very least I think it may be useful to link to this comment in the old issue. If you don't see adverse effects, it may be a good idea to include the change in the official source.
|Additional Information||Relates to issue 685:|
|Tags||No tags attached.|
||Do you know if this additional linker option cause problems for the bfd linker, other compilers or gcc versions? Is it only needed for gcc or also clang and icpc?|
At least in V18, ICC/ICPC support the fuse-ld flag for compatibility with GCC .
LLVM also implemented the flag for compatibility in 2014 . Since I've never used Clang/LLVM, I cannot judge if you'd want to use bfd or rather the native LLD linker.
Since wmake allows specifying rules for every compiler, I would only suggest adding the fuse-ld=bfd option for GCC. I'll try to find out when the flag was implemented for GCC (for which version), and update this report.
The patch to include the flag was included in GCC 4.8.0 , so it fits the already present build requirements for OpenFOAM.
I thus see no risk in including the change in the wmake options for GCC, without touching the LLVM and ICC options until someone can confirm the issue manifests itself with those compilers as well.
> adding the -fuse-ld=bfd option to LINKEXE (c,c++) and LINKLIBSO (c).
Why should the option be added to LINKLIBSO of c and not c++?
||No reason, I just overlooked the LINKLIBSO entry there. So indeed the option should be added for both LINKEXE and LINKLIBSO for both c and c++.|
||Resolved by commit 5e8593c1716490a4e74fe8136c248257123aa255|
|2018-07-12 21:08||akidess||New Issue|
|2018-07-17 10:29||henry||Note Added: 0009854|
|2018-07-17 12:01||akidess||Note Added: 0009857|
|2018-07-17 12:29||akidess||Note Added: 0009858|
|2018-07-17 14:58||henry||Note Added: 0009860|
|2018-07-17 19:45||akidess||Note Added: 0009862|
|2018-07-17 23:09||henry||Assigned To||=> henry|
|2018-07-17 23:09||henry||Status||new => resolved|
|2018-07-17 23:09||henry||Resolution||open => fixed|
|2018-07-17 23:09||henry||Fixed in Version||=> dev|
|2018-07-17 23:09||henry||Note Added: 0009863|