mknative-gcc revision 1.118.4.1 1 #!/bin/sh
2 # $NetBSD: mknative-gcc,v 1.118.4.1 2025/11/15 10:11:10 martin Exp $
3 #
4 # Shell script for generating all the constants needed for a native
5 # platform build of gcc.
6 #
7 # This version is for GCC 10.3
8
9 # initialise
10
11 _TMPDIR=$2
12 _TOP=$3
13 _SRC=$4
14 _PLATFORM=$5
15 _MACHINE_ARCH=$6
16 _DESTDIR=$7
17 _TOOLDIR=$8
18 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'`
19 _GNU_DIST=`cd ${_VPATH}; pwd`
20
21 if [ -z "$_DESTDIR" ]; then
22 echo "\$_DESTDIR is empty" 2>&1
23 exit 1
24 fi
25
26 . $_TOP/tools/gcc/mknative.common
27
28 case $0 in
29 *mknative-gcc.old)
30 _OUTDIRBASE="external/gpl3/gcc.old"
31 ;;
32 *)
33 _OUTDIRBASE="external/gpl3/gcc"
34 ;;
35 esac
36 _OUTDIR="$_TOP/$_OUTDIRBASE"
37
38 sanitise_includes () {
39 sed \
40 -e "s,-I$_DESTDIR/usr/include,,g" \
41 -e "s,-I$_SRC/external/lgpl3/mpfr/dist/src,,g" \
42 -e "s,-I$_SRC/external/lgpl3/mpc/dist/src,,g" \
43 -e "s,-I$_SRC/external/lgpl3/gmp/lib/libgmp/arch/[a-z_0-9-]*,,g" \
44 -e "s,-I$_TOOLDIR/include,,g" \
45 -e "s,-I/usr/include/[^ ]*,,"
46 }
47
48 ##### lib/libg2c #####
49
50 get_libg2c () {
51 mkdir -p $_OUTDIR/lib/libg2c3/arch/$_MACHINE_ARCH
52
53 write_c $_OUTDIRBASE/lib/libg2c3/arch/$_MACHINE_ARCH/config.h <$_TMPDIR/$_PLATFORM/libf2c/libU77/config.h
54 write_c $_OUTDIRBASE/lib/libg2c3/arch/$_MACHINE_ARCH/g2c.h <$_TMPDIR/$_PLATFORM/libf2c/g2c.h
55
56 {
57 getvars $_PLATFORM/libf2c/Makefile \
58 F2CEXT
59 getvars $_PLATFORM/libf2c/libF77/Makefile \
60 ALL_CFLAGS OBJS
61 getvars $_PLATFORM/libf2c/libI77/Makefile \
62 ALL_CFLAGS OBJS | sed 's,=,+=,'
63 getvars $_PLATFORM/libf2c/libU77/Makefile \
64 ALL_CFLAGS OBJS | sed 's,=,+=,'
65 } | write_mk $_OUTDIRBASE/lib/libg2c3/arch/$_MACHINE_ARCH/defs.mk
66 }
67
68 ##### lib/libgcc #####
69
70 get_libgcc () {
71 _subdir="$1"
72 mkdir -p $_OUTDIR/lib/lib$_subdir/arch
73
74 # DPBIT, FPBIT only used on mn10[23]00, we don't need them.
75 # XXX we should probably grab everything Just In Case for
76 # the future.
77
78 mkdir -p $_OUTDIR/lib/lib$_subdir/arch/$_MACHINE_ARCH
79 cd $_TMPDIR/$_PLATFORM/libgcc
80 {
81 getvars $_PLATFORM/libgcc/Makefile \
82 INCLUDES \
83 INTERNAL_CFLAGS \
84 LIB2ADD LIB2ADDEH LIB2ADD_ST \
85 LIB1ASMFUNCS LIB1ASMSRC \
86 LIB2_DIVMOD_FUNCS LIB2FUNCS_ST \
87 LIB2FUNCS_EXTRA \
88 LIBGCC2_CFLAGS \
89 SHLIB_MKMAP SHLIB_MKMAP_OPTS \
90 SHLIB_MAPFILES SHLIB_NM_FLAGS
91 getvars gcc/Makefile \
92 NOEXCEPTION_FLAGS EXTRA_HEADERS
93 } | sanitise_includes \
94 | write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$_MACHINE_ARCH/defs.mk
95
96 cd $_TMPDIR/$_PLATFORM/libgcc
97 {
98 getvars $_PLATFORM/libgcc/Makefile \
99 enable_execute_stack \
100 unwind_header md_unwind_header \
101 sfp_machine_header thread_header
102 } | sanitise_includes \
103 | write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$_MACHINE_ARCH/gthr-defs.mk
104
105 if [ "${_MACHINE_ARCH}" = "m68000" ]
106 then
107 ex <<__EOF__ $_OUTDIR/lib/lib$_subdir/arch/$_MACHINE_ARCH/defs.mk
108 /G_LIBGCC2_CFLAGS/ s/-fPIC//
109 wq
110 __EOF__
111 fi
112
113 for f in auto-target.h; do
114 write_c $_OUTDIRBASE/lib/lib$_subdir/arch/$_MACHINE_ARCH/$f \
115 <$_TMPDIR/$_PLATFORM/libgcc/$f
116 done
117 }
118
119 ##### lib/libgcov #####
120
121 get_libgcov () {
122 _subdir="$1"
123 _mf="$2"
124
125 mkdir -p $_OUTDIR/lib/lib$_subdir/libgcov/arch/$_MACHINE_ARCH
126
127 {
128 getvars $_mf \
129 LIBGCOV_MERGE \
130 LIBGCOV_PROFILER \
131 LIBGCOV_INTERFACE \
132 LIBGCOV_DRIVER
133 } | write_mk $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$_MACHINE_ARCH/defs.mk
134
135 }
136
137 ##### lib/libiberty #####
138
139 get_gcc_libiberty () {
140 _subdir="$1"
141 _libibertydir="lib/libiberty"
142 mkdir -p $_OUTDIR/$_libibertydir/arch/$_MACHINE_ARCH
143
144 getvars libiberty/Makefile \
145 ALLOCA EXTRA_OFILES LIBOBJS REQUIRED_OFILES \
146 | write_mk $_OUTDIRBASE/$_libibertydir/defs.mk
147
148 write_c $_OUTDIRBASE/$_libibertydir/arch/$_MACHINE_ARCH/config.h \
149 <$_TMPDIR/libiberty/config.h
150 }
151
152 ##### lib/libdecnumber #####
153
154 get_libdecnumber () {
155 _subdir="$1"
156
157 mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH
158 write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/config.h \
159 <$_TMPDIR/libdecnumber/config.h
160 }
161
162 ##### lib/libgomp #####
163
164 get_libgomp () {
165 _subdir="$1"
166
167 mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
168
169 getvars $_PLATFORM/libgomp/Makefile \
170 libgomp_la_SOURCES \
171 | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
172
173 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/config.h \
174 <$_TMPDIR/$_PLATFORM/libgomp/config.h
175 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/libgomp_f.h \
176 <$_TMPDIR/$_PLATFORM/libgomp/libgomp_f.h
177 write_mk $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/libgomp.spec \
178 <$_TMPDIR/$_PLATFORM/libgomp/libgomp.spec
179 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/omp.h \
180 <$_TMPDIR/$_PLATFORM/libgomp/omp.h
181 }
182
183 ##### lib/libbacktrace #####
184
185 get_libbacktrace () {
186 _subdir="$1"
187
188 mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
189 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/config.h \
190 <$_TMPDIR/$_PLATFORM/$_subdir/config.h
191 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/backtrace-supported.h \
192 <$_TMPDIR/$_PLATFORM/$_subdir/backtrace-supported.h
193 }
194
195 ##### lib/libobjc #####
196
197 get_libobjc () {
198 _subdir="$1/arch/$_MACHINE_ARCH"
199 _options="ALL_OPT_FILES"
200
201 mkdir -p $_OUTDIR/lib/$_subdir
202
203 {
204 if [ -n "$_options" ]; then
205 getvars gcc/Makefile $_options
206 fi
207 getvars $_PLATFORM/libobjc/Makefile \
208 ALL_CFLAGS INCLUDES OBJC_SOURCE_FILES C_SOURCE_FILES OBJC_H \
209 | sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
210 } | sanitise_includes \
211 | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
212
213 write_c $_OUTDIRBASE/lib/$_subdir/config.h \
214 <$_TMPDIR/$_PLATFORM/libobjc/config.h
215 }
216
217 ##### lib/libstdc++-v3 #####
218
219 get_libstdcxx_v3 () {
220 _subdir="$1"
221 _ver="$2"
222
223 mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
224
225 _build_headers="c++config.h cxxabi_tweaks.h"
226 _headers1="backward_headers c_base_headers_extra"
227 _headers1="$_headers1 c_base_headers_extra_install"
228 _headers1="$_headers1 tr1_headers tr2_headers"
229 _headers1="$_headers1 decimal_headers c_compatibility_headers_install"
230 _headers1="$_headers1 debug_headers parallel_headers"
231 _headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
232 _headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
233 _headers1="$_headers1 bits_headers ext_headers host_headers"
234 _headers1="$_headers1 pstl_headers"
235 _headers1="$_headers1 profile_headers profile_impl_headers"
236 _headers1="$_headers1 experimental_headers experimental_bits_headers"
237 _headers1="$_headers1 ext_host_headers"
238
239 # build files
240 for h in $_build_headers; do
241 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/$h \
242 <$_TMPDIR/$_PLATFORM/libstdc++-v3/include/$_PLATFORM/bits/$h
243 done
244
245 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/gstdint.h \
246 <$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
247 write_c $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/symver-config.h \
248 <$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
249
250 {
251 getvars $_PLATFORM/libstdc++-v3/Makefile \
252 port_specific_symbol_files
253 getvars $_PLATFORM/libstdc++-v3/src/Makefile \
254 cxx11_sources \
255 cxx17_sources \
256 cxx20_sources \
257 cxx98_sources
258
259 # libsupc++
260 getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
261 sources | sed 's/^G_sources=/G_LIBSUPCXX_SOURCES=/'
262 getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
263 c_sources | sed 's/^G_c_sources=/G_LIBSUPCXX_C_SOURCES=/'
264
265 # includes
266 getvars $_PLATFORM/libstdc++-v3/include/Makefile \
267 c_base_headers std_headers | sed -e 's#/[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
268
269 # src
270 getvars $_PLATFORM/libstdc++-v3/src/Makefile \
271 libstdc___la_SOURCES | sed 's/^G_libstdc___la_SOURCES=/G_SRC_SOURCES=/'
272 getvars $_PLATFORM/libstdc++-v3/src/libbacktrace/Makefile \
273 libstdc___libbacktrace_la_OBJECTS libstdc___libbacktrace_la_DEPENDENCIES | \
274 sed -e 's/^G_libstdc___libbacktrace_la_OBJECTS=/G_LIBBACKTRACE_SOURCES=/' \
275 -e 's/^G_libstdc___libbacktrace_la_DEPENDENCIES=/G_LIBBACKTRACE_DEPS=/' \
276 -e 's/std_stacktrace-//g' -e 's/\.lo/.c/g'
277 getvars $_PLATFORM/libstdc++-v3/src/c++17/Makefile \
278 libc__17convenience_la_SOURCES | \
279 sed -e 's/^G_libc__17convenience_la_SOURCES=/G_CPP17_SOURCES=/'
280 getvars $_PLATFORM/libstdc++-v3/src/c++20/Makefile \
281 libc__20convenience_la_SOURCES | \
282 sed -e 's/^G_libc__20convenience_la_SOURCES=/G_CPP20_SOURCES=/'
283 getvars $_PLATFORM/libstdc++-v3/src/c++11/Makefile \
284 libc__11convenience_la_SOURCES | \
285 sed -e 's/^G_libc__11convenience_la_SOURCES=/G_CPP11_SOURCES=/'
286 getvars $_PLATFORM/libstdc++-v3/src/c++98/Makefile \
287 GLIBCXX_ABI_FLAGS libc__98convenience_la_SOURCES | \
288 sed -e 's/^G_libc__98convenience_la_SOURCES=/G_CPP98_SOURCES=/'
289 getvars $_PLATFORM/libstdc++-v3/src/filesystem/Makefile \
290 libstdc__fs_la_SOURCES | \
291 sed -e 's/^G_libstdc__fs_la_SOURCES=/G_FILESYSTEM_SOURCES=/'
292 getvars $_PLATFORM/libstdc++-v3/Makefile ATOMICITY_SRCDIR \
293 BASIC_FILE_CC CLOCALE_CC CCODECVT_CC CCOLLATE_CC \
294 CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC \
295 CPU_OPT_BITS_RANDOM
296
297 # includes
298 getvars $_PLATFORM/libstdc++-v3/include/Makefile \
299 $_headers1 | \
300 sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' \
301 -e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
302 getvars $_PLATFORM/libstdc++-v3/include/Makefile \
303 BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
304 } | sanitise_includes \
305 | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/defs.mk
306 }
307
308 ##### lib/libsanitizer #####
309
310 get_libsanitizer () {
311 _subdir="$1"
312
313 mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
314
315 {
316 getvars $_PLATFORM/libsanitizer/asan/Makefile \
317 asan_files
318 getvars $_PLATFORM/libsanitizer/lsan/Makefile \
319 lsan_files
320 getvars $_PLATFORM/libsanitizer/tsan/Makefile \
321 tsan_files
322 getvars $_PLATFORM/libsanitizer/ubsan/Makefile \
323 ubsan_files
324 getvars $_PLATFORM/libsanitizer/interception/Makefile \
325 interception_files
326
327 } | sanitise_includes \
328 | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/defs.mk
329 }
330
331 ##### usr.bin/gcc* #####
332
333 get_gcc_bootstrap () {
334 _subdir="$1"
335 mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH
336 for f in auto-host tm config; do
337 write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
338 done
339 # XXXGCC5 don't really want to copy insn-modes as we build
340 # it but libgcc needs to too early yet
341 for f in insn-modes; do
342 write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
343 done
344 }
345
346 get_gcc () {
347 _subdir="$1"
348 mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH
349 mkdir -p $_OUTDIR/usr.bin/libcpp/arch/$_MACHINE_ARCH
350 mkdir -p $_OUTDIR/usr.bin/include/arch
351 mkdir -p $_OUTDIR/usr.bin/common-target/arch
352 _buildname="BUILD_"
353 _libcppsubdir=""
354 _extravars="TM_H ALL_OPT_FILES"
355 _hconfig_h=""
356 _extravars2="tm_file_list build_xm_include_list"
357 _extravars3="tm_p_include_list"
358
359 {
360 getvars gcc/Makefile \
361 ${_buildname}EARLY_SUPPORT ${_buildname}ERRORS ${_buildname}PRINT \
362 ${_buildname}RTL ${_buildname}SUPPORT ${_buildname}VARRAY \
363 ${_buildname}MD | \
364 sed -e 's#build/errors.o#build-errors.o#g' \
365 -e 's#build/print-rtl.o#build-print-rtl.o#g' \
366 -e 's#build/rtl.o#build-rtl.o#g' \
367 -e 's#build/varray.o#build-varray.o#g' \
368 -e 's#build/ggc-none.o#build-ggc-none.o#g' \
369 -e 's#build/##g'
370 getvars gcc/Makefile \
371 ALL_CFLAGS ALL_CPPFLAGS C_AND_OBJC_OBJS C_OBJS CCCP_OBJS \
372 GCC_OBJS GCOV_OBJS GCOV_DUMP_OBJS GXX_OBJS GTM_H PROTO_OBJS ${_extravars1} \
373 INCLUDES md_file OBJC_OBJS OBJS out_file version \
374 BUILD_PREFIX RTL_H RTL_BASE_H TREE_H ${_hconfig_h} BASIC_BLOCK_H GCC_H \
375 D_TARGET_DEF \
376 GTFILES_SRCDIR GTFILES_FILES_FILES GTFILES_FILES_LANGS \
377 GTFILES GTFILES_LANG_DIR_NAMES HASH_TABLE_H \
378 NOEXCEPTION_FLAGS NATIVE_SYSTEM_HEADER_DIR \
379 tm_defines host_xm_file host_xm_defines tm_p_file \
380 target_cpu_default ${_extravars} ${_extravars2} \
381 lang_specs_files ${_extravars3} \
382 common_out_file \
383 | sanitise_includes
384 getvars gcc/Makefile \
385 LIB2ADDEHDEP | sed 's/unwind.inc//'
386 getvars gcc/Makefile \
387 CXX_OBJS CXX_C_OBJS | sed 's/cp\///g'
388 getvars gcc/Makefile \
389 F77_OBJS | sed 's/f\///g'
390 getvars libcpp/Makefile \
391 libcpp_a_OBJS
392 getvars gcc/Makefile \
393 ENABLE_SHARED
394 echo G_SHLIB_LINK="$CC -shared"
395 echo G_SHLIB_MULTILIB=.
396 } | write_mk $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/defs.mk
397
398 getvars gcc/Makefile \
399 EXTRA_HEADERS \
400 | write_mk $_OUTDIRBASE/usr.bin/include/arch/$_MACHINE_ARCH.mk
401
402 getvars gcc/Makefile \
403 OBJS-libcommon \
404 | write_mk $_OUTDIRBASE/usr.bin/common/defs.mk
405 getvars gcc/Makefile \
406 OBJS-libcommon-target \
407 | write_mk $_OUTDIRBASE/usr.bin/common-target/arch/$_MACHINE_ARCH.mk
408
409 write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$_MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
410 hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm omp-device-properties'
411 for f in $hfiles; do
412 write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
413 if [ "${_MACHINE_ARCH}" = "powerpc" -a "${f}" = "configargs" ]
414 then
415 ex <<__EOF__ $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h
416 /configuration_arguments/ s/$//
417 ya
418 i
419 #ifdef _SOFT_FLOAT
420 .
421 pu
422 s/";$/ -with-float=soft";/
423 a
424 #else
425 #endif
426 .
427 . m +1
428 /configure_default_options/ s/{ NULL.*$//
429 a
430 #ifdef _SOFT_FLOAT
431 { "float", "soft" },
432 #endif
433 { NULL, NULL }
434 };
435 .
436 wq
437 __EOF__
438 fi
439 if [ "${f}" = "configargs" ]
440 then
441 _srcquoted=$(echo "$_SRC" | sed 's/\//\\\//g')
442 sed -i -E -e "s,$_srcquoted,/usr/src,g" \
443 -e 's/--build=[^ ]+ --host=([^ ]+)/--build=\1 --host=\1/' \
444 $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h
445 fi
446 done
447
448 # keep identical
449 for f in all-tree.def; do
450 cp $_TMPDIR/gcc/$f $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f
451 done
452
453 # special transforms
454 for f in gtyp-input.list; do
455 sed -e "s@^.*$_OUTDIRBASE/dist@SRCDIR@" < $_TMPDIR/gcc/$f > $_OUTDIR/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f
456 done
457
458 # special platforms
459 if [ "${_MACHINE_ARCH}" = "sh3el" -o "${_MACHINE_ARCH}" = "sh3eb" ]; then
460 write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/sysroot-suffix.h <$_TMPDIR/gcc/sysroot-suffix.h
461 fi
462
463 if [ "${_MACHINE_ARCH}" = "i386" -o "${_MACHINE_ARCH}" = "x86_64" ]; then
464 write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/i386-builtin-types.inc <$_TMPDIR/gcc/i386-builtin-types.inc
465 fi
466
467 case "${_MACHINE_ARCH}" in
468 (*arm*)
469 d=$_OUTDIRBASE/usr.bin/$_subdir/arch/${_MACHINE_ARCH}
470 for f in arm-cpu.h arm-cpu-cdata.h arm-cpu-data.h arm-isa.h; do
471 write_c $d/$f <$_TMPDIR/gcc/$f
472 done
473 ;;
474 esac
475 }
476
477 ##### main #####
478
479 case "$1" in
480 # .mk and .h files for libgcc bootstrap (from host build)
481
482 libgcc*-bootstrap)
483 get_libgcc gcc
484 get_libgcov gcc $_PLATFORM/libgcc/Makefile
485 get_gcc_bootstrap gcc
486 exit 0
487 ;;
488
489 libstdc++-bootstrap)
490 get_libstdcxx_v3 libstdc++-v3 gcc
491 exit 0
492 ;;
493
494 gcc*)
495 get_gcc gcc
496 get_libgcc gcc
497 get_libgcov gcc $_PLATFORM/libgcc/Makefile
498 get_gcc_bootstrap gcc
499 get_gcc_libiberty gcc
500 get_libobjc libobjc
501 get_libstdcxx_v3 libstdc++-v3 gcc
502 # wants libstdc++-v3 built
503 # get_libsanitizer libsanitizer
504 get_libdecnumber libdecnumber
505 get_libgomp libgomp
506 get_libbacktrace libbacktrace
507 exit 0
508 ;;
509
510
511 *)
512 echo invalid arguments;
513 exit 1
514 ;;
515 esac
516