View Issue Details

IDProjectCategoryView StatusLast Update
0003006OpenFOAMPatchpublic2018-07-17 23:09
Reporterakidess Assigned Tohenry  
Status resolvedResolutionfixed 
PlatformLinux 2.6.32-573.51.1.el6.x86_64OSOtherOS Version(please specify)
Product Versiondev 
Fixed in Versiondev 
Summary0003006: Tweak wmake rules to avoid linker issues
DescriptionIt is known that OpenFOAM cannot be built using the 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 InformationRelates to issue 685:
TagsNo tags attached.



2018-07-17 10:29

manager   ~0009854

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?


2018-07-17 12:01

reporter   ~0009857

At least in V18, ICC/ICPC support the fuse-ld flag for compatibility with GCC [1].

LLVM also implemented the flag for compatibility in 2014 [2]. 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.



2018-07-17 12:29

reporter   ~0009858

The patch to include the flag was included in GCC 4.8.0 [1], 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.


2018-07-17 14:58

manager   ~0009860

> 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++?


2018-07-17 19:45

reporter   ~0009862

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++.


2018-07-17 23:09

manager   ~0009863

Resolved by commit 5e8593c1716490a4e74fe8136c248257123aa255

Issue History

Date Modified Username Field Change
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