Print this page
8512 libstand won't build with GCC 7.1
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/boot/lib/libstand/Makefile.inc
+++ new/usr/src/boot/lib/libstand/Makefile.inc
1 1 #
2 2 # This file and its contents are supplied under the terms of the
3 3 # Common Development and Distribution License ("CDDL"), version 1.0.
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
4 4 # You may only use this file in accordance with the terms of version
5 5 # 1.0 of the CDDL.
6 6 #
7 7 # A full copy of the text of the CDDL should have accompanied this
8 8 # source. A copy of the CDDL is also available via the Internet at
9 9 # http://www.illumos.org/license/CDDL.
10 10 #
11 11
12 12 #
13 13 # Copyright 2016 Toomas Soome <tsoome@me.com>
14 +# Copyright 2017 RackTop Systems.
14 15 #
15 16
16 17 #
17 18 # Notes:
18 19 # - We don't use the libc strerror/sys_errlist because the string table is
19 20 # quite large.
20 21 #
21 22
22 23 # standalone components and stuff we have modified locally
23 24 SRCS= $(LIB_BASE)/libz/gzguts.h $(LIB_BASE)/libz/zutil.h
24 25 SRCS += $(LIBSTAND_SRC)/__main.c $(LIBSTAND_SRC)/assert.c
25 26 SRCS += $(LIBSTAND_SRC)/bcd.c $(LIBSTAND_SRC)/environment.c
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
26 27 SRCS += $(LIBSTAND_SRC)/getopt.c $(LIBSTAND_SRC)/strtol.c
27 28 SRCS += $(LIBSTAND_SRC)/strtoul.c $(LIBSTAND_SRC)/random.c
28 29 SRCS += $(LIBSTAND_SRC)/sbrk.c $(LIBSTAND_SRC)/twiddle.c
29 30 SRCS += $(LIBSTAND_SRC)/zalloc.c $(LIBSTAND_SRC)/zalloc_malloc.c
30 31
31 32 OBJS= __main.o assert.o bcd.o environment.o \
32 33 getopt.o gets.o globals.o pager.o printf.o \
33 34 strdup.o strerror.o strtol.o strtoul.o random.o \
34 35 sbrk.o twiddle.o zalloc.o zalloc_malloc.o
35 36
37 +# builtins provided by compiler-rt
38 +SRCS += $(LIB_BASE)/builtins/divmoddi4.c
39 +SRCS += $(LIB_BASE)/builtins/udivmoddi4.c
40 +OBJS += divmoddi4.o udivmoddi4.o
41 +
36 42 # private (pruned) versions of libc string functions
37 43 SRCS += $(LIBSTAND_SRC)/strcasecmp.c
38 44 OBJS += strcasecmp.o
39 45
40 46 # from libc
41 47 SRCS += $(LIB_BASE)/libc/net/ntoh.c
42 48 OBJS += ntoh.o
43 49
44 50 # string functions from libc
45 51 SRCS += $(LIB_BASE)/libc/string/bcmp.c $(LIB_BASE)/libc/string/bcopy.c
46 52 SRCS += $(LIB_BASE)/libc/string/bzero.c $(LIB_BASE)/libc/string/ffs.c
47 53 SRCS += $(LIB_BASE)/libc/string/fls.c $(LIB_BASE)/libc/string/memccpy.c
48 54 SRCS += $(LIB_BASE)/libc/string/memchr.c $(LIB_BASE)/libc/string/memcmp.c
49 55 SRCS += $(LIB_BASE)/libc/string/memcpy.c $(LIB_BASE)/libc/string/memmove.c
50 56 SRCS += $(LIB_BASE)/libc/string/memset.c $(LIB_BASE)/libc/string/strcat.c
51 57 SRCS += $(LIB_BASE)/libc/string/strchr.c $(LIB_BASE)/libc/string/strcmp.c
52 58 SRCS += $(LIB_BASE)/libc/string/strcpy.c $(LIB_BASE)/libc/string/strcspn.c
53 59 SRCS += $(LIB_BASE)/libc/string/strlcat.c $(LIB_BASE)/libc/string/strlcpy.c
54 60 SRCS += $(LIB_BASE)/libc/string/strlen.c $(LIB_BASE)/libc/string/strncat.c
55 61 SRCS += $(LIB_BASE)/libc/string/strncmp.c $(LIB_BASE)/libc/string/strncpy.c
56 62 SRCS += $(LIB_BASE)/libc/string/strpbrk.c $(LIB_BASE)/libc/string/strrchr.c
57 63 SRCS += $(LIB_BASE)/libc/string/strsep.c $(LIB_BASE)/libc/string/strspn.c
58 64 SRCS += $(LIB_BASE)/libc/string/strstr.c $(LIB_BASE)/libc/string/strtok.c
59 65 SRCS += $(LIB_BASE)/libc/string/swab.c
60 66
61 67 SRCS += $(LIBSTAND_SRC)/qdivrem.c
62 68
63 69 OBJS += bcmp.o bcopy.o bzero.o ffs.o fls.o \
64 70 memccpy.o memchr.o memcmp.o memcpy.o memmove.o memset.o \
65 71 qdivrem.o strcat.o strchr.o strcmp.o strcpy.o \
66 72 strcspn.o strlcat.o strlcpy.o strlen.o strncat.o strncmp.o strncpy.o \
67 73 strpbrk.o strrchr.o strsep.o strspn.o strstr.o strtok.o swab.o
68 74
69 75 # uuid functions from libc
70 76 SRCS += $(LIB_BASE)/libc/uuid/uuid_create_nil.c
71 77 SRCS += $(LIB_BASE)/libc/uuid/uuid_equal.c
72 78 SRCS += $(LIB_BASE)/libc/uuid/uuid_is_nil.c
73 79
74 80 SRCS += $(LIBSTAND_SRC)/uuid_from_string.c
75 81 SRCS += $(LIBSTAND_SRC)/uuid_to_string.c
76 82
77 83 OBJS += uuid_create_nil.o uuid_equal.o uuid_from_string.o uuid_is_nil.o \
78 84 uuid_to_string.o
79 85
80 86 # decompression functionality from libbz2
81 87 # NOTE: to actually test this functionality after libbz2 upgrade compile
82 88 # loader(8) with LOADER_BZIP2_SUPPORT defined
83 89 CFLAGS += -DBZ_LOADER -DBZ_NO_STDIO -DBZ_NO_COMPRESS
84 90 SRCS += libstand_bzlib_private.h
85 91
86 92 SRCS += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
87 93 OBJS += _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o
88 94 CLEANFILES += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
89 95
90 96 _bzlib.c: $(SRC)/common/bzip2/bzlib.c
91 97 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
92 98
93 99 _crctable.c: $(SRC)/common/bzip2/crctable.c
94 100 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
95 101
96 102 _decompress.c: $(SRC)/common/bzip2/decompress.c
97 103 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
98 104
99 105 _huffman.c: $(SRC)/common/bzip2/huffman.c
100 106 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
101 107
102 108 _randtable.c: $(SRC)/common/bzip2/randtable.c
103 109 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
104 110
105 111 CLEANFILES += libstand_bzlib_private.h
106 112 libstand_bzlib_private.h: $(SRC)/common/bzip2/bzlib_private.h
107 113 sed -e 's|<stdlib.h>|"stand.h"|' $^ > $@
108 114
109 115 # decompression functionality from libz
110 116 CFLAGS += -DHAVE_MEMCPY -I$(LIB_BASE)/libz
111 117 SRCS += $(LIB_BASE)/libz/adler32.c $(LIB_BASE)/libz/crc32.c \
112 118 libstand_zutil.h libstand_gzguts.h
113 119 OBJS += adler32.o crc32.o
114 120
115 121 _infback.c: $(LIB_BASE)/libz/infback.c
116 122 sed -e "s|zutil\.h|libstand_zutil.h|" \
117 123 -e "s|gzguts\.h|libstand_gzguts.h|" \
118 124 $^ > $@
119 125 _inffast.c: $(LIB_BASE)/libz/inffast.c
120 126 sed -e "s|zutil\.h|libstand_zutil.h|" \
121 127 -e "s|gzguts\.h|libstand_gzguts.h|" \
122 128 $^ > $@
123 129 _inflate.c: $(LIB_BASE)/libz/inflate.c
124 130 sed -e "s|zutil\.h|libstand_zutil.h|" \
125 131 -e "s|gzguts\.h|libstand_gzguts.h|" \
126 132 $^ > $@
127 133 _inftrees.c: $(LIB_BASE)/libz/inftrees.c
128 134 sed -e "s|zutil\.h|libstand_zutil.h|" \
129 135 -e "s|gzguts\.h|libstand_gzguts.h|" \
130 136 $^ > $@
131 137 _zutil.c: $(LIB_BASE)/libz/zutil.c
132 138 sed -e "s|zutil\.h|libstand_zutil.h|" \
133 139 -e "s|gzguts\.h|libstand_gzguts.h|" \
134 140 $^ > $@
135 141
136 142 SRCS += _infback.c _inffast.c _inflate.c _inftrees.c _zutil.c
137 143 OBJS += _infback.o _inffast.o _inflate.o _inftrees.o _zutil.o
138 144 CLEANFILES += _infback.c _inffast.c _inflate.c _inftrees.c _zutil.c
139 145
140 146 # depend on stand.h being able to be included multiple times
141 147 libstand_zutil.h: $(LIB_BASE)/libz/zutil.h
142 148 sed -e 's|<fcntl.h>|"stand.h"|' \
143 149 -e 's|<stddef.h>|"stand.h"|' \
144 150 -e 's|<string.h>|"stand.h"|' \
145 151 -e 's|<stdio.h>|"stand.h"|' \
146 152 -e 's|<stdlib.h>|"stand.h"|' \
147 153 $^ > $@
148 154
149 155 libstand_gzguts.h: $(LIB_BASE)/libz/gzguts.h
150 156 sed -e 's|<fcntl.h>|"stand.h"|' \
151 157 -e 's|<stddef.h>|"stand.h"|' \
152 158 -e 's|<string.h>|"stand.h"|' \
153 159 -e 's|<stdio.h>|"stand.h"|' \
154 160 -e 's|<stdlib.h>|"stand.h"|' \
155 161 $^ > $@
156 162
157 163 CLEANFILES += libstand_zutil.h libstand_gzguts.h
158 164
159 165 # io routines
160 166 SRCS += $(LIBSTAND_SRC)/closeall.c $(LIBSTAND_SRC)/dev.c \
161 167 $(LIBSTAND_SRC)/ioctl.c $(LIBSTAND_SRC)/nullfs.c \
162 168 $(LIBSTAND_SRC)/stat.c $(LIBSTAND_SRC)/fstat.c $(LIBSTAND_SRC)/close.c \
163 169 $(LIBSTAND_SRC)/lseek.c $(LIBSTAND_SRC)/open.c $(LIBSTAND_SRC)/read.c \
164 170 $(LIBSTAND_SRC)/write.c $(LIBSTAND_SRC)/readdir.c
165 171
166 172 OBJS += closeall.o dev.o ioctl.o nullfs.o stat.o fstat.o close.o lseek.o \
167 173 open.o read.o write.o readdir.o
168 174
169 175 # network routines
170 176 SRCS += $(LIBSTAND_SRC)/arp.c $(LIBSTAND_SRC)/ether.c \
171 177 $(LIBSTAND_SRC)/inet_ntoa.c $(LIBSTAND_SRC)/in_cksum.c \
172 178 $(LIBSTAND_SRC)/net.c $(LIBSTAND_SRC)/udp.c $(LIBSTAND_SRC)/netif.c \
173 179 $(LIBSTAND_SRC)/rpc.c
174 180 OBJS += arp.o ether.o inet_ntoa.o in_cksum.o net.o udp.o netif.o rpc.o
175 181
176 182 # network info services:
177 183 SRCS += $(LIBSTAND_SRC)/bootp.c $(LIBSTAND_SRC)/rarp.c \
178 184 $(LIBSTAND_SRC)/bootparam.c
179 185 OBJS += bootp.o rarp.o bootparam.o
180 186
181 187 # boot filesystems
182 188 SRCS += $(LIBSTAND_SRC)/ufs.c
183 189 SRCS += $(LIBSTAND_SRC)/nfs.c
184 190 SRCS += $(LIBSTAND_SRC)/cd9660.c
185 191 SRCS += $(LIBSTAND_SRC)/tftp.c
186 192 SRCS += $(LIBSTAND_SRC)/gzipfs.c
187 193 SRCS += $(LIBSTAND_SRC)/bzipfs.c
188 194 SRCS += $(LIBSTAND_SRC)/dosfs.c
189 195 OBJS += ufs.o
190 196 OBJS += nfs.o
191 197 OBJS += cd9660.o
192 198 OBJS += tftp.o
193 199 OBJS += gzipfs.o
194 200 OBJS += bzipfs.o
195 201 OBJS += dosfs.o
196 202 #
↓ open down ↓ |
151 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX