darchr / parsec-benchmark

Other
15 stars 9 forks source link

Some packages won't build on GCC 10, due to the common model not being the default anymore #2

Closed 64kramsystem closed 3 years ago

64kramsystem commented 3 years ago

Some packages - at least splash2x.raytrace - are built assuming the common model (-fcommon). This was default until GCC 9 (included), but has been disabled (therefore, moving to -fno-common as default) on GCC 10.

GCC 10 builds with default options will result in dozens of errors like:

/usr/bin/ld: cr.o:(.bss+0x0): multiple definition of `DataType'; bbox.o:(.bss+0x0): first defined here
/usr/bin/ld: cr.o:(.bss+0x8): multiple definition of `TraversalType'; bbox.o:(.bss+0x8): first defined here
/usr/bin/ld: cr.o:(.bss+0x10): multiple definition of `bundlex'; bbox.o:(.bss+0x10): first defined here
/usr/bin/ld: cr.o:(.bss+0x18): multiple definition of `bundley'; bbox.o:(.bss+0x18): first defined here

during the linking phase.

There are two possible fixes:

Some information here.