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>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/grub/grub-0.97/Makefile.solaris.defs
+++ new/usr/src/grub/grub-0.97/Makefile.solaris.defs
1 1 #
2 2 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 3 # Use is subject to license terms.
4 4 #
5 +# Copyright 2015 RackTop Systems.
6 +#
5 7 include $(SRC)/Makefile.master
6 8
7 9 .KEEP_STATE:
8 10
9 11 VERSION = 0.95
10 12
11 13 # $(POUND_SIGN) is just a #. Used to turn a feature off.
12 14 # The $(POUND_SIGN)POUND_SIGN:sh construct is just so make doesn't have to
13 15 # spawn a shell and redefine POUND_SIGN if it is already defined (e.g.
14 16 # $(SRC)/Makefile.master was already included).
15 17 $(POUND_SIGN)POUND_SIGN:sh = echo '\043'
16 18
17 19
18 20 #
19 21 # Optional features (set to $(POUND_SIGN) to turn off):
20 22 #
21 23 # OPTION_UTILS:
22 24 # Build the userland utilities.
23 25 # NOTE: these utilities will be installed in
24 26 # /platform/$(PLATFORM)/boot/grub, not /boot/grub.
25 27 #
26 28 # OPTION_DOCS:
27 29 # Build and install some GRUB documentations, e.g. man and info files.
28 30 # NOTE: these docs will be installed in
29 31 # /platform/$(PLATFORM)/boot/grub, not /boot/grub.
30 32 #
31 33 # OPTION_FS:
32 34 # Build additional filesystem support into GRUB. This will increase
33 35 # the sizes of stage2 and pxegrub and may cause malfunction.
34 36 #
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
35 37 # STAGE2_NETBOOT:
36 38 # Include netboot support in stage2 (on by default).
37 39 # This only affects stage2, not pxegrub (diskless support).
38 40 #
39 41 # STAGE2_NETBOOT = $(POUND_SIGN)
40 42 OPTION_UTILS = $(POUND_SIGN)
41 43 OPTION_DOCS = $(POUND_SIGN)
42 44 OPTION_FS = $(POUND_SIGN)
43 45
44 46
45 -BASE_CFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
46 -BASE_CCASFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
47 +BASE_CFLAGS = -B$(GCC_ROOT)/bin/ -g -std=gnu89 $(CPPFLAGS) $(OPTFLAGS)
48 +BASE_CCASFLAGS = -B$(GCC_ROOT)/bin/ -g -std=gnu89 $(CPPFLAGS) $(OPTFLAGS)
47 49 BASE_LDFLAGS =
48 50
49 51 CC = $(GCC_ROOT)/bin/gcc
50 52 CFLAGS = $(BASE_CFLAGS)
51 53 CCDEPMODE = depmode=none
52 54
53 55 CCAS = $(CC)
54 56 CCASFLAGS = $(BASE_CCASFLAGS)
55 57
56 58 CPP = $(CC) -E
57 59
58 60 # $(ENVCPPFLAGS4), if defined, should be something like "-Y I,somepath".
59 61 # We want to get rid of the "-Y I," part but make's pattern replacement
60 62 # macro reference doesn't allow spaces in it, e.g. $(ENVCPPFLAGS4:-Y I,%=%).
61 63 # So we'll get rid of the "-Y" now and then the "I," later. By the way, this
62 64 # should also work in case $(ENVCPPFLAGS4) is "-YI,somepath" (no space).
63 65 t.ENVCPPFLAGS4 = $(ENVCPPFLAGS4:-Y%=%)
64 66
65 67 CPPFLAGS = $(DEFS) $(INCLUDES) $(WARNFLAGS) \
66 68 $(ENVCPPFLAGS1:-I%=-isystem %) \
67 69 $(ENVCPPFLAGS2:-I%=-isystem %) \
68 70 $(ENVCPPFLAGS3:-I%=-isystem %) \
69 71 $(t.ENVCPPFLAGS4:I,%=-nostdinc -isystem %)
70 72
71 73 CCLD = $(GNU_ROOT)/bin/gld
72 74 LDFLAGS = $(BASE_LDFLAGS)
73 75 LINKFLAGS = -g
74 76 LINK = $(CCLD) $(LINKFLAGS) $(LDFLAGS)
75 77
76 78 DEFS = -DHAVE_CONFIG_H -DSOLARIS_NETBOOT
77 79 OPTFLAGS = -falign-jumps=1 -falign-loops=1 -falign-functions=1
78 80 #WARNFLAGS = -Wall -Wmissing-prototypes -Wunused -Wshadow \
79 81 # -Wpointer-arith -Wundef
80 82
81 83 OBJCOPY = $(GNU_ROOT)/bin/gobjcopy
82 84
83 85 AR = /usr/ccs/bin/ar
84 86 RANLIB = :
85 87
86 88 MKDIR = mkdir -p
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX