Print this page
6482 GRUB won't boot when built with GCC 5
6484 GRUB should specify c89 for GCC 5
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>

@@ -1,10 +1,11 @@
 #
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 # Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 include ../../Makefile.grub
 include ../Makefile.solaris.defs
 
 .SUFFIXES:

@@ -34,11 +35,11 @@
                   -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1
 $(OPTION_FS)GRUB_CFLAGS += -DFSYS_MINIX=1 -DFSYS_JFS=1 -DFSYS_XFS=1 \
                   -DSYS_VSTAFS=1 -DFSYS_FFS=1 -DFSYS_REISERFS=1
 # GRUB_CFLAGS   += -DSUPPORT_HERCULES=1
 STAGE1_5_CFLAGS = $(STAGE2_CFLAGS) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
-STAGE2_CFLAGS   = -Os -fno-builtin -nostdinc \
+STAGE2_CFLAGS   = -Os -fno-reorder-functions -fno-builtin -nostdinc \
                   $(SERIAL_CFLAGS) $(GRAPHICS_CFLAGS)
 $(STAGE2_NETBOOT)STAGE2_CFLAGS  += $(NETBOOT_CFLAGS)
 #STAGE2_CFLAGS  += $(HERCULES_CFLAGS)
 
 NBLOADER_LINK   = -nostdlib -N -Ttext 0