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 #
   2 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
   3 # Use is subject to license terms.
   4 #


   5 include $(SRC)/Makefile.master
   6 
   7 .KEEP_STATE:
   8 
   9 VERSION         = 0.95
  10 
  11 # $(POUND_SIGN) is just a #.  Used to turn a feature off.
  12 # The $(POUND_SIGN)POUND_SIGN:sh construct is just so make doesn't have to
  13 # spawn a shell and redefine POUND_SIGN if it is already defined (e.g.
  14 # $(SRC)/Makefile.master was already included).
  15 $(POUND_SIGN)POUND_SIGN:sh = echo '\043'
  16 
  17 
  18 #
  19 # Optional features (set to $(POUND_SIGN) to turn off):
  20 #
  21 # OPTION_UTILS:
  22 #       Build the userland utilities.
  23 #       NOTE: these utilities will be installed in
  24 #             /platform/$(PLATFORM)/boot/grub, not /boot/grub.
  25 #
  26 # OPTION_DOCS:
  27 #       Build and install some GRUB documentations, e.g. man and info files.
  28 #       NOTE: these docs will be installed in
  29 #             /platform/$(PLATFORM)/boot/grub, not /boot/grub.
  30 #
  31 # OPTION_FS:
  32 #       Build additional filesystem support into GRUB. This will increase
  33 #       the sizes of stage2 and pxegrub and may cause malfunction.
  34 #
  35 # STAGE2_NETBOOT:
  36 #       Include netboot support in stage2 (on by default).
  37 #       This only affects stage2, not pxegrub (diskless support).
  38 #
  39 # STAGE2_NETBOOT        = $(POUND_SIGN)
  40 OPTION_UTILS    = $(POUND_SIGN)
  41 OPTION_DOCS     = $(POUND_SIGN)
  42 OPTION_FS       = $(POUND_SIGN)
  43 
  44 
  45 BASE_CFLAGS     = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
  46 BASE_CCASFLAGS  = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
  47 BASE_LDFLAGS    =
  48 
  49 CC              = $(GCC_ROOT)/bin/gcc
  50 CFLAGS          = $(BASE_CFLAGS)
  51 CCDEPMODE       = depmode=none
  52 
  53 CCAS            = $(CC)
  54 CCASFLAGS       = $(BASE_CCASFLAGS)
  55 
  56 CPP             = $(CC) -E
  57 
  58 # $(ENVCPPFLAGS4), if defined, should be something like "-Y I,somepath".
  59 # We want to get rid of the "-Y I," part but make's pattern replacement
  60 # macro reference doesn't allow spaces in it, e.g. $(ENVCPPFLAGS4:-Y I,%=%).
  61 # So we'll get rid of the "-Y" now and then the "I," later.  By the way, this
  62 # should also work in case $(ENVCPPFLAGS4) is "-YI,somepath" (no space).
  63 t.ENVCPPFLAGS4  = $(ENVCPPFLAGS4:-Y%=%)
  64 
  65 CPPFLAGS        = $(DEFS) $(INCLUDES) $(WARNFLAGS) \
  66                   $(ENVCPPFLAGS1:-I%=-isystem %) \
   1 #
   2 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
   3 # Use is subject to license terms.
   4 #
   5 # Copyright 2015 RackTop Systems.
   6 #
   7 include $(SRC)/Makefile.master
   8 
   9 .KEEP_STATE:
  10 
  11 VERSION         = 0.95
  12 
  13 # $(POUND_SIGN) is just a #.  Used to turn a feature off.
  14 # The $(POUND_SIGN)POUND_SIGN:sh construct is just so make doesn't have to
  15 # spawn a shell and redefine POUND_SIGN if it is already defined (e.g.
  16 # $(SRC)/Makefile.master was already included).
  17 $(POUND_SIGN)POUND_SIGN:sh = echo '\043'
  18 
  19 
  20 #
  21 # Optional features (set to $(POUND_SIGN) to turn off):
  22 #
  23 # OPTION_UTILS:
  24 #       Build the userland utilities.
  25 #       NOTE: these utilities will be installed in
  26 #             /platform/$(PLATFORM)/boot/grub, not /boot/grub.
  27 #
  28 # OPTION_DOCS:
  29 #       Build and install some GRUB documentations, e.g. man and info files.
  30 #       NOTE: these docs will be installed in
  31 #             /platform/$(PLATFORM)/boot/grub, not /boot/grub.
  32 #
  33 # OPTION_FS:
  34 #       Build additional filesystem support into GRUB. This will increase
  35 #       the sizes of stage2 and pxegrub and may cause malfunction.
  36 #
  37 # STAGE2_NETBOOT:
  38 #       Include netboot support in stage2 (on by default).
  39 #       This only affects stage2, not pxegrub (diskless support).
  40 #
  41 # STAGE2_NETBOOT        = $(POUND_SIGN)
  42 OPTION_UTILS    = $(POUND_SIGN)
  43 OPTION_DOCS     = $(POUND_SIGN)
  44 OPTION_FS       = $(POUND_SIGN)
  45 
  46 
  47 BASE_CFLAGS     = -B$(GCC_ROOT)/bin/ -g -std=gnu89 $(CPPFLAGS) $(OPTFLAGS)
  48 BASE_CCASFLAGS  = -B$(GCC_ROOT)/bin/ -g -std=gnu89 $(CPPFLAGS) $(OPTFLAGS)
  49 BASE_LDFLAGS    =
  50 
  51 CC              = $(GCC_ROOT)/bin/gcc
  52 CFLAGS          = $(BASE_CFLAGS)
  53 CCDEPMODE       = depmode=none
  54 
  55 CCAS            = $(CC)
  56 CCASFLAGS       = $(BASE_CCASFLAGS)
  57 
  58 CPP             = $(CC) -E
  59 
  60 # $(ENVCPPFLAGS4), if defined, should be something like "-Y I,somepath".
  61 # We want to get rid of the "-Y I," part but make's pattern replacement
  62 # macro reference doesn't allow spaces in it, e.g. $(ENVCPPFLAGS4:-Y I,%=%).
  63 # So we'll get rid of the "-Y" now and then the "I," later.  By the way, this
  64 # should also work in case $(ENVCPPFLAGS4) is "-YI,somepath" (no space).
  65 t.ENVCPPFLAGS4  = $(ENVCPPFLAGS4:-Y%=%)
  66 
  67 CPPFLAGS        = $(DEFS) $(INCLUDES) $(WARNFLAGS) \
  68                   $(ENVCPPFLAGS1:-I%=-isystem %) \