On 3/8/20 10:49 PM, Xi Ruoyao via blfs-dev wrote:
GCC 10 will enable -fno-common by default.  It would break some "legacy"
(actually buggy IMO) code.  I found some cases in the book with GCC 9 and -fno-
common explicitly enabled.

Patches uploaded to http://www.linuxfromscratch.org/~xry111/fno-common-patches/.
I hope the upstream can fix these cases before GCC 10 (for SDL2, xorg-server and
pipewire the fix is already commited).  But if they don't we can grab these
patches as needed.

Thanks for that. One question though. When I go to https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html is says

"The default is -fno-common, which specifies that the compiler places uninitialized global variables in the BSS section of the object file. This inhibits the merging of tentative definitions by the linker so you get a multiple-definition error if the same variable is accidentally defined in more than one compilation unit."

I would read the above to indicate that -fno-common is default for gcc9 also.

Comments?

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to