1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= GNU Compiler collection (GCC), Series 7
8 HOMEPAGE= https://gcc.gnu.org/
9 CONTACT= John_Marino[draco@marino.st]
12 SITES[main]= GCC/releases/gcc-7.3.0
13 DISTFILE[1]= gcc-7.3.0.tar.xz:main
15 SPKGS[standard]= complete
23 OPTIONS_AVAILABLE= none
24 OPTIONS_STANDARD= none
26 BUILD_DEPENDS= gmp:static:standard
30 BUILDRUN_DEPENDS= binutils:single:ravensys
31 EXRUN[fortran_run]= gcc7:libs:standard
32 EXRUN[cxx_run]= gcc7:libs:standard
33 EXRUN[compilers]= gcc7:cxx_run:standard
34 EXRUN[ada_run]= gcc7:libs:standard
36 USES= cpe gmake iconv:build libtool makeinfo perl:build
40 LICENSE= GPLv2+:compilers LGPL21:compilers GPLv3+:compilers
41 LGPL3:compilers GPLv3RLE:compilers
42 LICENSE_FILE= GPLv2+:{{WRKSRC}}/COPYING
43 LGPL21:{{WRKSRC}}/COPYING.LIB
44 GPLv3+:{{WRKSRC}}/COPYING3
45 LGPL3:{{WRKSRC}}/COPYING3.LIB
46 GPLv3RLE:{{WRKSRC}}/COPYING.RUNTIME
49 PREFIX= {{LOCALBASE}}/toolchain/{{NAMEBASE}}
51 infopages:cppinternals
63 FPC_EQUIVALENT= lang/gcc7
67 CONFIGURE_OUTSOURCE= yes
68 CONFIGURE_ARGS= --enable-languages="c,c++,ada,fortran"
69 --with-local-prefix={{LOCALBASE}}
71 --with-gmp={{LOCALBASE}}
72 --with-mpc={{LOCALBASE}}
73 --with-mpfr={{LOCALBASE}}
74 {{ICONV_CONFIGURE_ARG}}
76 --enable-threads=posix
77 --enable-checking=release
81 --disable-libsanitizer
86 --with-as={{LOCALBASE}}/toolchain/bin/as
87 --with-ld={{LOCALBASE}}/toolchain/bin/ld
88 --with-pkgversion="Ravenports"
90 INSTALL_TARGET= install-strip
91 PLIST_SUB= GCCVER=7.3.0
92 TARGET={{CONFIGURE_TARGET}}
94 VAR_OPSYS[freebsd]= CONFIGURE_ARGS=--disable-libstdcxx-pch
95 VAR_OPSYS[sunos]= CONFIGURE_ARGS=--without-gnu-ld
98 # Update LINK_SPEC to add gcc-aux lib runpath in every binary
99 @${ECHO} "Configuring LINK_SPEC runpath"
100 ${REINPLACE_CMD} -e 's;\@PREFIX\@;${PREFIX:H};' \
101 -e 's;\@GCCAUX\@;${NAMEBASE};' \
102 ${WRKSRC}/gcc/config/dragonfly.h \
103 ${WRKSRC}/gcc/config/sol2.h \
104 ${WRKSRC}/gcc/config/i386/freebsd64.h \
105 ${WRKSRC}/gcc/config/i386/freebsd.h \
106 ${WRKSRC}/gcc/config/i386/gnu-user64.h \
107 ${WRKSRC}/gcc/config/aarch64/aarch64-freebsd.h
108 # Ensure dwarf4-compatible addr2line
109 ${REINPLACE_CMD} -e 's|/usr/bin/addr2line|${PREFIX:H}/bin/addr2line|g'\
110 ${WRKSRC}/gcc/ada/traceback_symbolic.c
111 ${REINPLACE_CMD} -e 's|static:crtbeginT.o%s;||' \
112 ${WRKSRC}/gcc/config/freebsd-spec.h
114 post-install-freebsd:
115 ${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.3.0/include-fixed
117 post-install-dragonfly:
118 ${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.3.0/include-fixed
121 cp ${STAGEDIR}${PREFIX}/bin/gcc ${STAGEDIR}${PREFIX}/bin/cc
122 cp ${STAGEDIR}${PREFIX}/bin/g++ ${STAGEDIR}${PREFIX}/bin/CC
123 ${RM} ${STAGEDIR}${MANPREFIX}/man/man7/*
124 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.3.0/adalib/libgnarl.so
125 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.3.0/adalib/libgnat.so
128 ${REINPLACE_CMD} -e 's|cp -p -r |cp -RP |' \
129 ${WRKSRC}/gcc/Makefile.in
130 ${REINPLACE_CMD} -e 's| install-gcc-specs||' \
131 ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
133 [FILE:329:descriptions/desc.compilers]
134 This is series 7 of the GNU Compiler Collection (GCC)
136 This compiler supports the following languages: C, C++, Fortran and Ada.
137 The GNAT front-end implements the full Ada-83, Ada-95, Ada-2005 and
138 Ada-2012 standards. The C++ front-end defaults to the gnu++14 standard.
140 This package contains the compilers, drivers, and headers.
143 [FILE:104:descriptions/desc.ada_run]
144 This is series 7 of the GNU Compiler Collection (GCC)
146 This package contains the Ada runtime libraries.
149 [FILE:104:descriptions/desc.cxx_run]
150 This is series 7 of the GNU Compiler Collection (GCC)
152 This package contains the C++ runtime libraries.
155 [FILE:108:descriptions/desc.fortran_run]
156 This is series 7 of the GNU Compiler Collection (GCC)
158 This package contains the Fortran runtime libraries.
161 [FILE:162:descriptions/desc.libs]
162 This is series 7 of the GNU Compiler Collection (GCC)
164 This package contains the remaining runtime libraries after excluding
165 the Ada, C++, and Fortran libraries.
168 [FILE:126:descriptions/desc.infopages]
169 This is series 7 of the GNU Compiler Collection (GCC)
171 This package contains the man pages and info pages that come with GCC.
175 832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c 62462388 gcc-7.3.0.tar.xz
178 [FILE:26403:manifests/plist.compilers]
179 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk.h
180 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_api.h
181 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_api_linux.h
182 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_stub.h
183 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_undocumented.h
184 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/common.h
185 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/holder.h
186 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/hyperobject_base.h
187 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/metaprogramming.h
188 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer.h
189 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_file.h
190 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_list.h
191 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_max.h
192 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_min.h
193 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_min_max.h
194 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opadd.h
195 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opand.h
196 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opmul.h
197 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opor.h
198 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opxor.h
199 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_ostream.h
200 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_string.h
201 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/
204 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/include/tgmath.h
205 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
208 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/dragonfly.h
209 %%ONLY-FREEBSD%%lib/gcc/%%TARGET%%/%%GCCVER%%/
212 %%ONLY-FREEBSD%%lib/gcc/%%TARGET%%/%%GCCVER%%/include/tgmath.h
213 %%ONLY-FREEBSD%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
217 %%ONLY-FREEBSD%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
220 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/
228 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/
232 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/linux/a.out.h
233 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
239 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
247 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/
253 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include/tgmath.h
254 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/
263 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/dat/dat_platform_specific.h
264 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/iso/
270 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/mps/secport.h
271 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/netinet/
279 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/sys/
284 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
288 %%ONLY-SUNOS%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
295 %%TARGET%%-gcc-%%GCCVER%%
298 %%TARGET%%-gcc-ranlib
326 include/c++/%%GCCVER%%/
416 include/c++/%%GCCVER%%/%%TARGET%%/bits/
439 include/c++/%%GCCVER%%/%%TARGET%%/ext/opt_random.h
440 include/c++/%%GCCVER%%/backward/
449 include/c++/%%GCCVER%%/bits/
456 atomic_lockfree_defines.h
461 boost_concept_check.h
469 cxxabi_init_exception.h
471 enable_special_members.h
495 locale_facets_nonio.h
496 locale_facets_nonio.tcc
543 stl_iterator_base_funcs.h
544 stl_iterator_base_types.h
552 stl_raw_storage_iter.h
575 include/c++/%%GCCVER%%/debug/
595 safe_local_iterator.h
596 safe_local_iterator.tcc
599 safe_unordered_base.h
600 safe_unordered_container.h
601 safe_unordered_container.tcc
609 include/c++/%%GCCVER%%/decimal/
612 include/c++/%%GCCVER%%/experimental/
643 include/c++/%%GCCVER%%/experimental/bits/
652 include/c++/%%GCCVER%%/ext/
661 codecvt_specializations.h
697 include/c++/%%GCCVER%%/ext/pb_ds/
701 list_update_policy.hpp
706 include/c++/%%GCCVER%%/ext/pb_ds/detail/
708 container_base_dispatch.hpp
710 priority_queue_base_dispatch.hpp
711 standard_policies.hpp
715 include/c++/%%GCCVER%%/ext/pb_ds/detail/bin_search_tree_/
717 constructors_destructor_fn_imps.hpp
723 iterators_fn_imps.hpp
726 policy_access_fn_imps.hpp
729 split_join_fn_imps.hpp
731 include/c++/%%GCCVER%%/ext/pb_ds/detail/binary_heap_/
734 constructors_destructor_fn_imps.hpp
742 iterators_fn_imps.hpp
743 point_const_iterator.hpp
744 policy_access_fn_imps.hpp
746 split_join_fn_imps.hpp
748 include/c++/%%GCCVER%%/ext/pb_ds/detail/binomial_heap_/
750 constructors_destructor_fn_imps.hpp
752 include/c++/%%GCCVER%%/ext/pb_ds/detail/binomial_heap_base_/
753 binomial_heap_base_.hpp
754 constructors_destructor_fn_imps.hpp
759 split_join_fn_imps.hpp
760 include/c++/%%GCCVER%%/ext/pb_ds/detail/branch_policy/
762 null_node_metadata.hpp
764 include/c++/%%GCCVER%%/ext/pb_ds/detail/cc_hash_table_map_/
767 cond_key_dtor_entry_dealtor.hpp
768 constructor_destructor_fn_imps.hpp
769 constructor_destructor_no_store_hash_fn_imps.hpp
770 constructor_destructor_store_hash_fn_imps.hpp
772 debug_no_store_hash_fn_imps.hpp
773 debug_store_hash_fn_imps.hpp
774 entry_list_fn_imps.hpp
776 erase_no_store_hash_fn_imps.hpp
777 erase_store_hash_fn_imps.hpp
779 find_store_hash_fn_imps.hpp
782 insert_no_store_hash_fn_imps.hpp
783 insert_store_hash_fn_imps.hpp
784 iterators_fn_imps.hpp
785 policy_access_fn_imps.hpp
787 resize_no_store_hash_fn_imps.hpp
788 resize_store_hash_fn_imps.hpp
791 include/c++/%%GCCVER%%/ext/pb_ds/detail/eq_fn/
794 include/c++/%%GCCVER%%/ext/pb_ds/detail/gp_hash_table_map_/
795 constructor_destructor_fn_imps.hpp
796 constructor_destructor_no_store_hash_fn_imps.hpp
797 constructor_destructor_store_hash_fn_imps.hpp
799 debug_no_store_hash_fn_imps.hpp
800 debug_store_hash_fn_imps.hpp
802 erase_no_store_hash_fn_imps.hpp
803 erase_store_hash_fn_imps.hpp
805 find_no_store_hash_fn_imps.hpp
806 find_store_hash_fn_imps.hpp
810 insert_no_store_hash_fn_imps.hpp
811 insert_store_hash_fn_imps.hpp
813 policy_access_fn_imps.hpp
815 resize_no_store_hash_fn_imps.hpp
816 resize_store_hash_fn_imps.hpp
818 include/c++/%%GCCVER%%/ext/pb_ds/detail/hash_fn/
819 direct_mask_range_hashing_imp.hpp
820 direct_mod_range_hashing_imp.hpp
821 linear_probe_fn_imp.hpp
822 mask_based_range_hashing.hpp
823 mod_based_range_hashing.hpp
825 quadratic_probe_fn_imp.hpp
829 sample_range_hashing.hpp
830 sample_ranged_hash_fn.hpp
831 sample_ranged_probe_fn.hpp
832 include/c++/%%GCCVER%%/ext/pb_ds/detail/left_child_next_sibling_heap_/
834 constructors_destructor_fn_imps.hpp
839 iterators_fn_imps.hpp
840 left_child_next_sibling_heap_.hpp
842 point_const_iterator.hpp
843 policy_access_fn_imps.hpp
845 include/c++/%%GCCVER%%/ext/pb_ds/detail/list_update_map_/
846 constructor_destructor_fn_imps.hpp
848 entry_metadata_base.hpp
853 iterators_fn_imps.hpp
856 include/c++/%%GCCVER%%/ext/pb_ds/detail/list_update_policy/
857 lu_counter_metadata.hpp
858 sample_update_policy.hpp
859 include/c++/%%GCCVER%%/ext/pb_ds/detail/ov_tree_map_/
860 constructors_destructor_fn_imps.hpp
865 iterators_fn_imps.hpp
868 policy_access_fn_imps.hpp
869 split_join_fn_imps.hpp
871 include/c++/%%GCCVER%%/ext/pb_ds/detail/pairing_heap_/
872 constructors_destructor_fn_imps.hpp
878 split_join_fn_imps.hpp
879 include/c++/%%GCCVER%%/ext/pb_ds/detail/pat_trie_/
880 constructors_destructor_fn_imps.hpp
885 insert_join_fn_imps.hpp
886 iterators_fn_imps.hpp
889 policy_access_fn_imps.hpp
893 synth_access_traits.hpp
897 include/c++/%%GCCVER%%/ext/pb_ds/detail/rb_tree_map_/
898 constructors_destructor_fn_imps.hpp
906 split_join_fn_imps.hpp
908 include/c++/%%GCCVER%%/ext/pb_ds/detail/rc_binomial_heap_/
909 constructors_destructor_fn_imps.hpp
914 rc_binomial_heap_.hpp
915 split_join_fn_imps.hpp
917 include/c++/%%GCCVER%%/ext/pb_ds/detail/resize_policy/
918 cc_hash_max_collision_check_resize_trigger_imp.hpp
919 hash_exponential_size_policy_imp.hpp
920 hash_load_check_resize_trigger_imp.hpp
921 hash_load_check_resize_trigger_size_base.hpp
922 hash_prime_size_policy_imp.hpp
923 hash_standard_resize_policy_imp.hpp
924 sample_resize_policy.hpp
925 sample_resize_trigger.hpp
926 sample_size_policy.hpp
927 include/c++/%%GCCVER%%/ext/pb_ds/detail/splay_tree_/
928 constructors_destructor_fn_imps.hpp
937 split_join_fn_imps.hpp
939 include/c++/%%GCCVER%%/ext/pb_ds/detail/thin_heap_/
940 constructors_destructor_fn_imps.hpp
945 split_join_fn_imps.hpp
948 include/c++/%%GCCVER%%/ext/pb_ds/detail/tree_policy/
949 node_metadata_selector.hpp
950 order_statistics_imp.hpp
951 sample_tree_node_update.hpp
952 include/c++/%%GCCVER%%/ext/pb_ds/detail/trie_policy/
953 node_metadata_selector.hpp
954 order_statistics_imp.hpp
955 prefix_search_node_update_imp.hpp
956 sample_trie_access_traits.hpp
957 sample_trie_node_update.hpp
959 trie_string_access_traits_imp.hpp
960 include/c++/%%GCCVER%%/ext/pb_ds/detail/unordered_iterator/
963 point_const_iterator.hpp
965 include/c++/%%GCCVER%%/parallel/
975 compiletime_settings.h
1009 include/c++/%%GCCVER%%/profile/
1028 include/c++/%%GCCVER%%/profile/impl/
1031 profiler_container_size.h
1032 profiler_hash_func.h
1033 profiler_hashtable_size.h
1034 profiler_list_to_slist.h
1035 profiler_list_to_vector.h
1036 profiler_map_to_unordered_map.h
1040 profiler_vector_size.h
1041 profiler_vector_to_list.h
1042 include/c++/%%GCCVER%%/tr1/
1076 legendre_function.tcc
1080 modified_bessel_func.tcc
1089 special_function_util.h
1105 include/c++/%%GCCVER%%/tr2/
1112 lib/gcc/%%TARGET%%/%%GCCVER%%/
1119 lib/gcc/%%TARGET%%/%%GCCVER%%/finclude/
1131 lib/gcc/%%TARGET%%/%%GCCVER%%/include/
1135 avx5124fmapsintrin.h
1136 avx5124vnniwintrin.h
1143 avx512ifmavlintrin.h
1146 avx512vbmivlintrin.h
1150 avx512vpopcntdqintrin.h
1212 lib/gcc/%%TARGET%%/%%GCCVER%%/include/ssp/
1217 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1222 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/include/
1225 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/
1229 libcc1plugin.so.0.0.0
1232 libcp1plugin.so.0.0.0
1233 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1346 gimple-pretty-print.h
1371 highlev-plugin-common.h
1509 substring-locations.h
1516 target-hooks-macros.h
1554 tree-scalar-evolution.h
1561 tree-ssa-loop-ivopts.h
1562 tree-ssa-loop-manip.h
1563 tree-ssa-loop-niter.h
1566 tree-ssa-propagate.h
1568 tree-ssa-scopedtables.h
1570 tree-ssa-threadbackward.h
1571 tree-ssa-threadedge.h
1572 tree-ssa-threadupdate.h
1598 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/ada/gcc-interface/ada-tree.def
1599 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/c-family/
1605 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
1610 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
1620 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/cp/
1626 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/objc/objc-tree.def
1627 libexec/gcc/%%TARGET%%/%%GCCVER%%/
1635 liblto_plugin.so.0.0.0
1638 libexec/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1643 libexec/gcc/%%TARGET%%/%%GCCVER%%/plugin/gengtype
1646 [FILE:27199:manifests/plist.ada_run]
1647 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/adainclude/
1650 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/adalib/
1653 lib/gcc/%%TARGET%%/%%GCCVER%%/adainclude/
2899 lib/gcc/%%TARGET%%/%%GCCVER%%/adalib/
3594 [FILE:262:manifests/plist.cxx_run]
3600 libstdc++.so.6.0.24-gdb.py
3603 share/gcc-%%GCCVER%%/python/libstdcxx/__init__.py
3604 share/gcc-%%GCCVER%%/python/libstdcxx/v6/
3610 [FILE:240:manifests/plist.fortran_run]
3615 libgfortran.so.4.0.0
3625 libquadmath.so.0.0.0
3628 [FILE:452:manifests/plist.libs]
3629 @comment %%ASLIB%%/libcilkrts.a
3630 @comment %%ASLIB%%/libcilkrts.so
3631 @comment %%ASLIB%%/libcilkrts.so.5
3632 @comment %%ASLIB%%/libcilkrts.so.5.0.0
3633 @comment %%ASLIB%%/libcilkrts.spec
3656 [FILE:104:manifests/plist.infopages]
3667 [FILE:39877:patches/patch-diff-ada]
3668 --- gcc/ada/adaint.c.orig
3669 +++ gcc/ada/adaint.c
3670 @@ -1174,6 +1174,47 @@
3674 +#elif defined (__ANDROID__)
3677 + * ext2 /ext3/ext4/fat16/fat32 have no path limits
3678 + * /data/local/tmp normally requires rooted devices, if it even exists
3679 + * /sdcard is the standard location for external storage. Nativeactivity
3680 + * manifest needs to authorize its use, otherwise it might not have the
3681 + * proper permissions.
3685 + char *datadir = getenv ("ANDROID_DATA");
3687 + if (datadir == NULL)
3688 + strncpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX", L_tmpnam);
3690 + snprintf (tmp_filename, L_tmpnam, "%s/local/tmp/gnat-XXXXXX", datadir);
3692 + testfd = mkstemp (tmp_filename);
3699 + char *sdcard = getenv ("EXTERNAL_STORAGE");
3701 + if (sdcard == NULL)
3702 + strncpy (tmp_filename, "/sdcard/gnat-XXXXXX", L_tmpnam);
3704 + snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", sdcard);
3706 + testfd = mkstemp (tmp_filename);
3713 + tmpnam (tmp_filename);
3715 #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
3716 || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
3717 || defined (__DragonFly__)
3718 @@ -1460,7 +1501,7 @@
3719 utimbuf.modtime = time_stamp;
3721 /* Set access time to now in local time. */
3722 - t = time ((time_t) 0);
3724 utimbuf.actime = mktime (localtime (&t));
3726 utime (name, &utimbuf);
3727 --- gcc/ada/cio.c.orig
3731 /* Don't use macros on GNU/Linux since they cause incompatible changes between
3732 glibc 2.0 and 2.1 */
3734 +#if defined __linux__ && !defined __ANDROID__
3738 --- gcc/ada/cstreams.c.orig
3739 +++ gcc/ada/cstreams.c
3741 #include <unixlib.h>
3745 +#if defined __linux__ && !defined __ANDROID__
3746 /* Don't use macros on GNU/Linux since they cause incompatible changes between
3747 glibc 2.0 and 2.1 */
3750 +++ gcc/ada/g-socthi-bsd.adb
3752 +------------------------------------------------------------------------------
3754 +-- GNAT COMPILER COMPONENTS --
3756 +-- G N A T . S O C K E T S . T H I N --
3760 +-- Copyright (C) 2001-2013, AdaCore --
3762 +-- GNAT is free software; you can redistribute it and/or modify it under --
3763 +-- terms of the GNU General Public License as published by the Free Soft- --
3764 +-- ware Foundation; either version 3, or (at your option) any later ver- --
3765 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
3766 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
3767 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
3769 +-- As a special exception under Section 7 of GPL version 3, you are granted --
3770 +-- additional permissions described in the GCC Runtime Library Exception, --
3771 +-- version 3.1, as published by the Free Software Foundation. --
3773 +-- You should have received a copy of the GNU General Public License and --
3774 +-- a copy of the GCC Runtime Library Exception along with this program; --
3775 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
3776 +-- <http://www.gnu.org/licenses/>. --
3778 +-- GNAT was originally developed by the GNAT team at New York University. --
3779 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
3781 +------------------------------------------------------------------------------
3783 +-- This package provides a target dependent thin interface to the sockets
3784 +-- layer for use by the GNAT.Sockets package (g-socket.ads). This package
3785 +-- should not be directly with'ed by an applications program.
3787 +-- This is the *BSD version which uses fcntl rather than ioctl
3788 +-- The constant SCON.Thread_Blocking_IO is always true (for all platforms, not
3789 +-- just *BSD), so this binding is significantly simpler than the standard
3790 +-- one it replaces.
3792 +with GNAT.OS_Lib; use GNAT.OS_Lib;
3794 +with Interfaces.C; use Interfaces.C;
3796 +package body GNAT.Sockets.Thin is
3798 + function Syscall_Accept
3800 + Addr : System.Address;
3801 + Addrlen : not null access C.int) return C.int;
3802 + pragma Import (C, Syscall_Accept, "accept");
3803 + -- The accept() function accepts a connection on a socket. An incoming
3804 + -- connection is acknowledged and associated with an immediately created
3805 + -- socket. The original socket is returned to the listening state.
3807 + function Syscall_Connect
3809 + Name : System.Address;
3810 + Namelen : C.int) return C.int;
3811 + pragma Import (C, Syscall_Connect, "connect");
3812 + -- The connect() system call initiates a connection on a socket. If the
3813 + -- parameter S is of type SOCK_DGRAM then connect() permanently specifies
3814 + -- the peer to which datagrams are to be sent. If S is type SOCK_STREAM
3815 + -- then connect() attempts to make a connection with another socket, which
3816 + -- is identified by the parameter Name.
3818 + function Syscall_Recv
3820 + Msg : System.Address;
3822 + Flags : C.int) return C.int;
3823 + pragma Import (C, Syscall_Recv, "recv");
3824 + -- The recv() function receives a message from a socket. The call can be
3825 + -- used on a connection mode socket or a bound, connectionless socket. If
3826 + -- no messages are available at the socket, the recv() call waits for a
3827 + -- message to arrive unless the socket is non-blocking. If a socket is
3828 + -- non-blocking, the call returns a -1 and ERRNO is set to EWOULDBLOCK.
3830 + function Syscall_Recvfrom
3832 + Msg : System.Address;
3835 + From : System.Address;
3836 + Fromlen : not null access C.int) return C.int;
3837 + pragma Import (C, Syscall_Recvfrom, "recvfrom");
3838 + -- The recvfrom() system call receives a message from a socket and captures
3839 + -- the address from which the data was sent. It can be used to receive
3840 + -- data on an unconnected socket as well. If no messages are available,
3841 + -- the call waits for a message to arrive on blocking sockets. For
3842 + -- non-blocking sockets without messages, -1 is returned and ERRNO is set
3843 + -- to EAGAIN or EWOULDBLOCK.
3845 + function Syscall_Recvmsg
3847 + Msg : System.Address;
3848 + Flags : C.int) return System.CRTL.ssize_t;
3849 + pragma Import (C, Syscall_Recvmsg, "recvmsg");
3850 + -- The recvmsg call receives a message from a socket, and can be used to
3851 + -- receive data on an unconnected socket as well. If no messages are
3852 + -- available, the call waits for a message to arrive on blocking sockets.
3853 + -- For non-blocking sockets without messages, -1 is returned and ERRNO is
3854 + -- set to EAGAIN or EWOULDBLOCK.
3856 + function Syscall_Sendmsg
3858 + Msg : System.Address;
3859 + Flags : C.int) return System.CRTL.ssize_t;
3860 + pragma Import (C, Syscall_Sendmsg, "sendmsg");
3861 + -- The sendmsg() function sends a message to a socket, and can be used with
3862 + -- unconnected sockets as well (the msg is ignored in this case). The
3863 + -- function returns the number of bytes sent when successful, otherwise it
3864 + -- returns -1 and ERRNO is set (many possible values).
3866 + function Syscall_Sendto
3868 + Msg : System.Address;
3871 + To : System.Address;
3872 + Tolen : C.int) return C.int;
3873 + pragma Import (C, Syscall_Sendto, "sendto");
3874 + -- The sendto() function only works for connected sockets and it initiates
3875 + -- the transmission of a message. A successful call returns the numbers of
3876 + -- bytes sent, and a failure returns a -1 and ERRNO is set.
3878 + function Syscall_Socket
3881 + Protocol : C.int) return C.int;
3882 + pragma Import (C, Syscall_Socket, "socket");
3883 + -- The socket() function is used to create an unbound socket and returns a
3884 + -- file descriptor that can be used with other socket functions. Upon
3885 + -- failure, a -1 is returned and ERRNO is set.
3887 + procedure Disable_SIGPIPE (S : C.int);
3888 + pragma Import (C, Disable_SIGPIPE, "__gnat_disable_sigpipe");
3890 + procedure Disable_All_SIGPIPEs;
3891 + pragma Import (C, Disable_All_SIGPIPEs, "__gnat_disable_all_sigpipes");
3892 + -- Sets the process to ignore all SIGPIPE signals on platforms that
3893 + -- don't support Disable_SIGPIPE for particular streams.
3898 + Val : C.int) return C.int;
3899 + pragma Import (C, C_Fcntl, "fcntl");
3900 + -- The ioctl of 64-bit DragonFlyBSD, OpenBSD, and NetBSD does not support
3901 + -- setting a socket in non-blocking mode. fcntl must be used instead.
3909 + Addr : System.Address;
3910 + Addrlen : not null access C.int) return C.int
3912 + R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
3915 + Disable_SIGPIPE (R);
3923 + function C_Connect
3925 + Name : System.Address;
3926 + Namelen : C.int) return C.int
3929 + return Syscall_Connect (S, Name, Namelen);
3932 + ------------------
3933 + -- Socket_Ioctl --
3934 + ------------------
3936 + function Socket_Ioctl
3938 + Req : SOSC.IOCTL_Req_T;
3939 + Arg : access C.int) return C.int
3942 + if Req = SOSC.FIONBIO then
3945 + flags : constant Unsigned_32 :=
3946 + Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
3947 + nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.O_NDELAY);
3948 + enabled : constant Boolean := Arg.all = 1;
3949 + newval : C.int := C.int (flags);
3952 + newval := C.int (flags or nonblock);
3953 + elsif (flags and nonblock) > 0 then
3954 + newval := C.int (flags - nonblock);
3956 + return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
3960 + return C_Ioctl (S, Req, Arg);
3969 + Msg : System.Address;
3971 + Flags : C.int) return C.int
3974 + return Syscall_Recv (S, Msg, Len, Flags);
3981 + function C_Recvfrom
3983 + Msg : System.Address;
3986 + From : System.Address;
3987 + Fromlen : not null access C.int) return C.int
3990 + return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
3997 + function C_Recvmsg
3999 + Msg : System.Address;
4000 + Flags : C.int) return System.CRTL.ssize_t
4003 + return Syscall_Recvmsg (S, Msg, Flags);
4010 + function C_Sendmsg
4012 + Msg : System.Address;
4013 + Flags : C.int) return System.CRTL.ssize_t
4016 + return Syscall_Sendmsg (S, Msg, Flags);
4025 + Msg : System.Address;
4028 + To : System.Address;
4029 + Tolen : C.int) return C.int
4032 + return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
4042 + Protocol : C.int) return C.int
4044 + R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
4046 + Disable_SIGPIPE (R);
4054 + procedure Finalize is
4059 + -------------------------
4060 + -- Host_Error_Messages --
4061 + -------------------------
4063 + package body Host_Error_Messages is separate;
4069 + procedure Initialize is
4071 + Disable_All_SIGPIPEs;
4074 + --------------------
4075 + -- Signalling_Fds --
4076 + --------------------
4078 + package body Signalling_Fds is
4080 + -- In this default implementation, we use a C version of these
4081 + -- subprograms provided by socket.c.
4083 + function C_Create (Fds : not null access Fd_Pair) return C.int;
4084 + function C_Read (Rsig : C.int) return C.int;
4085 + function C_Write (Wsig : C.int) return C.int;
4086 + procedure C_Close (Sig : C.int);
4088 + pragma Import (C, C_Create, "__gnat_create_signalling_fds");
4089 + pragma Import (C, C_Read, "__gnat_read_signalling_fd");
4090 + pragma Import (C, C_Write, "__gnat_write_signalling_fd");
4091 + pragma Import (C, C_Close, "__gnat_close_signalling_fd");
4094 + (Fds : not null access Fd_Pair) return C.int renames C_Create;
4095 + function Read (Rsig : C.int) return C.int renames C_Read;
4096 + function Write (Wsig : C.int) return C.int renames C_Write;
4097 + procedure Close (Sig : C.int) renames C_Close;
4099 + end Signalling_Fds;
4101 + --------------------------
4102 + -- Socket_Error_Message --
4103 + --------------------------
4105 + function Socket_Error_Message (Errno : Integer) return String is separate;
4107 +end GNAT.Sockets.Thin;
4108 --- gcc/ada/gnatchop.adb.orig
4109 +++ gcc/ada/gnatchop.adb
4111 Config_File_Name : constant String_Access := new String'("gnat.adc");
4112 -- The name of the file holding the GNAT configuration pragmas
4114 - Gcc : String_Access := new String'("gcc");
4115 + Gcc : String_Access := new String'("ada");
4116 -- May be modified by switch --GCC=
4118 Gcc_Set : Boolean := False;
4119 --- gcc/ada/gnatlink.adb.orig
4120 +++ gcc/ada/gnatlink.adb
4122 -- This table collects the arguments to be passed to compile the binder
4125 - Gcc : String_Access := Program_Name ("gcc", "gnatlink");
4126 + Gcc : String_Access := Program_Name ("ada", "gnatlink");
4128 Read_Mode : constant String := "r" & ASCII.NUL;
4130 --- gcc/ada/make.adb.orig
4131 +++ gcc/ada/make.adb
4133 -- Compiler, Binder & Linker Data and Subprograms --
4134 ----------------------------------------------------
4136 - Gcc : String_Access := Program_Name ("gcc", "gnatmake");
4137 + Gcc : String_Access := Program_Name ("ada", "gnatmake");
4138 Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
4139 Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
4140 -- Default compiler, binder, linker programs
4141 --- gcc/ada/mlib-prj.adb.orig
4142 +++ gcc/ada/mlib-prj.adb
4143 @@ -335,6 +335,11 @@
4145 Foreign_Sources : Boolean;
4147 + Rpath_Disabled : Boolean := False;
4148 + -- If -R is passed through the library options for the linker, it will
4149 + -- prevent the implemented libraries portion of the rpath switch from
4150 + -- being built, even if the linker is capable of supporting rpath.
4152 Rpath : String_Access := null;
4153 -- Allocated only if Path Option is supported
4156 Opts.Table (Opts.Last) :=
4157 new String'("-L" & Name_Buffer (1 .. Name_Len));
4159 - if Path_Option /= null then
4160 + if not Rpath_Disabled and then Path_Option /= null then
4161 Add_Rpath (Name_Buffer (1 .. Name_Len));
4164 @@ -1299,9 +1304,13 @@
4165 Get_Name_String (Element.Value);
4167 if Name_Len /= 0 then
4168 - Opts.Increment_Last;
4169 - Opts.Table (Opts.Last) :=
4170 - new String'(Name_Buffer (1 .. Name_Len));
4171 + if Name_Buffer (1 .. Name_Len) = "-R" then
4172 + Rpath_Disabled := True;
4174 + Opts.Increment_Last;
4175 + Opts.Table (Opts.Last) :=
4176 + new String'(Name_Buffer (1 .. Name_Len));
4180 Current := Element.Next;
4181 --- gcc/ada/mlib-utl.adb.orig
4182 +++ gcc/ada/mlib-utl.adb
4184 if Driver_Name = No_Name then
4185 if Gcc_Exec = null then
4186 if Gcc_Name = null then
4187 - Gcc_Name := Osint.Program_Name ("gcc", "gnatmake");
4188 + Gcc_Name := Osint.Program_Name ("ada", "gnatmake");
4191 Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all);
4192 --- gcc/ada/prj-makr.adb.orig
4193 +++ gcc/ada/prj-makr.adb
4196 procedure Dup2 (Old_Fd, New_Fd : File_Descriptor);
4198 - Gcc : constant String := "gcc";
4199 + Gcc : constant String := "ada";
4200 Gcc_Path : String_Access := null;
4202 Non_Empty_Node : constant Project_Node_Id := 1;
4204 +++ gcc/ada/s-trasym-bsd.adb
4206 +------------------------------------------------------------------------------
4208 +-- GNAT RUN-TIME COMPONENTS --
4210 +-- S Y S T E M . T R A C E B A C K . S Y M B O L I C --
4214 +-- Copyright (C) 1999-2009, AdaCore --
4216 +-- GNAT is free software; you can redistribute it and/or modify it under --
4217 +-- terms of the GNU General Public License as published by the Free Soft- --
4218 +-- ware Foundation; either version 2, or (at your option) any later ver- --
4219 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
4220 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
4221 +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
4222 +-- for more details. You should have received a copy of the GNU General --
4223 +-- Public License distributed with GNAT; see file COPYING. If not, write --
4224 +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
4225 +-- Boston, MA 02110-1301, USA. --
4227 +-- As a special exception, if other files instantiate generics from this --
4228 +-- unit, or you link this unit with other files to produce an executable, --
4229 +-- this unit does not by itself cause the resulting executable to be --
4230 +-- covered by the GNU General Public License. This exception does not --
4231 +-- however invalidate any other reasons why the executable file might be --
4232 +-- covered by the GNU Public License. --
4234 +-- GNAT was originally developed by the GNAT team at New York University. --
4235 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
4237 +------------------------------------------------------------------------------
4239 +-- Run-time symbolic traceback support
4240 +-- This file is based on the work by Juergen Pfiefer which is still used
4241 +-- today to provide symbolic traceback support for gnu/kFreeBSD.
4242 +-- Incorporated in GNAT-AUX by John Marino <http://www.dragonlace.net>
4244 +with System.Soft_Links;
4245 +with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
4247 +package body System.Traceback.Symbolic is
4249 + package TSL renames System.Soft_Links;
4251 + -- To perform the raw addresses to symbolic form translation we rely on a
4252 + -- libaddr2line symbolizer which examines debug info from a provided
4253 + -- executable file name, and an absolute path is needed to ensure the file
4254 + -- is always found. This is "__gnat_locate_exec_on_path (gnat_argv [0])"
4255 + -- for our executable file, a fairly heavy operation so we cache the
4258 + Exename : System.Address;
4259 + -- Pointer to the name of the executable file to be used on all
4260 + -- invocations of the libaddr2line symbolization service.
4262 + Exename_Resolved : Boolean := False;
4263 + -- Flag to indicate whether we have performed the executable file name
4264 + -- resolution already. Relying on a not null Exename for this purpose
4265 + -- would be potentially inefficient as this is what we will get if the
4266 + -- resolution attempt fails.
4268 + ------------------------
4269 + -- Symbolic_Traceback --
4270 + ------------------------
4272 + function Symbolic_Traceback (Traceback : Tracebacks_Array) return String is
4274 + procedure convert_addresses
4275 + (filename : System.Address;
4276 + addrs : System.Address;
4277 + n_addrs : Integer;
4278 + buf : System.Address;
4279 + len : System.Address);
4280 + pragma Import (C, convert_addresses, "convert_addresses");
4281 + -- This is the procedure version of the Ada-aware addr2line. It places
4282 + -- in BUF a string representing the symbolic translation of the N_ADDRS
4283 + -- raw addresses provided in ADDRS, looked up in debug information from
4284 + -- FILENAME. LEN points to an integer which contains the size of the
4285 + -- BUF buffer at input and the result length at output.
4287 + -- Note that this procedure is *not* thread-safe.
4289 + type Argv_Array is array (0 .. 0) of System.Address;
4290 + gnat_argv : access Argv_Array;
4291 + pragma Import (C, gnat_argv, "gnat_argv");
4293 + function locate_exec_on_path
4294 + (c_exename : System.Address) return System.Address;
4295 + pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
4297 + B_Size : constant Integer := 256 * Traceback'Length;
4298 + Len : Integer := B_Size;
4299 + Res : String (1 .. B_Size);
4301 + use type System.Address;
4304 + -- The symbolic translation of an empty set of addresses is an empty
4307 + if Traceback'Length = 0 then
4311 + -- If our input set of raw addresses is not empty, resort to the
4312 + -- libaddr2line service to symbolize it all.
4314 + -- Compute, cache and provide the absolute path to our executable file
4315 + -- name as the binary file where the relevant debug information is to be
4316 + -- found. If the executable file name resolution fails, we have no
4317 + -- sensible basis to invoke the symbolizer at all.
4319 + -- Protect all this against concurrent accesses explicitly, as the
4320 + -- underlying services are potentially thread unsafe.
4322 + TSL.Lock_Task.all;
4324 + if not Exename_Resolved then
4325 + Exename := locate_exec_on_path (gnat_argv (0));
4326 + Exename_Resolved := True;
4329 + if Exename /= System.Null_Address then
4330 + Len := Res'Length;
4332 + (Exename, Traceback'Address, Traceback'Length,
4333 + Res (1)'Address, Len'Address);
4336 + TSL.Unlock_Task.all;
4338 + -- Return what the addr2line symbolizer has produced if we have called
4339 + -- it (the executable name resolution succeeded), or an empty string
4342 + if Exename /= System.Null_Address then
4343 + return Res (1 .. Len);
4348 + end Symbolic_Traceback;
4350 + function Symbolic_Traceback
4351 + (E : Ada.Exceptions.Exception_Occurrence) return String is
4353 + return Symbolic_Traceback (Tracebacks (E));
4354 + end Symbolic_Traceback;
4356 +end System.Traceback.Symbolic;
4357 --- gcc/ada/terminals.c.orig
4358 +++ gcc/ada/terminals.c
4360 /* First all usupported platforms. Add stubs for exported routines. */
4362 #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \
4363 - || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__)
4364 + || defined (__PikeOS__) || defined(__DJGPP__)
4366 #define ATTRIBUTE_UNUSED __attribute__((unused))
4368 @@ -1052,7 +1052,7 @@
4369 || defined (__OpenBSD__) \
4370 || defined (__NetBSD__) \
4371 || defined (__DragonFly__)
4376 /* Include every system header we need */
4377 @@ -1063,8 +1063,8 @@
4379 /* On some system termio is either absent or including it will disable termios
4381 -#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \
4382 - && !defined (__rtems__)
4383 +#if ! defined (__hpux__) && ! defined (FREEBSD) && \
4384 + ! defined (__APPLE__) && ! defined(__rtems__)
4385 # include <termio.h>
4388 @@ -1076,10 +1076,10 @@
4389 #include <sys/types.h>
4390 #include <sys/wait.h>
4392 -#if defined (__sun__)
4394 # include <sys/stropts.h>
4396 -#if defined (BSD) || defined (__sun__)
4397 +#if defined (FREEBSD) || defined (sun)
4398 # include <sys/signal.h>
4400 #if defined (__hpux__)
4401 @@ -1087,11 +1087,15 @@
4402 # include <sys/stropts.h>
4406 +#define CDISABLE _PC_VDISABLE
4408 #define CDISABLE _POSIX_VDISABLE
4411 /* On HP-UX and Sun system, there is a bzero function but with a different
4412 signature. Use memset instead */
4413 -#if defined (__hpux__) || defined (__sun__) || defined (_AIX)
4414 +#if defined (__hpux__) || defined (sun) || defined (_AIX)
4415 # define bzero(s,n) memset (s,0,n)
4418 @@ -1109,11 +1113,11 @@
4421 /* Configurable part */
4422 -#if defined (__APPLE__) || defined (BSD)
4423 +#if defined (__APPLE__) || defined (FREEBSD)
4425 -#elif defined (__linux__)
4426 +#elif defined (linux)
4428 -#elif defined (__sun__)
4429 +#elif defined (sun)
4430 #define USE_CLONE_DEVICE "/dev/ptmx"
4431 #elif defined (_AIX)
4432 #define USE_CLONE_DEVICE "/dev/ptc"
4433 @@ -1399,7 +1403,7 @@
4434 desc->slave_fd = open (desc->slave_name, O_RDWR, 0);
4437 -#if defined (__sun__) || defined (__hpux__)
4438 +#if defined (sun) || defined (__hpux__)
4439 /* On systems such as Solaris we are using stream. We need to push the right
4440 "modules" in order to get the expected terminal behaviors. Otherwise
4441 functionalities such as termios are not available. */
4443 +++ gcc/ada/traceback_symbolic.c
4446 + Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
4447 + Ada for Linux Team (ALT)
4448 + Heavily modified by John Marino <http://www.dragonlace.net>
4450 + Permission is hereby granted, free of charge, to any person obtaining a
4451 + copy of this software and associated documentation files (the
4452 + "Software"), to deal in the Software without restriction, including
4453 + without limitation the rights to use, copy, modify, merge, publish,
4454 + distribute, distribute with modifications, sublicense, and/or sell
4455 + copies of the Software, and to permit persons to whom the Software is
4456 + furnished to do so, subject to the following conditions:
4458 + The above copyright notice and this permission notice shall be included
4459 + in all copies or substantial portions of the Software.
4461 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
4462 + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4463 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
4464 + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
4465 + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
4466 + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
4467 + THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4469 + Except as contained in this notice, the name(s) of the above copyright
4470 + holders shall not be used in advertising or otherwise to promote the
4471 + sale, use or other dealings in this Software without prior written
4479 + * Running addr2line doesn't make sense for cross-compiled objects.
4480 + * Create a dummy function to satisfy g-trasym.o
4484 +convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
4485 + void *addrs ATTRIBUTE_UNUSED,
4486 + int n_addr ATTRIBUTE_UNUSED,
4487 + void *buf ATTRIBUTE_UNUSED,
4488 + int *len ATTRIBUTE_UNUSED)
4497 + * use the external program /usr/bin/addr2line to convert addresses
4498 + * into file names and line numbers
4501 +#include <sys/types.h>
4502 +#include <stdlib.h>
4503 +#include <unistd.h>
4504 +#include <string.h>
4505 +#include <signal.h>
4507 +#define CLOSE_SENDPIPE close(sendpipe[0]); close(sendpipe[1])
4508 +#define CLOSE_READPIPE close(readpipe[0]); close(readpipe[1])
4509 +#define DUP2CLOSE(oldfd, newfd) dup2(oldfd, newfd); close(oldfd);
4510 +#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
4512 +#define MAX_LINE 1024
4513 +#define PARENT_READ readpipe[0]
4514 +#define CHILD_WRITE readpipe[1]
4515 +#define CHILD_READ sendpipe[0]
4516 +#define PARENT_WRITE sendpipe[1]
4518 +#if defined (__sun__)
4519 +#define ADDR2LINE_PROG "/usr/gnu/bin/addr2line"
4521 +#define ADDR2LINE_PROG "/usr/bin/addr2line"
4525 +convert_addresses (const char *file_name,
4531 + int max_len = *len;
4534 + struct sigaction act, oact;
4536 + int sendpipe[2] = {-1,-1}, /* parent -> child */
4537 + readpipe[2] = {-1,-1}; /* parent <- child */
4540 + act.sa_handler = SIG_IGN;
4541 + sigemptyset(&act.sa_mask);
4543 + if (sigaction(SIGPIPE,&act,&oact) < 0)
4546 + if (pipe(sendpipe) < 0) { RESTSIG; return; }
4547 + if (pipe(readpipe) < 0) { CLOSE_SENDPIPE; RESTSIG; return; }
4548 + if ((childpid = fork()) < 0) {
4555 + if (childpid == 0) { /* child process */
4556 + close(PARENT_WRITE);
4557 + close(PARENT_READ);
4558 + if ((CHILD_READ != STDIN_FILENO) && (CHILD_WRITE != STDOUT_FILENO)) {
4559 + if ((CHILD_READ == STDOUT_FILENO) && (CHILD_WRITE == STDIN_FILENO)) {
4560 + const int temp_fd = dup(CHILD_WRITE);
4561 + close (CHILD_WRITE);
4562 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4563 + DUP2CLOSE (temp_fd, STDOUT_FILENO);
4565 + else if ((CHILD_READ == STDIN_FILENO) && (CHILD_WRITE > 1)) {
4566 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4568 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDOUT_FILENO)) {
4569 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4571 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDIN_FILENO)) {
4572 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4573 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4576 + /* CHILD_READ >= 1 and CHILD_WRITE > 1 */
4577 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4578 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4581 + /* As pointed out by Florian Weimer to JP, it is a security threat to call
4582 + the script with a user defined environment and using the path. That
4583 + would be Trojans pleasure. Therefore the absolute path to addr2line
4584 + and an empty environment is used. That should be safe.
4586 + char *const argv[] = { "addr2line",
4588 + "--demangle=gnat",
4592 + char *const envp[] = { NULL };
4593 + if (execve(ADDR2LINE_PROG, argv, envp) < 0) {
4594 + close (CHILD_WRITE);
4595 + close (CHILD_READ);
4601 + /* Below this line is parent process */
4604 + char line[MAX_LINE + 1];
4607 + long *trace_address = addrs;
4609 + close(CHILD_WRITE);
4610 + close(CHILD_READ);
4612 + for(i=0; i < n_addr; i++) {
4613 + snprintf(hex,sizeof(hex),"%#lx\n",*trace_address);
4614 + write(PARENT_WRITE,hex,strlen(hex));
4615 + n = read(PARENT_READ,line,MAX_LINE);
4620 + /* We have approx. 16 additional chars for "%#lx in " clause.
4621 + We use this info to prevent a buffer overrun. */
4622 + if (n + 16 + (*len) > max_len)
4625 + p = strchr(line,'\n');
4629 + *len += snprintf(s, (max_len - (*len)), "%#lx in %s at %s",
4630 + *trace_address, line, p+1);
4633 + *len += snprintf(s, (max_len - (*len)), "%#lx at %s",
4634 + *trace_address, line);
4638 + trace_address += 1;
4640 + close (PARENT_WRITE);
4641 + close (PARENT_READ);
4646 --- gcc/ada/gcc-interface/Makefile.in.orig
4647 +++ gcc/ada/gcc-interface/Makefile.in
4648 @@ -1223,6 +1223,7 @@
4649 ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
4650 LIBGNAT_TARGET_PAIRS = \
4651 a-intnam.ads<a-intnam-linux.ads \
4652 + g-socthi.adb<g-socthi-bsd.adb \
4653 s-inmaop.adb<s-inmaop-posix.adb \
4654 s-intman.adb<s-intman-android.adb \
4655 s-linux.ads<s-linux-android.ads \
4656 @@ -1307,6 +1308,7 @@
4657 a-intnam.ads<a-intnam-solaris.ads \
4658 s-inmaop.adb<s-inmaop-posix.adb \
4659 s-intman.adb<s-intman-solaris.adb \
4660 + s-trasym.adb<s-trasym-bsd.adb \
4661 s-mudido.adb<s-mudido-affinity.adb \
4662 s-osinte.adb<s-osinte-solaris.adb \
4663 s-osinte.ads<s-osinte-solaris.ads \
4664 @@ -1343,6 +1345,8 @@
4665 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4668 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4669 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4670 THREADSLIB = -lposix4 -lthread
4671 MISCLIB = -lposix4 -lnsl -lsocket
4673 @@ -1491,10 +1495,45 @@
4674 LIBRARY_VERSION := $(LIB_VERSION)
4678 +ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
4679 + LIBGNAT_TARGET_PAIRS = \
4680 + a-intnam.ads<a-intnam-linux.ads \
4681 + g-socthi.adb<g-socthi-bsd.adb \
4682 + s-inmaop.adb<s-inmaop-posix.adb \
4683 + s-intman.adb<s-intman-posix.adb \
4684 + s-linux.ads<s-linux-android.ads \
4685 + s-osinte.adb<s-osinte-android.adb \
4686 + s-osinte.ads<s-osinte-android.ads \
4687 + s-osprim.adb<s-osprim-posix.adb \
4688 + s-taprop.adb<s-taprop-posix.adb \
4689 + s-taspri.ads<s-taspri-posix.ads \
4690 + s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
4691 + $(ATOMICS_TARGET_PAIRS) \
4692 + $(X86_TARGET_PAIRS) \
4693 + system.ads<system-linux-x86.ads
4695 + TOOLS_TARGET_PAIRS = \
4696 + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
4697 + indepsw.adb<indepsw-gnu.adb
4699 + EXTRA_LIBGNAT_OBJS=
4700 + EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
4701 + EXTRA_GNATRTL_NONTASKING_OBJS=
4706 + GNATLIB_SHARED = gnatlib-shared-dual
4707 + LIBRARY_VERSION := $(LIB_VERSION)
4711 ifeq ($(strip $(filter-out %aarch64 freebsd%,$(target_cpu) $(target_os))),)
4712 LIBGNAT_TARGET_PAIRS = \
4713 a-intnam.ads<a-intnam-freebsd.ads \
4714 + g-socthi.adb<g-socthi-bsd.adb \
4715 + s-trasym.adb<s-trasym-bsd.adb \
4716 s-inmaop.adb<s-inmaop-posix.adb \
4717 s-intman.adb<s-intman-posix.adb \
4718 s-mudido.adb<s-mudido-affinity.adb \
4719 @@ -1512,6 +1551,9 @@
4720 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4721 GNATLIB_SHARED = gnatlib-shared-dual
4723 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4724 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4727 THREADSLIB= -lpthread
4729 @@ -1523,6 +1565,8 @@
4730 ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
4731 LIBGNAT_TARGET_PAIRS = \
4732 a-intnam.ads<a-intnam-freebsd.ads \
4733 + g-socthi.adb<g-socthi-bsd.adb \
4734 + s-trasym.adb<s-trasym-bsd.adb \
4735 s-inmaop.adb<s-inmaop-posix.adb \
4736 s-intman.adb<s-intman-posix.adb \
4737 s-mudido.adb<s-mudido-affinity.adb \
4738 @@ -1540,6 +1584,8 @@
4739 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4740 GNATLIB_SHARED = gnatlib-shared-dual
4742 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4743 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4744 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4747 @@ -1553,6 +1599,8 @@
4748 ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
4749 LIBGNAT_TARGET_PAIRS = \
4750 a-intnam.ads<a-intnam-freebsd.ads \
4751 + g-socthi.adb<g-socthi-bsd.adb \
4752 + s-trasym.adb<s-trasym-bsd.adb \
4753 s-inmaop.adb<s-inmaop-posix.adb \
4754 s-intman.adb<s-intman-posix.adb \
4755 s-mudido.adb<s-mudido-affinity.adb \
4756 @@ -1570,6 +1618,8 @@
4757 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4758 GNATLIB_SHARED = gnatlib-shared-dual
4760 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4761 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4762 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4765 @@ -1583,6 +1633,8 @@
4766 ifeq ($(strip $(filter-out %86_64 dragonfly%,$(target_cpu) $(target_os))),)
4767 LIBGNAT_TARGET_PAIRS = \
4768 a-intnam.ads<a-intnam-dragonfly.ads \
4769 + g-socthi.adb<g-socthi-bsd.adb \
4770 + s-trasym.adb<s-trasym-bsd.adb \
4771 s-inmaop.adb<s-inmaop-posix.adb \
4772 s-intman.adb<s-intman-posix.adb \
4773 s-mudido.adb<s-mudido-affinity.adb \
4774 @@ -1600,6 +1652,8 @@
4775 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4776 GNATLIB_SHARED = gnatlib-shared-dual
4778 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4779 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4780 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
4783 --- gcc/ada/gcc-interface/Make-lang.in.orig
4784 +++ gcc/ada/gcc-interface/Make-lang.in
4788 # Language-independent object files.
4789 -ADA_BACKEND = $(BACKEND) attribs.o
4790 +ADA_BACKEND = $(BACKEND2) attribs.o
4792 # List of target dependent sources, overridden below as necessary
4794 --- gcc/ada/init.c.orig
4796 @@ -2541,8 +2541,15 @@
4798 mcontext_t *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
4800 +#if defined (__i386__)
4801 + unsigned long *pc = (unsigned long *)mcontext->gregs[REG_EIP];
4802 + /* The pattern is "orl $0x0,(%esp)" for a probe in 32-bit mode. */
4803 + if (signo == SIGSEGV && pc && *pc == 0x00240c83)
4804 + mcontext->gregs[REG_ESP] += 4096 + 4 * sizeof (unsigned long);
4805 +#elif defined (__ARMEL__)
4806 /* ARM Bump has to be an even number because of odd/even architecture. */
4807 - ((mcontext_t *) mcontext)->arm_pc += 2;
4808 + mcontext->arm_pc += 2;
4815 [FILE:19397:patches/patch-diff-ada-testsuite]
4816 --- gcc/testsuite/ada/acats/run_acats.sh.orig
4817 +++ gcc/testsuite/ada/acats/run_acats.sh
4822 -# Provide which replacement.
4824 -# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
4825 -# ksh93 and bash have it.
4826 -# type output format differs between ksh88 and ksh93, so avoid it if
4827 -# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
4828 -# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
4831 - path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
4832 - path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
4833 - path=`whence $* 2>/dev/null` && { echo $path; return 0; }
4837 # Set up environment to use the Ada compiler from the object tree
4839 --- gcc/testsuite/ada/acats/run_all.sh.orig
4840 +++ gcc/testsuite/ada/acats/run_all.sh
4843 # End of customization section.
4845 -# Perform arithmetic evaluation on the ARGs, and store the result in the
4846 -# global $as_val. Take advantage of shells that can avoid forks. The arguments
4847 -# must be portable across $(()) and expr.
4848 -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
4849 - eval 'as_fn_arith ()
4856 - as_val=`expr "$@" || test $? -eq 1`
4862 printf "$@" >> $dir/acats.sum
4864 echo "$@" >> $dir/acats.log
4868 + printf "%04d %7s" $1 $2
4877 if [ "$dir" = "$testdir" ]; then
4879 gnatls -v >> $dir/acats.log
4882 -if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
4883 - dir_support=$dir/../acats/support
4886 - mv $dir/tests $dir/tests.$$ 2> /dev/null
4887 - rm -rf $dir/tests.$$ &
4890 - cp -pr $dir/../acats/tests $dir/
4892 - dir_support=$dir/support
4894 display " === acats support ==="
4895 display_noeol "Generating support files..."
4904 display " === acats tests ==="
4906 if [ $# -eq 0 ]; then
4907 @@ -228,14 +206,20 @@
4916 for chapter in $chapters; do
4917 - # Used to generate support once and finish after that.
4918 - [ "$chapter" = "NONE" ] && continue
4919 + if [ -d $dir/tests/$chapter ]; then
4920 + cd $dir/tests/$chapter
4921 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
4922 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
4923 + > $dir/tests/$chapter/${chapter}.lst
4924 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
4925 + countdown=`expr $countdown + $countn`
4929 +for chapter in $chapters; do
4930 display Running chapter $chapter ...
4932 if [ ! -d $dir/tests/$chapter ]; then
4933 @@ -244,45 +228,11 @@
4937 - cd $dir/tests/$chapter
4938 - ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
4939 - cut -c1-7 | sort | uniq | comm -23 - $dir_support/norun.lst \
4940 - > $dir/tests/$chapter/${chapter}.lst
4941 countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
4942 - as_fn_arith $glob_countn + $countn
4943 - glob_countn=$as_val
4944 + glob_countn=`expr $glob_countn + $countn`
4946 for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
4948 - # If running multiple run_all.sh jobs in parallel, decide
4949 - # if we should run this test in the current instance.
4950 - if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
4952 - # Ugh, some tests have inter-test dependencies, those
4953 - # tests have to be scheduled on the same parallel instance
4954 - # as previous test.
4955 - ce2108f | ce2108h | ce3112d) ;;
4956 - # All others can be hopefully scheduled freely.
4958 - as_fn_arith $par_countm + 1
4959 - par_countm=$as_val
4960 - [ $par_countm -eq 10 ] && par_countm=0
4961 - if [ $par_countm -eq 1 ]; then
4962 - as_fn_arith $par_count + 1
4964 - if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
4971 - if [ -z "$par_last" ]; then
4972 - as_fn_arith $glob_countn - 1
4973 - glob_countn=$as_val
4978 + counti=`expr $counti + 1`
4979 extraflags="-gnat95"
4980 grep $i $testdir/overflow.lst > /dev/null 2>&1
4981 if [ $? -eq 0 ]; then
4982 @@ -300,10 +250,13 @@
4983 if [ $? -eq 0 ]; then
4984 extraflags="$extraflags -fstack-check"
4986 + inform $countdown $i
4987 + countdown=`expr $countdown - 1`
4988 test=$dir/tests/$chapter/$i
4989 mkdir $test && cd $test >> $dir/acats.log 2>&1
4991 if [ $? -ne 0 ]; then
4994 failed="${failed}${i} "
4996 @@ -321,19 +274,22 @@
4997 echo "BUILD $main" >> $dir/acats.log
5000 - cxb30*) EXTERNAL_OBJECTS="$dir_support/cxb30040.o $dir_support/cxb30060.o $dir_support/cxb30130.o $dir_support/cxb30131.o";;
5001 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
5002 ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
5003 ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
5004 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
5006 if [ "$main" = "" ]; then
5009 failed="${failed}${i} "
5014 - target_gnatmake $extraflags -I$dir_support $main >> $dir/acats.log 2>&1
5015 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
5016 if [ $? -ne 0 ]; then
5019 failed="${failed}${i} "
5022 target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
5023 cd $dir/tests/$chapter/$i
5024 cat ${i}.log >> $dir/acats.log
5026 egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
5027 if [ $? -ne 0 ]; then
5028 grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
5029 @@ -357,15 +314,12 @@
5030 failed="${failed}${i} "
5032 log "UNSUPPORTED: $i"
5033 - as_fn_arith $glob_countn - 1
5034 - glob_countn=$as_val
5035 - as_fn_arith $glob_countu + 1
5036 - glob_countu=$as_val
5037 + glob_countn=`expr $glob_countn - 1`
5038 + glob_countu=`expr $glob_countu + 1`
5042 - as_fn_arith $glob_countok + 1
5043 - glob_countok=$as_val
5044 + glob_countok=`expr $glob_countok + 1`
5049 +++ gcc/testsuite/ada/acats/run_remote.sh
5052 +# Run ACATS with the GNU Ada compiler
5054 +# The following functions are to be customized if you run in cross
5055 +# environment or want to change compilation flags. Note that for
5056 +# tests requiring checks not turned on by default, this script
5057 +# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
5059 +# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
5060 +# gnatflags="-gnatN"
5063 +gnatflags="-gnatws"
5064 +tabtarget="/data/local/testsuite"
5065 +STRIP="@REMOTE_TARGET@-strip"
5068 + # Run on rooted tablet (port 22 vs port 2222)
5070 + $STRIP_FOR_TARGET $*
5071 + /usr/bin/scp -qp $* root@tablet:$tabtarget/
5072 + /usr/bin/ssh -q tablet $tabtarget/$BN
5076 + /usr/bin/ssh -q tablet "$1"
5079 +# End of customization section.
5083 + printf "$@" >> $dir/acats.sum
5084 + printf "$@" >> $dir/acats.log
5089 + echo "$@" >> $dir/acats.sum
5090 + echo "$@" >> $dir/acats.log
5094 + echo "$@" >> $dir/acats.sum
5095 + echo "$@" >> $dir/acats.log
5099 + printf "%04d %7s" $1 $2
5106 +dir=`${PWDCMD-pwd}`
5108 +if [ "$testdir" = "" ]; then
5109 + echo You must use make check or make check-ada
5113 +if [ "$dir" = "$testdir" ]; then
5114 + echo "error: srcdir must be different than objdir, exiting."
5118 +target_gnatmake () {
5119 + echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
5120 + gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
5128 + rm -f "$binmain" *.o *.ali > /dev/null 2>&1
5132 + ls ${i}?.adb > ${i}.lst 2> /dev/null
5133 + ls ${i}*m.adb >> ${i}.lst 2> /dev/null
5134 + ls ${i}.adb >> ${i}.lst 2> /dev/null
5135 + main=`tail -1 ${i}.lst`
5139 + local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'`
5143 +EXTERNAL_OBJECTS=""
5144 +# Global variable to communicate external objects to link with.
5146 +rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst
5148 +display "Test Run By $USER on `date`"
5150 +display " === acats configuration ==="
5152 +target=`$GCC -dumpmachine`
5154 +display target gcc is $GCC
5155 +display `$GCC -v 2>&1`
5156 +display host=`gcc -dumpmachine`
5157 +display target=$target
5158 +display `type gnatmake-cross`
5159 +gnatls-cross -v >> $dir/acats.log
5162 +# Let's be tidy and clear off the remote device first
5163 +target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *"
5165 +display " === acats support ==="
5166 +display_noeol "Generating support files..."
5168 +rm -rf $dir/support
5169 +mkdir -p $dir/support
5172 +cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
5174 +# Find out the size in bit of an address on the target
5175 +target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
5176 +target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
5177 +target_bit=`cat $dir/support/impbit.out`
5178 +echo target_bit="$target_bit" >> $dir/acats.log
5180 +# Find out a suitable asm statement
5181 +# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
5183 + ia64*-*-* | s390*-*-*)
5184 + target_insn="nop 0"
5187 + target_insn="swym 0"
5193 +echo target_insn="$target_insn" >> $dir/acats.log
5195 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5196 + < $testdir/support/impdef.a > $dir/support/impdef.a
5197 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5198 + -e "s,ACATS4GNATBIT,$target_bit,g" \
5199 + -e "s,ACATS4GNATINSN,$target_insn,g" \
5200 + < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
5201 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5202 + < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
5204 +cp $testdir/tests/cd/*.c $dir/support
5205 +cp $testdir/tests/cxb/*.c $dir/support
5206 +grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst
5209 +mv $dir/tests $dir/tests.$$ 2> /dev/null
5210 +rm -rf $dir/tests.$$ &
5213 +cp -pr $testdir/tests $dir/
5215 +for i in $dir/support/*.ada $dir/support/*.a; do
5216 + host_gnatchop $i >> $dir/acats.log 2>&1
5219 +# These tools are used to preprocess some ACATS sources
5220 +# they need to be compiled native on the host.
5222 +host_gnatmake -q -gnatws macrosub.adb
5223 +if [ $? -ne 0 ]; then
5224 + display "**** Failed to compile macrosub"
5227 +./macrosub > macrosub.out 2>&1
5230 +host_gnatmake -q -gnatws widechr.adb
5231 +if [ $? -ne 0 ]; then
5232 + display "**** Failed to compile widechr"
5235 +./widechr > widechr.out 2>&1
5237 +rm -f $dir/support/macrosub
5238 +rm -f $dir/support/widechr
5239 +rm -f $dir/support/*.ali
5240 +rm -f $dir/support/*.o
5244 +# From here, all compilations will be made by the target compiler
5246 +display_noeol "Compiling support files..."
5249 +if [ $? -ne 0 ]; then
5250 + display "**** Failed to compile C code"
5254 +host_gnatchop *.adt >> $dir/acats.log 2>&1
5256 +target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
5257 +target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
5261 +display " === acats tests ==="
5263 +if [ $# -eq 0 ]; then
5264 + chapters=`cd $dir/tests; echo [a-z]*`
5274 +for chapter in $chapters; do
5275 + if [ -d $dir/tests/$chapter ]; then
5276 + cd $dir/tests/$chapter
5277 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
5278 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
5279 + > $dir/tests/$chapter/${chapter}.lst
5280 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
5281 + countdown=`expr $countdown + $countn`
5285 +cat > $dir/execute.sh << EOF
5287 + printf "left: %04d" \$1
5294 + local total=\$(echo \$testlist | awk '{print NF}')
5296 + echo "Executing \$total tests on remote device"
5298 + for x in \$testlist; do
5299 + timeout -t 30 ./\${x} > logs/\${x}.log 2>&1
5300 + countx=\$(expr \$countx + 1)
5301 + if [ \$countx -eq 25 ]; then
5302 + total=\$(expr \$total - 25)
5309 + tar -czf remote.logs.tar.gz logs
5314 +display "All tests are being cross-compiled without execution first."
5316 +for chapter in $chapters; do
5317 + if [ ! -d $dir/tests/$chapter ]; then
5321 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
5322 + glob_countn=`expr $glob_countn + $countn`
5324 + for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
5325 + counti=`expr $counti + 1`
5326 + extraflags="-gnat95"
5327 + grep $i $testdir/overflow.lst > /dev/null 2>&1
5328 + if [ $? -eq 0 ]; then
5329 + extraflags="$extraflags -gnato"
5331 + grep $i $testdir/elabd.lst > /dev/null 2>&1
5332 + if [ $? -eq 0 ]; then
5333 + extraflags="$extraflags -gnatE"
5335 + grep $i $testdir/floatstore.lst > /dev/null 2>&1
5336 + if [ $? -eq 0 ]; then
5337 + extraflags="$extraflags -ffloat-store"
5339 + grep $i $testdir/stackcheck.lst > /dev/null 2>&1
5340 + if [ $? -eq 0 ]; then
5341 + extraflags="$extraflags -fstack-check"
5343 + inform $countdown $i
5344 + countdown=`expr $countdown - 1`
5345 + test=$dir/tests/$chapter/$i
5346 + mkdir $test && cd $test >> $dir/acats.log 2>&1
5348 + if [ $? -ne 0 ]; then
5350 + display "FAIL: $i"
5351 + failed="${failed}${i} "
5356 + host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
5358 + if [ -z "$main" ]; then
5362 + binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
5363 + echo "BUILD $main" >> $dir/acats.log
5364 + EXTERNAL_OBJECTS=""
5366 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
5367 + ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
5368 + ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
5369 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
5371 + if [ "$main" = "" ]; then
5373 + display "FAIL: $i"
5374 + failed="${failed}${i} "
5379 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
5380 + if [ $? -ne 0 ]; then
5382 + display "FAIL: $i"
5383 + failed="${failed}${i} "
5387 + echo $chapter/$i/$binmain >> $dir/transfer.lst
5388 + echo "$binmain \\" >> $dir/execute.sh
5393 +echo '"' >> $dir/execute.sh
5394 +echo "cycle" >> $dir/execute.sh
5397 +display "Transfer files to remote device: root@tablet:$tabtarget/"
5399 +cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \
5400 + target_cmd "tar -C $tabtarget -xzf -"
5402 +tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -"
5403 +target_cmd "cd $tabtarget; sh execute.sh"
5404 +rm -rf $dir/logs $dir/remote.logs.tar.gz
5405 +/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/
5406 +tar -xzf $dir/remote.logs.tar.gz
5408 +countdown=`wc -l < $dir/transfer.lst`
5409 +glob_countn=${countdown}
5410 +for i in `cat $dir/transfer.lst`; do
5412 + if [ "$section" != "$savedsect" ]; then
5413 + display Running chapter $section ...
5415 + savedsect=$section
5417 + #inform $countdown $TN
5418 + countdown=`expr $countdown - 1`
5419 + proglog="$dir/logs/${prog}.log"
5420 + echo "RUN $prog" >> $dir/acats.log
5421 + if [ ! -f $proglog ]; then
5422 + echo "LOG NOT FOUND!" >> $proglog
5425 + cat $proglog >> $dir/acats.log
5427 + egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1
5428 + if [ $? -ne 0 ]; then
5429 + grep 'tasking not implemented' $proglog > /dev/null 2>&1
5431 + if [ $? -ne 0 ]; then
5432 + display "FAIL: ${TN}"
5433 + failed="${failed}${TN} "
5435 + log "UNSUPPORTED: ${TN}"
5436 + glob_countn=`expr $glob_countn - 1`
5437 + glob_countu=`expr $glob_countu + 1`
5441 + glob_countok=`expr $glob_countok + 1`
5443 + cd $dir/tests/$section/$TN
5448 +display " === acats Summary ==="
5449 +display "# of expected passes $glob_countok"
5450 +display "# of unexpected failures `expr $glob_countn - $glob_countok`"
5452 +if [ $glob_countu -ne 0 ]; then
5453 + display "# of unsupported tests $glob_countu"
5456 +if [ $glob_countok -ne $glob_countn ]; then
5457 + display "*** FAILURES: $failed"
5460 +display "$0 completed at `date`"
5463 --- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
5464 +++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
5467 +-- { dg-do run { xfail *-*-openbsd* } }
5468 -- { dg-options "-O2" }
5470 -- This is an optimization test and its failure is only a missed optimization.
5471 --- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
5472 +++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
5474 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
5476 -with Unchecked_Conversion;
5478 -procedure Unchecked_Convert5 is
5480 - subtype c_1 is string(1..1);
5482 - function int2c1 is -- { dg-warning "different sizes" }
5483 - new unchecked_conversion (source => integer, target => c_1);
5489 - c1 := int2c1(16#12#);
5491 - if c1 (1) /= ASCII.Nul then
5492 - raise Program_Error;
5496 --- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
5497 +++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
5499 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
5501 -with Unchecked_Conversion;
5503 -procedure Unchecked_Convert6 is
5505 - subtype c_5 is string(1..5);
5507 - function int2c5 is -- { dg-warning "different sizes" }
5508 - new unchecked_conversion (source => integer, target => c_5);
5514 - c5 := int2c5(16#12#);
5516 - if c5 (4) /= ASCII.DC2 then
5517 - raise Program_Error;
5523 [FILE:4761:patches/patch-diff-core]
5524 --- gcc/config/dragonfly.h.orig
5525 +++ gcc/config/dragonfly.h
5528 %{static:-Bstatic} \
5530 - %{!static:--hash-style=gnu} \
5531 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5532 %{symbolic:-Bsymbolic}"
5535 #define LINK_SPEC DFBSD_LINK_SPEC
5537 -#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
5538 +#define DFBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.2"
5541 /* Use --as-needed -lgcc_s for eh support. */
5542 --- gcc/config/sol2.h.orig
5543 +++ gcc/config/sol2.h
5545 %{static:-dn -Bstatic} \
5546 %{shared:-G -dy %{!mimpure-text:-z text}} " \
5547 LINK_LIBGCC_MAPFILE_SPEC LINK_CLEARCAP_SPEC " \
5548 + %{!static:-R/lib/amd64:@PREFIX@/@GCCAUX@/lib/amd64} \
5549 %{symbolic:-Bsymbolic -G -dy -z text} \
5552 --- gcc/config/aarch64/aarch64-freebsd.h.orig
5553 +++ gcc/config/aarch64/aarch64-freebsd.h
5555 %{symbolic:-Bsymbolic} \
5556 %{static:-Bstatic} \
5558 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5559 %{rdynamic:-export-dynamic} \
5560 %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
5561 -X" SUBTARGET_EXTRA_LINK_SPEC " \
5564 #define MCOUNT_NAME ".mcount"
5566 +/* Static stack checking is supported by means of probes. */
5567 +#define STACK_CHECK_STATIC_BUILTIN 1
5568 #endif /* GCC_AARCH64_FREEBSD_H */
5569 --- gcc/config/i386/freebsd.h.orig
5570 +++ gcc/config/i386/freebsd.h
5572 %{rdynamic:-export-dynamic} \
5573 -dynamic-linker %(fbsd_dynamic_linker) } \
5574 %{static:-Bstatic}} \
5575 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5576 %{symbolic:-Bsymbolic}"
5578 /* A C statement to output to the stdio stream FILE an assembler
5579 --- gcc/config/i386/freebsd64.h.orig
5580 +++ gcc/config/i386/freebsd64.h
5582 %{rdynamic:-export-dynamic} \
5583 -dynamic-linker %(fbsd_dynamic_linker) } \
5584 %{static:-Bstatic}} \
5585 + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib} \
5586 %{symbolic:-Bsymbolic}"
5587 --- gcc/Makefile.in.orig
5589 @@ -1200,7 +1200,6 @@
5597 @@ -1597,6 +1596,7 @@
5598 $(OBJS-libcommon-target) main.o c-family/cppspec.o \
5599 $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
5600 $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
5601 + insn-modes.o insn-modes-ada.o \
5602 lto-wrapper.o collect-utils.o
5604 # for anything that is shared use the cc1plus profile data, as that
5605 @@ -1612,6 +1612,11 @@
5606 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
5608 BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \
5610 + $(CPPLIB) $(LIBDECNUMBER)
5612 +BACKEND2 = libbackend.a main.o libcommon-target.a libcommon.a \
5613 + insn-modes-ada.o \
5614 $(CPPLIB) $(LIBDECNUMBER)
5616 # This is defined to "yes" if Tree checking is enabled, which roughly means
5617 @@ -2312,6 +2317,7 @@
5619 insn-modes.c: s-modes; @true
5620 insn-modes.h: s-modes-h; @true
5621 +insn-modes-ada.c: s-modes-ada; @true
5622 min-insn-modes.c: s-modes-m; @true
5624 s-modes: build/genmodes$(build_exeext)
5625 @@ -2329,6 +2335,12 @@
5626 $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
5629 +s-modes-ada: s-modes
5630 + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \
5631 + < insn-modes.c > tmp-modes-ada.c)
5632 + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c
5633 + $(STAMP) s-modes-ada
5635 insn-preds.c: s-preds; @true
5636 tm-preds.h: s-preds-h; @true
5637 tm-constrs.h: s-constrs-h; @true
5638 @@ -3536,6 +3548,9 @@
5639 ( cd $(DESTDIR)$(bindir) && \
5640 $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
5642 + if [ -f gnat1$(exeext) ] ; then \
5643 + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \
5645 if [ ! -f gcc-cross$(exeext) ] \
5646 && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
5647 rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
5648 --- gcc/config/i386/gnu-user64.h.orig
5649 +++ gcc/config/i386/gnu-user64.h
5651 %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
5652 %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
5654 + %{!static:--enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib64} \
5657 %{rdynamic:-export-dynamic} \
5660 [FILE:8816:patches/patch-diff-cxx]
5661 --- libstdc++-v3/configure.host.orig
5662 +++ libstdc++-v3/configure.host
5665 os_include_dir="os/bsd/freebsd"
5668 + os_include_dir="os/bionic"
5671 os_include_dir="os/generic"
5673 --- libstdc++-v3/config/os/bionic/ctype_base.h.orig
5674 +++ libstdc++-v3/config/os/bionic/ctype_base.h
5676 // Non-standard typedefs.
5677 typedef const int* __to_type;
5680 +#define _U _CTYPE_U
5681 +#define _L _CTYPE_L
5682 +#define _D _CTYPE_D
5683 +#define _S _CTYPE_S
5684 +#define _P _CTYPE_P
5685 +#define _C _CTYPE_C
5686 +#define _X _CTYPE_X
5687 +#define _B _CTYPE_B
5688 +#define _N _CTYPE_D
5691 // NB: Offsets into ctype<char>::_M_table force a particular size
5692 // on the mask type. Because of this, we don't use an enum.
5694 --- libstdc++-v3/src/c++11/futex.cc.orig
5695 +++ libstdc++-v3/src/c++11/futex.cc
5697 #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1
5701 +#include <sys/syscall.h>
5703 #include <syscall.h>
5706 #include <sys/time.h>
5708 --- libstdc++-v3/src/filesystem/dir.cc.orig
5709 +++ libstdc++-v3/src/filesystem/dir.cc
5710 @@ -146,7 +146,13 @@
5712 int err = std::exchange(errno, 0);
5713 const auto entp = readdir(dirp);
5715 + int tmperr = errno;
5719 std::swap(errno, err);
5724 --- libstdc++-v3/include/bits/c++config.orig
5725 +++ libstdc++-v3/include/bits/c++config
5727 #ifndef _GLIBCXX_CXX_CONFIG_H
5728 #define _GLIBCXX_CXX_CONFIG_H 1
5733 +#define _GTHROW throw()
5736 // The major release number for the GCC release the C++ library belongs to.
5737 #define _GLIBCXX_RELEASE
5739 --- libstdc++-v3/include/c_global/cstdio.orig
5740 +++ libstdc++-v3/include/c_global/cstdio
5741 @@ -159,16 +159,16 @@
5742 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
5744 (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...)
5748 (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list);
5749 extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list);
5751 (vsnprintf)(char * __restrict, std::size_t, const char * __restrict,
5752 - __gnuc_va_list) throw ();
5753 + __gnuc_va_list) _GTHROW;
5755 (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list)
5760 #if !_GLIBCXX_USE_C99_DYNAMIC
5761 --- libstdc++-v3/include/c_global/cstdlib.orig
5762 +++ libstdc++-v3/include/c_global/cstdlib
5767 - extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
5768 - extern "C" int atexit(void (*)(void)) throw ();
5769 - extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
5770 + extern "C" void abort(void) _GTHROW _GLIBCXX_NORETURN;
5771 + extern "C" int atexit(void (*)(void)) _GTHROW;
5772 + extern "C" void exit(int) _GTHROW _GLIBCXX_NORETURN;
5773 #if __cplusplus >= 201103L
5774 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
5775 - extern "C" int at_quick_exit(void (*)(void)) throw ();
5776 + extern "C" int at_quick_exit(void (*)(void)) _GTHROW;
5778 # ifdef _GLIBCXX_HAVE_QUICK_EXIT
5779 - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
5780 + extern "C" void quick_exit(int) _GTHROW _GLIBCXX_NORETURN;
5787 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
5788 - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
5789 + extern "C" void (_Exit)(int) _GTHROW _GLIBCXX_NORETURN;
5791 #if !_GLIBCXX_USE_C99_DYNAMIC
5793 @@ -211,11 +211,11 @@
5796 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5797 - extern "C" long long int (atoll)(const char *) throw ();
5798 + extern "C" long long int (atoll)(const char *) _GTHROW;
5799 extern "C" long long int
5800 - (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
5801 + (strtoll)(const char * __restrict, char ** __restrict, int) _GTHROW;
5802 extern "C" unsigned long long int
5803 - (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
5804 + (strtoull)(const char * __restrict, char ** __restrict, int) _GTHROW;
5806 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5808 --- libstdc++-v3/include/c_global/cwchar.orig
5809 +++ libstdc++-v3/include/c_global/cwchar
5810 @@ -242,16 +242,16 @@
5812 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
5813 extern "C" long double
5814 - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
5815 + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) _GTHROW;
5817 #if !_GLIBCXX_USE_C99_DYNAMIC
5820 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5821 extern "C" long long int
5822 - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
5823 + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
5824 extern "C" unsigned long long int
5825 - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
5826 + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
5828 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5830 --- libstdc++-v3/include/c_std/cstdio.orig
5831 +++ libstdc++-v3/include/c_std/cstdio
5832 @@ -157,16 +157,16 @@
5833 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
5835 (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...)
5839 (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list);
5840 extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list);
5842 (vsnprintf)(char * __restrict, std::size_t, const char * __restrict,
5843 - __gnuc_va_list) throw ();
5844 + __gnuc_va_list) _GTHROW;
5846 (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list)
5851 #if !_GLIBCXX_USE_C99_DYNAMIC
5852 --- libstdc++-v3/include/c_std/cstdlib.orig
5853 +++ libstdc++-v3/include/c_std/cstdlib
5858 - extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
5859 - extern "C" int atexit(void (*)(void)) throw ();
5860 - extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
5861 + extern "C" void abort(void) _GTHROW _GLIBCXX_NORETURN;
5862 + extern "C" int atexit(void (*)(void)) _GTHROW;
5863 + extern "C" void exit(int) _GTHROW _GLIBCXX_NORETURN;
5864 #if __cplusplus >= 201103L
5865 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
5866 - extern "C" int at_quick_exit(void (*)(void)) throw ();
5867 + extern "C" int at_quick_exit(void (*)(void)) _GTHROW;
5869 # ifdef _GLIBCXX_HAVE_QUICK_EXIT
5870 - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
5871 + extern "C" void quick_exit(int) _GTHROW _GLIBCXX_NORETURN;
5878 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
5879 - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
5880 + extern "C" void (_Exit)(int) _GTHROW _GLIBCXX_NORETURN;
5882 #if !_GLIBCXX_USE_C99_DYNAMIC
5884 @@ -228,11 +228,11 @@
5887 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5888 - extern "C" long long int (atoll)(const char *) throw ();
5889 + extern "C" long long int (atoll)(const char *) _GTHROW;
5890 extern "C" long long int
5891 - (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
5892 + (strtoll)(const char * __restrict, char ** __restrict, int) _GTHROW;
5893 extern "C" unsigned long long int
5894 - (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
5895 + (strtoull)(const char * __restrict, char ** __restrict, int) _GTHROW;
5897 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5899 --- libstdc++-v3/include/c_std/cwchar.orig
5900 +++ libstdc++-v3/include/c_std/cwchar
5901 @@ -238,16 +238,16 @@
5903 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
5904 extern "C" long double
5905 - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
5906 + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) _GTHROW;
5908 #if !_GLIBCXX_USE_C99_DYNAMIC
5911 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5912 extern "C" long long int
5913 - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
5914 + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
5915 extern "C" unsigned long long int
5916 - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
5917 + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
5919 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
5923 [FILE:1612:patches/patch-diff-gcc-testsuite]
5924 --- gcc/testsuite/gcc.dg/format/ext-1.c.orig
5925 +++ gcc/testsuite/gcc.dg/format/ext-1.c
5930 -foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
5931 +foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
5932 unsigned long long int ull, int i, unsigned int u, double d,
5933 char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
5935 --- gcc/testsuite/gcc.dg/format/ext-2.c.orig
5936 +++ gcc/testsuite/gcc.dg/format/ext-2.c
5941 -foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
5942 +foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
5943 unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
5944 int *ip, unsigned int *up)
5946 --- gcc/testsuite/gcc.dg/format/format.h.orig
5947 +++ gcc/testsuite/gcc.dg/format/format.h
5951 /* %q formats want a "quad"; GCC considers this to be a long long. */
5952 -typedef llong quad_t;
5953 -typedef ullong u_quad_t;
5954 +typedef llong quad2_t;
5955 +typedef ullong u_quad2_t;
5957 __extension__ typedef __INTMAX_TYPE__ intmax_t;
5958 __extension__ typedef __UINTMAX_TYPE__ uintmax_t;
5959 --- gcc/testsuite/gcc.dg/pch/pch.exp.orig
5960 +++ gcc/testsuite/gcc.dg/pch/pch.exp
5962 set test "largefile.c"
5963 set testh "largefile.hs"
5964 set f [open $test w]
5965 +puts $f "/* { dg-do run { target *-*-solaris* } } */"
5966 +puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
5967 puts $f "/* { dg-timeout-factor 4.0 } */"
5969 for { set v 0 } { $v < 10000 } { incr v } {
5972 [FILE:286:sunos/patch-gcc_config.build]
5973 --- gcc/config.build.orig 2017-01-01 12:07:43 UTC
5974 +++ gcc/config.build
5979 -build_install_headers_dir=install-headers-tar
5980 +build_install_headers_dir=install-headers-cp
5981 build_file_translate=
5983 # System-specific settings.