Robin,

that GCC option is nothing to do with Fortran or Fortran common blocks. It is about how uninitialized global variables are link edited, a new C compiler default for better optimized code generation causes some dubious code constructs that used to work to no longer do so. The dubious code constructs are multiple definitions across translation units, which were silently ignored but no longer are now the default is -fno-common.

73
Bill
G4WJS.

On 11/02/2020 00:46, G8DQX (WSJT developers on SF) wrote:

Jaroslav, and others,

as an aside, over 50 years ago now, we were *strongly* warned against the use of COMMON blocks in FORTRAN, for a number of reasons, mostly relating to inhomogeneous environments, future change, and portability. And the COMMON block still bites us, long after Hollerith cards, the physical sort, are but a dim—thankfully—memory!

73,

Robin, G8DQX

On 10/02/2020 18:12, Jaroslav Skarvada wrote:
This is because of this gcc-10 change [1]:

* GCC now defaults to -fno-common. As a result, global variable accesses are
   more efficient on various targets. In C, global variables with multiple
   tentative definitions now result in linker errors. With -fcommon such
   definitions are silently merged during linking.

When added '-fcommon' it compiled OK.


_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to