forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
3782 lines (3470 loc) · 118 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
# 2014, 2015, 2016, 2019, 2022 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
##############################################################################
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
m4_include(config/acx.m4)
m4_include(config/override.m4)
m4_include(config/proginstall.m4)
m4_include(config/elf.m4)
m4_include(config/ax_cxx_compile_stdcxx.m4)
m4_include([libtool.m4])
m4_include([ltoptions.m4])
m4_include([ltsugar.m4])
m4_include([ltversion.m4])
m4_include([lt~obsolete.m4])
m4_include([config/isl.m4])
AC_INIT(move-if-change)
AC_DISABLE_OPTION_CHECKING
progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
# Export original configure arguments for use by sub-configures.
# Quote arguments with shell meta charatcers.
TOPLEVEL_CONFIGURE_ARGUMENTS=
set -- "$progname" "$@"
for ac_arg
do
case "$ac_arg" in
*" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
# if the argument is of the form -foo=baz, quote the baz part only
ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
*) ;;
esac
# Add the quoted argument to the list.
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
done
if test "$silent" = yes; then
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
fi
# Remove the initial space we just introduced and, as these will be
# expanded by make, quote '$'.
TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
# Find the build, host, and target systems.
ACX_NONCANONICAL_BUILD
ACX_NONCANONICAL_HOST
ACX_NONCANONICAL_TARGET
dnl Autoconf 2.5x and later will set a default program prefix if
dnl --target was used, even if it was the same as --host. Disable
dnl that behavior. This must be done before AC_CANONICAL_SYSTEM
dnl to take effect.
test "$host_noncanonical" = "$target_noncanonical" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_transform_name=s,y,y,
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
m4_pattern_allow([^AS_FOR_TARGET$])dnl
m4_pattern_allow([^AS_FOR_BUILD$])dnl
# Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL
ACX_PROG_LN
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_AWK
srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
# We pass INSTALL explicitly to sub-makes. Make sure that it is not
# a relative path.
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
INSTALL="${srcpwd}/install-sh -c"
fi
# Set srcdir to "." if that's what it is.
# This is important for multilib support.
pwd=`${PWDCMD-pwd}`
if test "${pwd}" = "${srcpwd}" ; then
srcdir=.
fi
topsrcdir=$srcpwd
extra_host_args=
### To add a new directory to the tree, first choose whether it is a target
### or a host dependent tool. Then put it into the appropriate list
### (library or tools, host or target), doing a dependency sort.
# Subdirs will be configured in the order listed in build_configdirs,
# configdirs, or target_configdirs; see the serialization section below.
# Dependency sorting is only needed when *configuration* must be done in
# a particular order. In all cases a dependency should be specified in
# the Makefile, whether or not it's implicitly specified here.
# Double entries in build_configdirs, configdirs, or target_configdirs may
# cause circular dependencies and break everything horribly.
# these library is used by various programs built for the build
# environment
#
build_libs="build-libiberty build-libcpp"
# these tools are built for the build environment
build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
#f
host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
# know that we are building the simulator.
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
# Note that libiberty is not a target library.
target_libraries="target-libgcc \
target-libbacktrace \
target-libgloss \
target-newlib \
target-libgomp \
target-liboffloadmic \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
target-libsanitizer \
target-libvtv \
target-libssp \
target-libquadmath \
target-libgfortran \
target-libffi \
target-libobjc \
target-libada \
target-libgo \
target-libphobos \
target-zlib"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
#
# note: any program that *uses* libraries that are in the "target_libraries"
# list belongs in this list.
#
target_tools="target-rda"
################################################################################
## All tools belong in one of the four categories, and are assigned above
## We assign ${configdirs} this way to remove all embedded newlines. This
## is important because configure will choke if they ever get through.
## ${configdirs} is directories we build using the host tools.
## ${target_configdirs} is directories we build using the target tools.
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
build_configdirs=`echo ${build_libs} ${build_tools}`
m4_divert_text([PARSE_ARGS],
[case $srcdir in
*" "*)
m4_pushdef([AS_MESSAGE_LOG_FD], [])dnl
AC_MSG_ERROR([path to source, $srcdir, contains spaces])
m4_popdef([AS_MESSAGE_LOG_FD])dnl
;;
esac
ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'`
])
################################################################################
srcname="gnu development package"
# This gets set non-empty for some net releases of packages.
appdirs=""
# Define is_cross_compiler to save on calls to 'test'.
is_cross_compiler=
if test x"${host}" = x"${target}" ; then
is_cross_compiler=no
else
is_cross_compiler=yes
fi
# Find the build and target subdir names.
GCC_TOPLEV_SUBDIRS
# Be sure to cover against remnants of an in-tree build.
if test $srcdir != . && test -d $srcdir/host-${host_noncanonical}; then
AC_MSG_ERROR([building out of tree but $srcdir contains host-${host_noncanonical}.
Use a pristine source tree when building in a separate tree])
fi
# Skipdirs are removed silently.
skipdirs=
# Noconfigdirs are removed loudly.
noconfigdirs=""
use_gnu_ld=
# Make sure we don't let GNU ld be added if we didn't want it.
if test x$with_gnu_ld = xno ; then
use_gnu_ld=no
noconfigdirs="$noconfigdirs ld gold"
fi
use_gnu_as=
# Make sure we don't let GNU as be added if we didn't want it.
if test x$with_gnu_as = xno ; then
use_gnu_as=no
noconfigdirs="$noconfigdirs gas"
fi
use_included_zlib=
AC_ARG_WITH(system-zlib,
[AS_HELP_STRING([--with-system-zlib], [use installed libz])])
# Make sure we don't let ZLIB be added if we didn't want it.
if test x$with_system_zlib = xyes ; then
use_included_zlib=no
noconfigdirs="$noconfigdirs zlib"
fi
# some tools are so dependent upon X11 that if we're not building with X,
# it's not even worth trying to configure, much less build, that tool.
case ${with_x} in
yes | "") ;; # the default value for this tree is that X11 is available
no)
skipdirs="${skipdirs} tk itcl libgui"
# We won't be able to build gdbtk without X.
enable_gdbtk=no
;;
*) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
esac
# Some are only suitable for cross toolchains.
# Remove these if host=target.
cross_only="target-libgloss target-newlib target-opcodes"
case $is_cross_compiler in
no) skipdirs="${skipdirs} ${cross_only}" ;;
esac
# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
if test x"${with_headers}" != x && test x"${with_headers}" != xno \
&& test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x"${with_newlib}" = x ; then
with_newlib=no
fi
fi
# Recognize --with-newlib/--without-newlib.
case ${with_newlib} in
no) skipdirs="${skipdirs} target-newlib" ;;
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
AC_ARG_ENABLE(as-accelerator-for,
[AS_HELP_STRING([--enable-as-accelerator-for=ARG],
[build as offload target compiler.
Specify offload host triple by ARG])])
AC_ARG_ENABLE(offload-targets,
[AS_HELP_STRING([--enable-offload-targets=LIST],
[enable offloading to devices from comma-separated LIST of
TARGET[=DIR]. Use optional path to find offload target compiler
during the build])],
[
if test x"$enable_offload_targets" = x; then
AC_MSG_ERROR([no offload targets specified])
fi
], [enable_offload_targets=])
AC_ARG_ENABLE(offload-defaulted,
[AS_HELP_STRING([--enable-offload-defaulted]
[If enabled, configured but not installed offload compilers and
libgomp plugins are silently ignored. Useful for distribution
compilers where those are in separate optional packages.])],
[enable_offload_defaulted=$enableval],
[enable_offload_defaulted=])
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.
# --enable-gold [--enable-ld]
# Build both gold and ld. Install gold as "ld.gold", install ld
# as "ld.bfd" and "ld".
# --enable-gold=default [--enable-ld]
# Build both gold and ld. Install gold as "ld.gold" and "ld",
# install ld as "ld.bfd".
# --enable-gold[=default] --disable-ld
# Build only gold, which is then installed as both "ld.gold" and "ld".
# --enable-gold --enable-ld=default
# Build both gold (installed as "ld.gold") and ld (installed as "ld"
# and ld.bfd).
# In other words, ld is default
# --enable-gold=default --enable-ld=default
# Error.
default_ld=
AC_ARG_ENABLE(gold,
[AS_HELP_STRING([[--enable-gold[=ARG]]],
[build gold @<:@ARG={default,yes,no}@:>@])],
ENABLE_GOLD=$enableval,
ENABLE_GOLD=no)
case "${ENABLE_GOLD}" in
yes|default)
# Check for ELF target.
is_elf=no
case "${target}" in
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
| *-*-solaris2* | *-*-nto* | *-*-nacl*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)
;;
*)
is_elf=yes
;;
esac
esac
if test "$is_elf" = "yes"; then
# Check for target supported by gold.
case "${target}" in
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
| aarch64*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
configdirs="$configdirs gold"
if test x${ENABLE_GOLD} = xdefault; then
default_ld=gold
fi
ENABLE_GOLD=yes
;;
esac
fi
;;
no)
;;
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac
AC_ARG_ENABLE(ld,
[AS_HELP_STRING([[--enable-ld[=ARG]]],
[build ld @<:@ARG={default,yes,no}@:>@])],
ENABLE_LD=$enableval,
ENABLE_LD=yes)
case "${ENABLE_LD}" in
default)
if test x${default_ld} != x; then
AC_MSG_ERROR([either gold or ld can be the default ld])
fi
;;
yes)
;;
no)
if test x${ENABLE_GOLD} != xyes; then
AC_MSG_WARN([neither ld nor gold are enabled])
fi
configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'`
;;
*)
AC_MSG_ERROR([invalid --enable-ld argument])
;;
esac
# PR gas/19109
# Decide the default method for compressing debug sections.
# Provide a configure time option to override our default.
AC_ARG_ENABLE(compressed_debug_sections,
[AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,gold,ld,none}],
[Enable compressed debug sections for gas, gold or ld by
default])],
[
if test x"$enable_compressed_debug_sections" = xyes; then
AC_MSG_ERROR([no program with compressed debug sections specified])
fi
], [enable_compressed_debug_sections=])
# Configure extra directories which are host specific
case "${host}" in
*-cygwin*)
configdirs="$configdirs libtermcap" ;;
esac
# A target can indicate whether a language isn't supported for some reason.
# Only spaces may be used in this macro; not newlines or tabs.
unsupported_languages=
# Remove more programs from consideration, based on the host or
# target this usually means that a port of the program doesn't
# exist yet.
case "${host}" in
i[[3456789]]86-*-msdosdjgpp*)
noconfigdirs="$noconfigdirs tcl tk itcl"
;;
esac
AC_ARG_ENABLE(libquadmath,
AS_HELP_STRING([--disable-libquadmath],
[do not build libquadmath directory]),
ENABLE_LIBQUADMATH=$enableval,
ENABLE_LIBQUADMATH=yes)
if test "${ENABLE_LIBQUADMATH}" = "no" ; then
noconfigdirs="$noconfigdirs target-libquadmath"
fi
AC_ARG_ENABLE(libquadmath-support,
AS_HELP_STRING([--disable-libquadmath-support],
[disable libquadmath support for Fortran]),
ENABLE_LIBQUADMATH_SUPPORT=$enableval,
ENABLE_LIBQUADMATH_SUPPORT=yes)
enable_libquadmath_support=
if test "${ENABLE_LIBQUADMATH_SUPPORT}" = "no" ; then
enable_libquadmath_support=no
fi
AC_ARG_ENABLE(libada,
[AS_HELP_STRING([--enable-libada], [build libada directory])],
ENABLE_LIBADA=$enableval,
ENABLE_LIBADA=yes)
if test "${ENABLE_LIBADA}" != "yes" ; then
noconfigdirs="$noconfigdirs gnattools"
fi
AC_ARG_ENABLE(libssp,
[AS_HELP_STRING([--enable-libssp], [build libssp directory])],
ENABLE_LIBSSP=$enableval,
ENABLE_LIBSSP=yes)
AC_ARG_ENABLE(libstdcxx,
AS_HELP_STRING([--disable-libstdcxx],
[do not build libstdc++-v3 directory]),
ENABLE_LIBSTDCXX=$enableval,
ENABLE_LIBSTDCXX=default)
[if test "${ENABLE_LIBSTDCXX}" = "no" ; then
noconfigdirs="$noconfigdirs target-libstdc++-v3"
fi]
# If this is accelerator compiler and its target is intelmic we enable
# target liboffloadmic by default. If this is compiler with offloading
# for intelmic we enable host liboffloadmic by default. Otherwise
# liboffloadmic is disabled by default.
AC_ARG_ENABLE([liboffloadmic],
AC_HELP_STRING([[--enable-liboffloadmic[=ARG]]],
[build liboffloadmic @<:@ARG={no,host,target}@:>@]),
[case "$enableval" in
no | host | target)
enable_liboffloadmic=$enableval ;;
*)
AC_MSG_ERROR([--enable-liboffloadmic=no/host/target]) ;;
esac],
[if test x"$enable_as_accelerator_for" != x; then
case "${target}" in
*-intelmic-* | *-intelmicemul-*)
enable_liboffloadmic=target
extra_liboffloadmic_configure_flags="--enable-liboffloadmic=target"
;;
*)
enable_liboffloadmic=no
;;
esac
else
case "${enable_offload_targets}" in
*-intelmic-* | *-intelmicemul-*)
enable_liboffloadmic=host
extra_liboffloadmic_configure_flags="--enable-liboffloadmic=host"
;;
*)
enable_liboffloadmic=no
;;
esac
fi])
AC_SUBST(extra_liboffloadmic_configure_flags)
# Enable libgomp by default on hosted POSIX systems, and a few others.
if test x$enable_libgomp = x ; then
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
;;
*-*-solaris2* | *-*-hpux11*)
;;
*-*-darwin* | *-*-aix*)
;;
nvptx*-*-* | amdgcn*-*-*)
;;
*)
noconfigdirs="$noconfigdirs target-libgomp"
;;
esac
fi
# Disable libatomic on unsupported systems.
if test -d ${srcdir}/libatomic; then
if test x$enable_libatomic = x; then
AC_MSG_CHECKING([for libatomic support])
if (srcdir=${srcdir}/libatomic; \
. ${srcdir}/configure.tgt; \
test -n "$UNSUPPORTED")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-libatomic"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable liboffloadmic on unsupported systems.
if test -d ${srcdir}/liboffloadmic; then
if test x$enable_liboffloadmic != xno; then
AC_MSG_CHECKING([for liboffloadmic support])
if (srcdir=${srcdir}/liboffloadmic; \
. ${srcdir}/configure.tgt; \
test -n "$UNSUPPORTED")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-liboffloadmic"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable libitm on unsupported systems.
if test -d ${srcdir}/libitm; then
if test x$enable_libitm = x; then
AC_MSG_CHECKING([for libitm support])
if (srcdir=${srcdir}/libitm; \
. ${srcdir}/configure.tgt; \
test -n "$UNSUPPORTED")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-libitm"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable libsanitizer on unsupported systems.
if test -d ${srcdir}/libsanitizer; then
if test x$enable_libsanitizer = x; then
AC_MSG_CHECKING([for libsanitizer support])
if (srcdir=${srcdir}/libsanitizer; \
. ${srcdir}/configure.tgt; \
test -n "$UNSUPPORTED")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-libsanitizer"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable libvtv on unsupported systems.
if test -d ${srcdir}/libvtv; then
if test x$enable_libvtv = x; then
AC_MSG_CHECKING([for libvtv support])
if (srcdir=${srcdir}/libvtv; \
. ${srcdir}/configure.tgt; \
test "$VTV_SUPPORTED" != "yes")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-libvtv"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable libquadmath for some systems.
case "${target}" in
avr-*-*)
noconfigdirs="$noconfigdirs target-libquadmath"
;;
# libquadmath is unused on AIX and libquadmath build process use of
# LD_LIBRARY_PATH can break AIX bootstrap.
powerpc-*-aix* | rs6000-*-aix*)
noconfigdirs="$noconfigdirs target-libquadmath"
;;
esac
# Disable libssp for some systems.
case "${target}" in
avr-*-*)
# No hosted I/O support.
noconfigdirs="$noconfigdirs target-libssp"
;;
bpf-*-*)
noconfigdirs="$noconfigdirs target-libssp"
;;
powerpc-*-aix* | rs6000-*-aix*)
noconfigdirs="$noconfigdirs target-libssp"
;;
pru-*-*)
# No hosted I/O support.
noconfigdirs="$noconfigdirs target-libssp"
;;
rl78-*-*)
# libssp uses a misaligned load to trigger a fault, but the RL78
# doesn't fault for those - instead, it gives a build-time error
# for explicit misaligned loads.
noconfigdirs="$noconfigdirs target-libssp"
;;
visium-*-*)
# No hosted I/O support.
noconfigdirs="$noconfigdirs target-libssp"
;;
esac
# Disable libstdc++-v3 for some systems.
# Allow user to override this if they pass --enable-libstdcxx
if test "${ENABLE_LIBSTDCXX}" = "default" ; then
case "${target}" in
*-*-vxworks*)
# VxWorks uses the Dinkumware C++ library.
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
amdgcn*-*-*)
# Not ported/fails to build when using newlib.
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
arm*-wince-pe*)
# the C++ libraries don't build on top of CE's C libraries
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
avr-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
bpf-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
esac
fi
# Disable C++ on systems where it is known to not work.
# For testing, you can override this with --enable-languages=c++.
case ,${enable_languages}, in
*,c++,*)
;;
*)
case "${target}" in
bpf-*-*)
unsupported_languages="$unsupported_languages c++"
;;
esac
;;
esac
# Disable Objc on systems where it is known to not work.
# For testing, you can override this with --enable-languages=objc.
case ,${enable_languages}, in
*,objc,*)
;;
*)
case "${target}" in
bpf-*-*)
unsupported_languages="$unsupported_languages objc"
;;
esac
;;
esac
# Disable D on systems where it is known to not work.
# For testing, you can override this with --enable-languages=d.
case ,${enable_languages}, in
*,d,*)
;;
*)
case "${target}" in
bpf-*-*)
unsupported_languages="$unsupported_languages d"
;;
esac
;;
esac
# Disable libphobos on unsupported systems.
# For testing, you can override this with --enable-libphobos.
if test -d ${srcdir}/libphobos; then
if test x$enable_libphobos = x; then
AC_MSG_CHECKING([for libphobos support])
if (srcdir=${srcdir}/libphobos; \
. ${srcdir}/configure.tgt; \
test "$LIBPHOBOS_SUPPORTED" != "yes")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs target-libphobos"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable Fortran for some systems.
case "${target}" in
mmix-*-*)
# See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>.
unsupported_languages="$unsupported_languages fortran"
;;
bpf-*-*)
unsupported_languages="$unsupported_languages fortran"
;;
esac
# Disable libffi for some systems.
case "${target}" in
powerpc-*-darwin*)
;;
i[[3456789]]86-*-darwin*)
;;
x86_64-*-darwin[[912]]*)
;;
*-*-darwin*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-netware*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-phoenix*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-tpf*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-uclinux*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-vxworks*)
noconfigdirs="$noconfigdirs target-libffi"
;;
aarch64*-*-freebsd*)
noconfigdirs="$noconfigdirs target-libffi"
;;
alpha*-*-*vms*)
noconfigdirs="$noconfigdirs target-libffi"
;;
arm*-*-freebsd*)
noconfigdirs="$noconfigdirs target-libffi"
;;
arm-wince-pe)
noconfigdirs="$noconfigdirs target-libffi"
;;
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs target-libffi"
;;
bpf-*-*)
noconfigdirs="$noconfigdirs target-libffi"
;;
cris-*-* | crisv32-*-*)
case "${target}" in
*-*-linux*)
;;
*) # See PR46792 regarding target-libffi.
noconfigdirs="$noconfigdirs target-libffi";;
esac
;;
hppa*64*-*-hpux*)
noconfigdirs="$noconfigdirs target-libffi"
;;
ia64*-*-*vms*)
noconfigdirs="$noconfigdirs target-libffi"
;;
i[[3456789]]86-w64-mingw*)
noconfigdirs="$noconfigdirs target-libffi"
;;
i[[3456789]]86-*-mingw*)
noconfigdirs="$noconfigdirs target-libffi"
;;
x86_64-*-mingw*)
noconfigdirs="$noconfigdirs target-libffi"
;;
mmix-*-*)
noconfigdirs="$noconfigdirs target-libffi"
;;
powerpc-*-aix*)
;;
rs6000-*-aix*)
;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs target-libffi"
;;
esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
*-*-darwin* | *-*-cygwin* | *-*-mingw* | bpf-* )
unsupported_languages="$unsupported_languages go"
;;
esac
# Only allow gdbserver on some systems.
if test -d ${srcdir}/gdbserver; then
if test x$enable_gdbserver = x; then
AC_MSG_CHECKING([for gdbserver support])
if (srcdir=${srcdir}/gdbserver; \
. ${srcdir}/configure.srv; \
test -n "$UNSUPPORTED")
then
AC_MSG_RESULT([no])
noconfigdirs="$noconfigdirs gdbserver"
else
AC_MSG_RESULT([yes])
fi
fi
fi
# Disable libgo for some systems where it is known to not work.
# For testing, you can easily override this with --enable-libgo.
if test x$enable_libgo = x; then
case "${target}" in
*-*-darwin*)
# PR 46986
noconfigdirs="$noconfigdirs target-libgo"
;;
*-*-cygwin* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
bpf-*-*)
noconfigdirs="$noconfigdirs target-libgo"
;;
esac
fi
# Default libgloss CPU subdirectory.
libgloss_dir="$target_cpu"
case "${target}" in
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
libgloss_dir=wince
;;
aarch64*-*-* )
libgloss_dir=aarch64
;;
arm*-*-*)
libgloss_dir=arm
;;
cris-*-* | crisv32-*-*)
libgloss_dir=cris
;;
hppa*-*-*)
libgloss_dir=pa
;;
i[[3456789]]86-*-*)
libgloss_dir=i386
;;
loongarch*-*-*)
libgloss_dir=loongarch
;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
libgloss_dir=m68hc11
;;
m68*-*-* | fido-*-*)
libgloss_dir=m68k
;;
mips*-*-*)
libgloss_dir=mips
;;
powerpc*-*-*)
libgloss_dir=rs6000
;;
pru-*-*)
libgloss_dir=pru
;;
sparc*-*-*)
libgloss_dir=sparc
;;
esac
# Disable newlib and libgloss for various target OSes.
case "${target}" in
alpha*-dec-osf*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
i[[3456789]]86-*-linux*)
# This section makes it possible to build newlib natively on linux.
# If we are using a cross compiler then don't configure newlib.
if test x${is_cross_compiler} != xno ; then
noconfigdirs="$noconfigdirs target-newlib"
fi
noconfigdirs="$noconfigdirs target-libgloss"
# If we are not using a cross compiler, do configure newlib.
# Note however, that newlib will only be configured in this situation
# if the --with-newlib option has been given, because otherwise
# 'target-newlib' will appear in skipdirs.
;;
i[[3456789]]86-*-rdos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
sh*-*-pe|mips*-*-pe|arm-wince-pe)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
sparc-*-sunos4*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
bpf-*-*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-aix*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-beos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-dragonfly*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-freebsd*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-mingw*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-netbsd*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-netware*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-tpf*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-uclinux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-vxworks*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
esac
case "${target}" in
*-*-chorusos)
;;
aarch64-*-darwin*)
noconfigdirs="$noconfigdirs ld gas gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
amdgcn*-*-*)
;;
arm-*-darwin*)
noconfigdirs="$noconfigdirs ld gas gdb gprof"