Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-1722

Grub (& others) may fail with -O3 [FIX Included]

    • Icon: Story Story
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Funtoo with GCC 4.8.2.

      GCC 4.8 has a bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 which can cause an infinite loop due to an odd optimization included as part of -O3. It was thought to only affect re-implementations of memset or memcpy, but this bug bites grub2 and possibly other apps.

      The fix is to use -fno-tree-loop-distribute-patterns

      I think this should be added to the grub2 ebuild, just in case. Incidently, if grub2 uses -ffreestanding or -fno-hosted or -fno-builtin, then these should also turn off this behavior for 4.8.3, 4.9.1, and 4.10.0 and higher versions of GCC. The bug is in 4.8.2 and earlier and you'll have to turn off the optimization explicitly with the -fno-tree-loop-distribute-patterns. Maybe its time for a GCC bump?

            Unassigned Unassigned
            uudruid74 uudruid74
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: