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.1.0
13 DISTFILE[1]= gcc-7.1.0.tar.bz2: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 LGPL3:compilers
43 LICENSE_FILE= GPLv2+:{{WRKSRC}}/COPYING
44 LGPL21:{{WRKSRC}}/COPYING.LIB
45 GPLv3+:{{WRKSRC}}/COPYING3
46 LGPL3:{{WRKSRC}}/COPYING3.LIB
47 GPLv3RLE:{{WRKSRC}}/COPYING.RUNTIME
49 PREFIX= {{LOCALBASE}}/toolchain/{{NAMEBASE}}
51 infopages:cppinternals
66 CONFIGURE_OUTSOURCE= yes
67 CONFIGURE_ARGS= --enable-languages="c,c++,ada,fortran"
68 --with-local-prefix={{LOCALBASE}}
70 --with-gmp={{LOCALBASE}}
71 --with-mpc={{LOCALBASE}}
72 --with-mpfr={{LOCALBASE}}
73 {{ICONV_CONFIGURE_ARG}}
75 --enable-threads=posix
76 --enable-checking=release
80 --disable-libsanitizer
84 --with-ld={{LOCALBASE}}/toolchain/bin/ld
85 --with-as={{LOCALBASE}}/toolchain/bin/as
86 --with-pkgversion="Ravenports"
88 INSTALL_TARGET= install-strip
89 PLIST_SUB= GCCVER=7.1.0
90 TARGET={{CONFIGURE_TARGET}}
93 # Update LINK_SPEC to add gcc-aux lib runpath in every binary
94 @${ECHO} "Configuring LINK_SPEC runpath"
95 @${REINPLACE_CMD} -e 's;\@PREFIX\@;${PREFIX:H};' \
96 -e 's;\@GCCAUX\@;${NAMEBASE};' \
97 ${WRKSRC}/gcc/config/dragonfly.h \
98 ${WRKSRC}/gcc/config/i386/freebsd64.h \
99 ${WRKSRC}/gcc/config/i386/freebsd.h \
100 ${WRKSRC}/gcc/config/i386/gnu-user64.h \
101 ${WRKSRC}/gcc/config/aarch64/aarch64-freebsd.h
102 # Ensure dwarf4-compatible addr2line
103 ${REINPLACE_CMD} -e 's|/usr/bin/addr2line|${PREFIX:H}/bin/addr2line|g'\
104 ${WRKSRC}/gcc/ada/traceback_symbolic.c
107 cp ${STAGEDIR}${PREFIX}/bin/gcc ${STAGEDIR}${PREFIX}/bin/cc
108 cp ${STAGEDIR}${PREFIX}/bin/g++ ${STAGEDIR}${PREFIX}/bin/CC
109 ${RM} ${STAGEDIR}${MANPREFIX}/man/man7/*
110 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.1.0/adalib/libgnarl.so
111 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.1.0/adalib/libgnat.so
112 -[ -d ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.1.0/include-fixed/x86_64-linux-gnu ] && \
113 ${RMDIR} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.1.0/include-fixed/x86_64-linux-gnu
115 [FILE:329:descriptions/desc.compilers]
116 This is series 6 of the GNU Compiler Collection (GCC)
118 This compiler supports the following languages: C, C++, Fortran and Ada.
119 The GNAT front-end implements the full Ada-83, Ada-95, Ada-2005 and
120 Ada-2012 standards. The C++ front-end defaults to the gnu++14 standard.
122 This package contains the compilers, drivers, and headers.
125 [FILE:104:descriptions/desc.ada_run]
126 This is series 6 of the GNU Compiler Collection (GCC)
128 This package contains the Ada runtime libraries.
131 [FILE:104:descriptions/desc.cxx_run]
132 This is series 6 of the GNU Compiler Collection (GCC)
134 This package contains the C++ runtime libraries.
137 [FILE:108:descriptions/desc.fortran_run]
138 This is series 6 of the GNU Compiler Collection (GCC)
140 This package contains the Fortran runtime libraries.
143 [FILE:162:descriptions/desc.libs]
144 This is series 6 of the GNU Compiler Collection (GCC)
146 This package contains the remaining runtime libraries after excluding
147 the Ada, C++, and Fortran libraries.
150 [FILE:126:descriptions/desc.infopages]
151 This is series 6 of the GNU Compiler Collection (GCC)
153 This package contains the man pages and info pages that come with GCC.
157 8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 84303533 gcc-7.1.0.tar.bz2
160 [FILE:25731:manifests/plist.compilers]
161 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/include/tgmath.h
162 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
165 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/dragonfly.h
166 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/
172 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/linux/a.out.h
173 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
176 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
181 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
185 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk.h
186 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_api.h
187 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_api_linux.h
188 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_stub.h
189 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_undocumented.h
190 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/common.h
191 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/holder.h
192 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/hyperobject_base.h
193 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/metaprogramming.h
194 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer.h
195 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_file.h
196 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_list.h
197 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_max.h
198 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_min.h
199 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_min_max.h
200 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opadd.h
201 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opand.h
202 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opmul.h
203 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opor.h
204 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opxor.h
205 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_ostream.h
206 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_string.h
211 %%TARGET%%-gcc-%%GCCVER%%
214 %%TARGET%%-gcc-ranlib
242 include/c++/%%GCCVER%%/%%TARGET%%/bits/
265 include/c++/%%GCCVER%%/%%TARGET%%/ext/opt_random.h
266 include/c++/%%GCCVER%%/
271 include/c++/%%GCCVER%%/backward/
280 include/c++/%%GCCVER%%/bits/
287 atomic_lockfree_defines.h
292 boost_concept_check.h
301 cxxabi_init_exception.h
303 enable_special_members.h
327 locale_facets_nonio.h
328 locale_facets_nonio.tcc
375 stl_iterator_base_funcs.h
376 stl_iterator_base_types.h
384 stl_raw_storage_iter.h
407 include/c++/%%GCCVER%%/
441 include/c++/%%GCCVER%%/debug/
461 safe_local_iterator.h
462 safe_local_iterator.tcc
465 safe_unordered_base.h
466 safe_unordered_container.h
467 safe_unordered_container.tcc
475 include/c++/%%GCCVER%%/decimal/
478 include/c++/%%GCCVER%%/
481 include/c++/%%GCCVER%%/experimental/
485 include/c++/%%GCCVER%%/experimental/bits/
494 include/c++/%%GCCVER%%/experimental/
521 include/c++/%%GCCVER%%/ext/
530 codecvt_specializations.h
545 include/c++/%%GCCVER%%/ext/pb_ds/
547 include/c++/%%GCCVER%%/ext/pb_ds/detail/bin_search_tree_/
549 constructors_destructor_fn_imps.hpp
555 iterators_fn_imps.hpp
558 policy_access_fn_imps.hpp
561 split_join_fn_imps.hpp
563 include/c++/%%GCCVER%%/ext/pb_ds/detail/binary_heap_/
566 constructors_destructor_fn_imps.hpp
574 iterators_fn_imps.hpp
575 point_const_iterator.hpp
576 policy_access_fn_imps.hpp
578 split_join_fn_imps.hpp
580 include/c++/%%GCCVER%%/ext/pb_ds/detail/binomial_heap_/
582 constructors_destructor_fn_imps.hpp
584 include/c++/%%GCCVER%%/ext/pb_ds/detail/binomial_heap_base_/
585 binomial_heap_base_.hpp
586 constructors_destructor_fn_imps.hpp
591 split_join_fn_imps.hpp
592 include/c++/%%GCCVER%%/ext/pb_ds/detail/branch_policy/
594 null_node_metadata.hpp
596 include/c++/%%GCCVER%%/ext/pb_ds/detail/cc_hash_table_map_/
599 cond_key_dtor_entry_dealtor.hpp
600 constructor_destructor_fn_imps.hpp
601 constructor_destructor_no_store_hash_fn_imps.hpp
602 constructor_destructor_store_hash_fn_imps.hpp
604 debug_no_store_hash_fn_imps.hpp
605 debug_store_hash_fn_imps.hpp
606 entry_list_fn_imps.hpp
608 erase_no_store_hash_fn_imps.hpp
609 erase_store_hash_fn_imps.hpp
611 find_store_hash_fn_imps.hpp
614 insert_no_store_hash_fn_imps.hpp
615 insert_store_hash_fn_imps.hpp
616 iterators_fn_imps.hpp
617 policy_access_fn_imps.hpp
619 resize_no_store_hash_fn_imps.hpp
620 resize_store_hash_fn_imps.hpp
623 include/c++/%%GCCVER%%/ext/pb_ds/detail/
625 container_base_dispatch.hpp
627 include/c++/%%GCCVER%%/ext/pb_ds/detail/eq_fn/
630 include/c++/%%GCCVER%%/ext/pb_ds/detail/gp_hash_table_map_/
631 constructor_destructor_fn_imps.hpp
632 constructor_destructor_no_store_hash_fn_imps.hpp
633 constructor_destructor_store_hash_fn_imps.hpp
635 debug_no_store_hash_fn_imps.hpp
636 debug_store_hash_fn_imps.hpp
638 erase_no_store_hash_fn_imps.hpp
639 erase_store_hash_fn_imps.hpp
641 find_no_store_hash_fn_imps.hpp
642 find_store_hash_fn_imps.hpp
646 insert_no_store_hash_fn_imps.hpp
647 insert_store_hash_fn_imps.hpp
649 policy_access_fn_imps.hpp
651 resize_no_store_hash_fn_imps.hpp
652 resize_store_hash_fn_imps.hpp
654 include/c++/%%GCCVER%%/ext/pb_ds/detail/hash_fn/
655 direct_mask_range_hashing_imp.hpp
656 direct_mod_range_hashing_imp.hpp
657 linear_probe_fn_imp.hpp
658 mask_based_range_hashing.hpp
659 mod_based_range_hashing.hpp
661 quadratic_probe_fn_imp.hpp
665 sample_range_hashing.hpp
666 sample_ranged_hash_fn.hpp
667 sample_ranged_probe_fn.hpp
668 include/c++/%%GCCVER%%/ext/pb_ds/detail/left_child_next_sibling_heap_/
670 constructors_destructor_fn_imps.hpp
675 iterators_fn_imps.hpp
676 left_child_next_sibling_heap_.hpp
678 point_const_iterator.hpp
679 policy_access_fn_imps.hpp
681 include/c++/%%GCCVER%%/ext/pb_ds/detail/list_update_map_/
682 constructor_destructor_fn_imps.hpp
684 entry_metadata_base.hpp
689 iterators_fn_imps.hpp
692 include/c++/%%GCCVER%%/ext/pb_ds/detail/list_update_policy/
693 lu_counter_metadata.hpp
694 sample_update_policy.hpp
695 include/c++/%%GCCVER%%/ext/pb_ds/detail/ov_tree_map_/
696 constructors_destructor_fn_imps.hpp
701 iterators_fn_imps.hpp
704 policy_access_fn_imps.hpp
705 split_join_fn_imps.hpp
707 include/c++/%%GCCVER%%/ext/pb_ds/detail/pairing_heap_/
708 constructors_destructor_fn_imps.hpp
714 split_join_fn_imps.hpp
715 include/c++/%%GCCVER%%/ext/pb_ds/detail/pat_trie_/
716 constructors_destructor_fn_imps.hpp
721 insert_join_fn_imps.hpp
722 iterators_fn_imps.hpp
725 policy_access_fn_imps.hpp
729 synth_access_traits.hpp
733 include/c++/%%GCCVER%%/ext/pb_ds/detail/
734 priority_queue_base_dispatch.hpp
735 include/c++/%%GCCVER%%/ext/pb_ds/detail/rb_tree_map_/
736 constructors_destructor_fn_imps.hpp
744 split_join_fn_imps.hpp
746 include/c++/%%GCCVER%%/ext/pb_ds/detail/rc_binomial_heap_/
747 constructors_destructor_fn_imps.hpp
752 rc_binomial_heap_.hpp
753 split_join_fn_imps.hpp
755 include/c++/%%GCCVER%%/ext/pb_ds/detail/resize_policy/
756 cc_hash_max_collision_check_resize_trigger_imp.hpp
757 hash_exponential_size_policy_imp.hpp
758 hash_load_check_resize_trigger_imp.hpp
759 hash_load_check_resize_trigger_size_base.hpp
760 hash_prime_size_policy_imp.hpp
761 hash_standard_resize_policy_imp.hpp
762 sample_resize_policy.hpp
763 sample_resize_trigger.hpp
764 sample_size_policy.hpp
765 include/c++/%%GCCVER%%/ext/pb_ds/detail/splay_tree_/
766 constructors_destructor_fn_imps.hpp
775 split_join_fn_imps.hpp
777 include/c++/%%GCCVER%%/ext/pb_ds/detail/
778 standard_policies.hpp
779 include/c++/%%GCCVER%%/ext/pb_ds/detail/thin_heap_/
780 constructors_destructor_fn_imps.hpp
785 split_join_fn_imps.hpp
788 include/c++/%%GCCVER%%/ext/pb_ds/detail/tree_policy/
789 node_metadata_selector.hpp
790 order_statistics_imp.hpp
791 sample_tree_node_update.hpp
792 include/c++/%%GCCVER%%/ext/pb_ds/detail/
794 include/c++/%%GCCVER%%/ext/pb_ds/detail/trie_policy/
795 node_metadata_selector.hpp
796 order_statistics_imp.hpp
797 prefix_search_node_update_imp.hpp
798 sample_trie_access_traits.hpp
799 sample_trie_node_update.hpp
801 trie_string_access_traits_imp.hpp
802 include/c++/%%GCCVER%%/ext/pb_ds/detail/
805 include/c++/%%GCCVER%%/ext/pb_ds/detail/unordered_iterator/
808 point_const_iterator.hpp
810 include/c++/%%GCCVER%%/ext/pb_ds/
813 list_update_policy.hpp
818 include/c++/%%GCCVER%%/ext/
840 include/c++/%%GCCVER%%/
864 include/c++/%%GCCVER%%/parallel/
874 compiletime_settings.h
908 include/c++/%%GCCVER%%/profile/
914 include/c++/%%GCCVER%%/profile/impl/
917 profiler_container_size.h
919 profiler_hashtable_size.h
920 profiler_list_to_slist.h
921 profiler_list_to_vector.h
922 profiler_map_to_unordered_map.h
926 profiler_vector_size.h
927 profiler_vector_to_list.h
928 include/c++/%%GCCVER%%/profile/
942 include/c++/%%GCCVER%%/
960 include/c++/%%GCCVER%%/tr1/
994 legendre_function.tcc
998 modified_bessel_func.tcc
1007 special_function_util.h
1023 include/c++/%%GCCVER%%/tr2/
1030 include/c++/%%GCCVER%%/
1041 lib/gcc/%%TARGET%%/%%GCCVER%%/
1046 lib/gcc/%%TARGET%%/%%GCCVER%%/finclude/
1058 lib/gcc/%%TARGET%%/%%GCCVER%%/include-fixed/
1062 lib/gcc/%%TARGET%%/%%GCCVER%%/include/
1066 avx5124fmapsintrin.h
1067 avx5124vnniwintrin.h
1074 avx512ifmavlintrin.h
1077 avx512vbmivlintrin.h
1081 avx512vpopcntdqintrin.h
1121 lib/gcc/%%TARGET%%/%%GCCVER%%/include/ssp/
1126 lib/gcc/%%TARGET%%/%%GCCVER%%/include/
1149 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1152 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/include/
1155 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1158 lib/gcc/%%TARGET%%/%%GCCVER%%/
1163 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/
1165 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/ada/gcc-interface/ada-tree.def
1166 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1187 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/c-family/
1193 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1218 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
1221 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
1231 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
1234 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1240 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/cp/
1246 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1310 gimple-pretty-print.h
1335 highlev-plugin-common.h
1391 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/objc/objc-tree.def
1474 substring-locations.h
1481 target-hooks-macros.h
1519 tree-scalar-evolution.h
1526 tree-ssa-loop-ivopts.h
1527 tree-ssa-loop-manip.h
1528 tree-ssa-loop-niter.h
1531 tree-ssa-propagate.h
1533 tree-ssa-scopedtables.h
1535 tree-ssa-threadbackward.h
1536 tree-ssa-threadedge.h
1537 tree-ssa-threadupdate.h
1563 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/
1566 libcc1plugin.so.0.0.0
1569 libcp1plugin.so.0.0.0
1570 libexec/gcc/%%TARGET%%/%%GCCVER%%/
1576 libexec/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1581 libexec/gcc/%%TARGET%%/%%GCCVER%%/
1584 liblto_plugin.so.0.0.0
1587 libexec/gcc/%%TARGET%%/%%GCCVER%%/plugin/gengtype
1590 [FILE:27199:manifests/plist.ada_run]
1591 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/adainclude/
1594 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/adalib/
1597 lib/gcc/%%TARGET%%/%%GCCVER%%/adainclude/
2843 lib/gcc/%%TARGET%%/%%GCCVER%%/adalib/
3538 [FILE:262:manifests/plist.cxx_run]
3544 libstdc++.so.6.0.23-gdb.py
3547 share/gcc-%%GCCVER%%/python/libstdcxx/__init__.py
3548 share/gcc-%%GCCVER%%/python/libstdcxx/v6/
3554 [FILE:240:manifests/plist.fortran_run]
3559 libgfortran.so.4.0.0
3569 libquadmath.so.0.0.0
3572 [FILE:452:manifests/plist.libs]
3581 @comment %%ASLIB%%/libcilkrts.a
3582 @comment %%ASLIB%%/libcilkrts.so
3583 @comment %%ASLIB%%/libcilkrts.so.5
3584 @comment %%ASLIB%%/libcilkrts.so.5.0.0
3585 @comment %%ASLIB%%/libcilkrts.spec
3600 [FILE:104:manifests/plist.infopages]
3611 [FILE:39877:patches/patch-diff-ada]
3612 --- gcc/ada/adaint.c.orig
3613 +++ gcc/ada/adaint.c
3614 @@ -1174,6 +1174,47 @@
3618 +#elif defined (__ANDROID__)
3621 + * ext2 /ext3/ext4/fat16/fat32 have no path limits
3622 + * /data/local/tmp normally requires rooted devices, if it even exists
3623 + * /sdcard is the standard location for external storage. Nativeactivity
3624 + * manifest needs to authorize its use, otherwise it might not have the
3625 + * proper permissions.
3629 + char *datadir = getenv ("ANDROID_DATA");
3631 + if (datadir == NULL)
3632 + strncpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX", L_tmpnam);
3634 + snprintf (tmp_filename, L_tmpnam, "%s/local/tmp/gnat-XXXXXX", datadir);
3636 + testfd = mkstemp (tmp_filename);
3643 + char *sdcard = getenv ("EXTERNAL_STORAGE");
3645 + if (sdcard == NULL)
3646 + strncpy (tmp_filename, "/sdcard/gnat-XXXXXX", L_tmpnam);
3648 + snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", sdcard);
3650 + testfd = mkstemp (tmp_filename);
3657 + tmpnam (tmp_filename);
3659 #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
3660 || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
3661 || defined (__DragonFly__)
3662 @@ -1460,7 +1501,7 @@
3663 utimbuf.modtime = time_stamp;
3665 /* Set access time to now in local time. */
3666 - t = time ((time_t) 0);
3668 utimbuf.actime = mktime (localtime (&t));
3670 utime (name, &utimbuf);
3671 --- gcc/ada/cio.c.orig
3675 /* Don't use macros on GNU/Linux since they cause incompatible changes between
3676 glibc 2.0 and 2.1 */
3678 +#if defined __linux__ && !defined __ANDROID__
3682 --- gcc/ada/cstreams.c.orig
3683 +++ gcc/ada/cstreams.c
3685 #include <unixlib.h>
3689 +#if defined __linux__ && !defined __ANDROID__
3690 /* Don't use macros on GNU/Linux since they cause incompatible changes between
3691 glibc 2.0 and 2.1 */
3694 +++ gcc/ada/g-socthi-bsd.adb
3696 +------------------------------------------------------------------------------
3698 +-- GNAT COMPILER COMPONENTS --
3700 +-- G N A T . S O C K E T S . T H I N --
3704 +-- Copyright (C) 2001-2013, AdaCore --
3706 +-- GNAT is free software; you can redistribute it and/or modify it under --
3707 +-- terms of the GNU General Public License as published by the Free Soft- --
3708 +-- ware Foundation; either version 3, or (at your option) any later ver- --
3709 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
3710 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
3711 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
3713 +-- As a special exception under Section 7 of GPL version 3, you are granted --
3714 +-- additional permissions described in the GCC Runtime Library Exception, --
3715 +-- version 3.1, as published by the Free Software Foundation. --
3717 +-- You should have received a copy of the GNU General Public License and --
3718 +-- a copy of the GCC Runtime Library Exception along with this program; --
3719 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
3720 +-- <http://www.gnu.org/licenses/>. --
3722 +-- GNAT was originally developed by the GNAT team at New York University. --
3723 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
3725 +------------------------------------------------------------------------------
3727 +-- This package provides a target dependent thin interface to the sockets
3728 +-- layer for use by the GNAT.Sockets package (g-socket.ads). This package
3729 +-- should not be directly with'ed by an applications program.
3731 +-- This is the *BSD version which uses fcntl rather than ioctl
3732 +-- The constant SCON.Thread_Blocking_IO is always true (for all platforms, not
3733 +-- just *BSD), so this binding is significantly simpler than the standard
3734 +-- one it replaces.
3736 +with GNAT.OS_Lib; use GNAT.OS_Lib;
3738 +with Interfaces.C; use Interfaces.C;
3740 +package body GNAT.Sockets.Thin is
3742 + function Syscall_Accept
3744 + Addr : System.Address;
3745 + Addrlen : not null access C.int) return C.int;
3746 + pragma Import (C, Syscall_Accept, "accept");
3747 + -- The accept() function accepts a connection on a socket. An incoming
3748 + -- connection is acknowledged and associated with an immediately created
3749 + -- socket. The original socket is returned to the listening state.
3751 + function Syscall_Connect
3753 + Name : System.Address;
3754 + Namelen : C.int) return C.int;
3755 + pragma Import (C, Syscall_Connect, "connect");
3756 + -- The connect() system call initiates a connection on a socket. If the
3757 + -- parameter S is of type SOCK_DGRAM then connect() permanently specifies
3758 + -- the peer to which datagrams are to be sent. If S is type SOCK_STREAM
3759 + -- then connect() attempts to make a connection with another socket, which
3760 + -- is identified by the parameter Name.
3762 + function Syscall_Recv
3764 + Msg : System.Address;
3766 + Flags : C.int) return C.int;
3767 + pragma Import (C, Syscall_Recv, "recv");
3768 + -- The recv() function receives a message from a socket. The call can be
3769 + -- used on a connection mode socket or a bound, connectionless socket. If
3770 + -- no messages are available at the socket, the recv() call waits for a
3771 + -- message to arrive unless the socket is non-blocking. If a socket is
3772 + -- non-blocking, the call returns a -1 and ERRNO is set to EWOULDBLOCK.
3774 + function Syscall_Recvfrom
3776 + Msg : System.Address;
3779 + From : System.Address;
3780 + Fromlen : not null access C.int) return C.int;
3781 + pragma Import (C, Syscall_Recvfrom, "recvfrom");
3782 + -- The recvfrom() system call receives a message from a socket and captures
3783 + -- the address from which the data was sent. It can be used to receive
3784 + -- data on an unconnected socket as well. If no messages are available,
3785 + -- the call waits for a message to arrive on blocking sockets. For
3786 + -- non-blocking sockets without messages, -1 is returned and ERRNO is set
3787 + -- to EAGAIN or EWOULDBLOCK.
3789 + function Syscall_Recvmsg
3791 + Msg : System.Address;
3792 + Flags : C.int) return System.CRTL.ssize_t;
3793 + pragma Import (C, Syscall_Recvmsg, "recvmsg");
3794 + -- The recvmsg call receives a message from a socket, and can be used to
3795 + -- receive data on an unconnected socket as well. If no messages are
3796 + -- available, the call waits for a message to arrive on blocking sockets.
3797 + -- For non-blocking sockets without messages, -1 is returned and ERRNO is
3798 + -- set to EAGAIN or EWOULDBLOCK.
3800 + function Syscall_Sendmsg
3802 + Msg : System.Address;
3803 + Flags : C.int) return System.CRTL.ssize_t;
3804 + pragma Import (C, Syscall_Sendmsg, "sendmsg");
3805 + -- The sendmsg() function sends a message to a socket, and can be used with
3806 + -- unconnected sockets as well (the msg is ignored in this case). The
3807 + -- function returns the number of bytes sent when successful, otherwise it
3808 + -- returns -1 and ERRNO is set (many possible values).
3810 + function Syscall_Sendto
3812 + Msg : System.Address;
3815 + To : System.Address;
3816 + Tolen : C.int) return C.int;
3817 + pragma Import (C, Syscall_Sendto, "sendto");
3818 + -- The sendto() function only works for connected sockets and it initiates
3819 + -- the transmission of a message. A successful call returns the numbers of
3820 + -- bytes sent, and a failure returns a -1 and ERRNO is set.
3822 + function Syscall_Socket
3825 + Protocol : C.int) return C.int;
3826 + pragma Import (C, Syscall_Socket, "socket");
3827 + -- The socket() function is used to create an unbound socket and returns a
3828 + -- file descriptor that can be used with other socket functions. Upon
3829 + -- failure, a -1 is returned and ERRNO is set.
3831 + procedure Disable_SIGPIPE (S : C.int);
3832 + pragma Import (C, Disable_SIGPIPE, "__gnat_disable_sigpipe");
3834 + procedure Disable_All_SIGPIPEs;
3835 + pragma Import (C, Disable_All_SIGPIPEs, "__gnat_disable_all_sigpipes");
3836 + -- Sets the process to ignore all SIGPIPE signals on platforms that
3837 + -- don't support Disable_SIGPIPE for particular streams.
3842 + Val : C.int) return C.int;
3843 + pragma Import (C, C_Fcntl, "fcntl");
3844 + -- The ioctl of 64-bit DragonFlyBSD, OpenBSD, and NetBSD does not support
3845 + -- setting a socket in non-blocking mode. fcntl must be used instead.
3853 + Addr : System.Address;
3854 + Addrlen : not null access C.int) return C.int
3856 + R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
3859 + Disable_SIGPIPE (R);
3867 + function C_Connect
3869 + Name : System.Address;
3870 + Namelen : C.int) return C.int
3873 + return Syscall_Connect (S, Name, Namelen);
3876 + ------------------
3877 + -- Socket_Ioctl --
3878 + ------------------
3880 + function Socket_Ioctl
3882 + Req : SOSC.IOCTL_Req_T;
3883 + Arg : access C.int) return C.int
3886 + if Req = SOSC.FIONBIO then
3889 + flags : constant Unsigned_32 :=
3890 + Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
3891 + nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.O_NDELAY);
3892 + enabled : constant Boolean := Arg.all = 1;
3893 + newval : C.int := C.int (flags);
3896 + newval := C.int (flags or nonblock);
3897 + elsif (flags and nonblock) > 0 then
3898 + newval := C.int (flags - nonblock);
3900 + return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
3904 + return C_Ioctl (S, Req, Arg);
3913 + Msg : System.Address;
3915 + Flags : C.int) return C.int
3918 + return Syscall_Recv (S, Msg, Len, Flags);
3925 + function C_Recvfrom
3927 + Msg : System.Address;
3930 + From : System.Address;
3931 + Fromlen : not null access C.int) return C.int
3934 + return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
3941 + function C_Recvmsg
3943 + Msg : System.Address;
3944 + Flags : C.int) return System.CRTL.ssize_t
3947 + return Syscall_Recvmsg (S, Msg, Flags);
3954 + function C_Sendmsg
3956 + Msg : System.Address;
3957 + Flags : C.int) return System.CRTL.ssize_t
3960 + return Syscall_Sendmsg (S, Msg, Flags);
3969 + Msg : System.Address;
3972 + To : System.Address;
3973 + Tolen : C.int) return C.int
3976 + return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
3986 + Protocol : C.int) return C.int
3988 + R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
3990 + Disable_SIGPIPE (R);
3998 + procedure Finalize is
4003 + -------------------------
4004 + -- Host_Error_Messages --
4005 + -------------------------
4007 + package body Host_Error_Messages is separate;
4013 + procedure Initialize is
4015 + Disable_All_SIGPIPEs;
4018 + --------------------
4019 + -- Signalling_Fds --
4020 + --------------------
4022 + package body Signalling_Fds is
4024 + -- In this default implementation, we use a C version of these
4025 + -- subprograms provided by socket.c.
4027 + function C_Create (Fds : not null access Fd_Pair) return C.int;
4028 + function C_Read (Rsig : C.int) return C.int;
4029 + function C_Write (Wsig : C.int) return C.int;
4030 + procedure C_Close (Sig : C.int);
4032 + pragma Import (C, C_Create, "__gnat_create_signalling_fds");
4033 + pragma Import (C, C_Read, "__gnat_read_signalling_fd");
4034 + pragma Import (C, C_Write, "__gnat_write_signalling_fd");
4035 + pragma Import (C, C_Close, "__gnat_close_signalling_fd");
4038 + (Fds : not null access Fd_Pair) return C.int renames C_Create;
4039 + function Read (Rsig : C.int) return C.int renames C_Read;
4040 + function Write (Wsig : C.int) return C.int renames C_Write;
4041 + procedure Close (Sig : C.int) renames C_Close;
4043 + end Signalling_Fds;
4045 + --------------------------
4046 + -- Socket_Error_Message --
4047 + --------------------------
4049 + function Socket_Error_Message (Errno : Integer) return String is separate;
4051 +end GNAT.Sockets.Thin;
4052 --- gcc/ada/gnatchop.adb.orig
4053 +++ gcc/ada/gnatchop.adb
4055 Config_File_Name : constant String_Access := new String'("gnat.adc");
4056 -- The name of the file holding the GNAT configuration pragmas
4058 - Gcc : String_Access := new String'("gcc");
4059 + Gcc : String_Access := new String'("ada");
4060 -- May be modified by switch --GCC=
4062 Gcc_Set : Boolean := False;
4063 --- gcc/ada/gnatlink.adb.orig
4064 +++ gcc/ada/gnatlink.adb
4066 -- This table collects the arguments to be passed to compile the binder
4069 - Gcc : String_Access := Program_Name ("gcc", "gnatlink");
4070 + Gcc : String_Access := Program_Name ("ada", "gnatlink");
4072 Read_Mode : constant String := "r" & ASCII.NUL;
4074 --- gcc/ada/make.adb.orig
4075 +++ gcc/ada/make.adb
4077 -- Compiler, Binder & Linker Data and Subprograms --
4078 ----------------------------------------------------
4080 - Gcc : String_Access := Program_Name ("gcc", "gnatmake");
4081 + Gcc : String_Access := Program_Name ("ada", "gnatmake");
4082 Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
4083 Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
4084 -- Default compiler, binder, linker programs
4085 --- gcc/ada/mlib-prj.adb.orig
4086 +++ gcc/ada/mlib-prj.adb
4087 @@ -335,6 +335,11 @@
4089 Foreign_Sources : Boolean;
4091 + Rpath_Disabled : Boolean := False;
4092 + -- If -R is passed through the library options for the linker, it will
4093 + -- prevent the implemented libraries portion of the rpath switch from
4094 + -- being built, even if the linker is capable of supporting rpath.
4096 Rpath : String_Access := null;
4097 -- Allocated only if Path Option is supported
4100 Opts.Table (Opts.Last) :=
4101 new String'("-L" & Name_Buffer (1 .. Name_Len));
4103 - if Path_Option /= null then
4104 + if not Rpath_Disabled and then Path_Option /= null then
4105 Add_Rpath (Name_Buffer (1 .. Name_Len));
4108 @@ -1299,9 +1304,13 @@
4109 Get_Name_String (Element.Value);
4111 if Name_Len /= 0 then
4112 - Opts.Increment_Last;
4113 - Opts.Table (Opts.Last) :=
4114 - new String'(Name_Buffer (1 .. Name_Len));
4115 + if Name_Buffer (1 .. Name_Len) = "-R" then
4116 + Rpath_Disabled := True;
4118 + Opts.Increment_Last;
4119 + Opts.Table (Opts.Last) :=
4120 + new String'(Name_Buffer (1 .. Name_Len));
4124 Current := Element.Next;
4125 --- gcc/ada/mlib-utl.adb.orig
4126 +++ gcc/ada/mlib-utl.adb
4128 if Driver_Name = No_Name then
4129 if Gcc_Exec = null then
4130 if Gcc_Name = null then
4131 - Gcc_Name := Osint.Program_Name ("gcc", "gnatmake");
4132 + Gcc_Name := Osint.Program_Name ("ada", "gnatmake");
4135 Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all);
4136 --- gcc/ada/prj-makr.adb.orig
4137 +++ gcc/ada/prj-makr.adb
4140 procedure Dup2 (Old_Fd, New_Fd : File_Descriptor);
4142 - Gcc : constant String := "gcc";
4143 + Gcc : constant String := "ada";
4144 Gcc_Path : String_Access := null;
4146 Non_Empty_Node : constant Project_Node_Id := 1;
4148 +++ gcc/ada/s-trasym-bsd.adb
4150 +------------------------------------------------------------------------------
4152 +-- GNAT RUN-TIME COMPONENTS --
4154 +-- S Y S T E M . T R A C E B A C K . S Y M B O L I C --
4158 +-- Copyright (C) 1999-2009, AdaCore --
4160 +-- GNAT is free software; you can redistribute it and/or modify it under --
4161 +-- terms of the GNU General Public License as published by the Free Soft- --
4162 +-- ware Foundation; either version 2, or (at your option) any later ver- --
4163 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
4164 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
4165 +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
4166 +-- for more details. You should have received a copy of the GNU General --
4167 +-- Public License distributed with GNAT; see file COPYING. If not, write --
4168 +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
4169 +-- Boston, MA 02110-1301, USA. --
4171 +-- As a special exception, if other files instantiate generics from this --
4172 +-- unit, or you link this unit with other files to produce an executable, --
4173 +-- this unit does not by itself cause the resulting executable to be --
4174 +-- covered by the GNU General Public License. This exception does not --
4175 +-- however invalidate any other reasons why the executable file might be --
4176 +-- covered by the GNU Public License. --
4178 +-- GNAT was originally developed by the GNAT team at New York University. --
4179 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
4181 +------------------------------------------------------------------------------
4183 +-- Run-time symbolic traceback support
4184 +-- This file is based on the work by Juergen Pfiefer which is still used
4185 +-- today to provide symbolic traceback support for gnu/kFreeBSD.
4186 +-- Incorporated in GNAT-AUX by John Marino <http://www.dragonlace.net>
4188 +with System.Soft_Links;
4189 +with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
4191 +package body System.Traceback.Symbolic is
4193 + package TSL renames System.Soft_Links;
4195 + -- To perform the raw addresses to symbolic form translation we rely on a
4196 + -- libaddr2line symbolizer which examines debug info from a provided
4197 + -- executable file name, and an absolute path is needed to ensure the file
4198 + -- is always found. This is "__gnat_locate_exec_on_path (gnat_argv [0])"
4199 + -- for our executable file, a fairly heavy operation so we cache the
4202 + Exename : System.Address;
4203 + -- Pointer to the name of the executable file to be used on all
4204 + -- invocations of the libaddr2line symbolization service.
4206 + Exename_Resolved : Boolean := False;
4207 + -- Flag to indicate whether we have performed the executable file name
4208 + -- resolution already. Relying on a not null Exename for this purpose
4209 + -- would be potentially inefficient as this is what we will get if the
4210 + -- resolution attempt fails.
4212 + ------------------------
4213 + -- Symbolic_Traceback --
4214 + ------------------------
4216 + function Symbolic_Traceback (Traceback : Tracebacks_Array) return String is
4218 + procedure convert_addresses
4219 + (filename : System.Address;
4220 + addrs : System.Address;
4221 + n_addrs : Integer;
4222 + buf : System.Address;
4223 + len : System.Address);
4224 + pragma Import (C, convert_addresses, "convert_addresses");
4225 + -- This is the procedure version of the Ada-aware addr2line. It places
4226 + -- in BUF a string representing the symbolic translation of the N_ADDRS
4227 + -- raw addresses provided in ADDRS, looked up in debug information from
4228 + -- FILENAME. LEN points to an integer which contains the size of the
4229 + -- BUF buffer at input and the result length at output.
4231 + -- Note that this procedure is *not* thread-safe.
4233 + type Argv_Array is array (0 .. 0) of System.Address;
4234 + gnat_argv : access Argv_Array;
4235 + pragma Import (C, gnat_argv, "gnat_argv");
4237 + function locate_exec_on_path
4238 + (c_exename : System.Address) return System.Address;
4239 + pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
4241 + B_Size : constant Integer := 256 * Traceback'Length;
4242 + Len : Integer := B_Size;
4243 + Res : String (1 .. B_Size);
4245 + use type System.Address;
4248 + -- The symbolic translation of an empty set of addresses is an empty
4251 + if Traceback'Length = 0 then
4255 + -- If our input set of raw addresses is not empty, resort to the
4256 + -- libaddr2line service to symbolize it all.
4258 + -- Compute, cache and provide the absolute path to our executable file
4259 + -- name as the binary file where the relevant debug information is to be
4260 + -- found. If the executable file name resolution fails, we have no
4261 + -- sensible basis to invoke the symbolizer at all.
4263 + -- Protect all this against concurrent accesses explicitly, as the
4264 + -- underlying services are potentially thread unsafe.
4266 + TSL.Lock_Task.all;
4268 + if not Exename_Resolved then
4269 + Exename := locate_exec_on_path (gnat_argv (0));
4270 + Exename_Resolved := True;
4273 + if Exename /= System.Null_Address then
4274 + Len := Res'Length;
4276 + (Exename, Traceback'Address, Traceback'Length,
4277 + Res (1)'Address, Len'Address);
4280 + TSL.Unlock_Task.all;
4282 + -- Return what the addr2line symbolizer has produced if we have called
4283 + -- it (the executable name resolution succeeded), or an empty string
4286 + if Exename /= System.Null_Address then
4287 + return Res (1 .. Len);
4292 + end Symbolic_Traceback;
4294 + function Symbolic_Traceback
4295 + (E : Ada.Exceptions.Exception_Occurrence) return String is
4297 + return Symbolic_Traceback (Tracebacks (E));
4298 + end Symbolic_Traceback;
4300 +end System.Traceback.Symbolic;
4301 --- gcc/ada/terminals.c.orig
4302 +++ gcc/ada/terminals.c
4304 /* First all usupported platforms. Add stubs for exported routines. */
4306 #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \
4307 - || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__)
4308 + || defined (__PikeOS__) || defined(__DJGPP__)
4310 #define ATTRIBUTE_UNUSED __attribute__((unused))
4312 @@ -1052,7 +1052,7 @@
4313 || defined (__OpenBSD__) \
4314 || defined (__NetBSD__) \
4315 || defined (__DragonFly__)
4320 /* Include every system header we need */
4321 @@ -1063,8 +1063,8 @@
4323 /* On some system termio is either absent or including it will disable termios
4325 -#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \
4326 - && !defined (__rtems__)
4327 +#if ! defined (__hpux__) && ! defined (FREEBSD) && \
4328 + ! defined (__APPLE__) && ! defined(__rtems__)
4329 # include <termio.h>
4332 @@ -1076,10 +1076,10 @@
4333 #include <sys/types.h>
4334 #include <sys/wait.h>
4336 -#if defined (__sun__)
4338 # include <sys/stropts.h>
4340 -#if defined (BSD) || defined (__sun__)
4341 +#if defined (FREEBSD) || defined (sun)
4342 # include <sys/signal.h>
4344 #if defined (__hpux__)
4345 @@ -1087,11 +1087,15 @@
4346 # include <sys/stropts.h>
4350 +#define CDISABLE _PC_VDISABLE
4352 #define CDISABLE _POSIX_VDISABLE
4355 /* On HP-UX and Sun system, there is a bzero function but with a different
4356 signature. Use memset instead */
4357 -#if defined (__hpux__) || defined (__sun__) || defined (_AIX)
4358 +#if defined (__hpux__) || defined (sun) || defined (_AIX)
4359 # define bzero(s,n) memset (s,0,n)
4362 @@ -1109,11 +1113,11 @@
4365 /* Configurable part */
4366 -#if defined (__APPLE__) || defined (BSD)
4367 +#if defined (__APPLE__) || defined (FREEBSD)
4369 -#elif defined (__linux__)
4370 +#elif defined (linux)
4372 -#elif defined (__sun__)
4373 +#elif defined (sun)
4374 #define USE_CLONE_DEVICE "/dev/ptmx"
4375 #elif defined (_AIX)
4376 #define USE_CLONE_DEVICE "/dev/ptc"
4377 @@ -1399,7 +1403,7 @@
4378 desc->slave_fd = open (desc->slave_name, O_RDWR, 0);
4381 -#if defined (__sun__) || defined (__hpux__)
4382 +#if defined (sun) || defined (__hpux__)
4383 /* On systems such as Solaris we are using stream. We need to push the right
4384 "modules" in order to get the expected terminal behaviors. Otherwise
4385 functionalities such as termios are not available. */
4387 +++ gcc/ada/traceback_symbolic.c
4390 + Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
4391 + Ada for Linux Team (ALT)
4392 + Heavily modified by John Marino <http://www.dragonlace.net>
4394 + Permission is hereby granted, free of charge, to any person obtaining a
4395 + copy of this software and associated documentation files (the
4396 + "Software"), to deal in the Software without restriction, including
4397 + without limitation the rights to use, copy, modify, merge, publish,
4398 + distribute, distribute with modifications, sublicense, and/or sell
4399 + copies of the Software, and to permit persons to whom the Software is
4400 + furnished to do so, subject to the following conditions:
4402 + The above copyright notice and this permission notice shall be included
4403 + in all copies or substantial portions of the Software.
4405 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
4406 + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4407 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
4408 + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
4409 + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
4410 + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
4411 + THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4413 + Except as contained in this notice, the name(s) of the above copyright
4414 + holders shall not be used in advertising or otherwise to promote the
4415 + sale, use or other dealings in this Software without prior written
4423 + * Running addr2line doesn't make sense for cross-compiled objects.
4424 + * Create a dummy function to satisfy g-trasym.o
4428 +convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
4429 + void *addrs ATTRIBUTE_UNUSED,
4430 + int n_addr ATTRIBUTE_UNUSED,
4431 + void *buf ATTRIBUTE_UNUSED,
4432 + int *len ATTRIBUTE_UNUSED)
4441 + * use the external program /usr/bin/addr2line to convert addresses
4442 + * into file names and line numbers
4445 +#include <sys/types.h>
4446 +#include <stdlib.h>
4447 +#include <unistd.h>
4448 +#include <string.h>
4449 +#include <signal.h>
4451 +#define CLOSE_SENDPIPE close(sendpipe[0]); close(sendpipe[1])
4452 +#define CLOSE_READPIPE close(readpipe[0]); close(readpipe[1])
4453 +#define DUP2CLOSE(oldfd, newfd) dup2(oldfd, newfd); close(oldfd);
4454 +#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
4456 +#define MAX_LINE 1024
4457 +#define PARENT_READ readpipe[0]
4458 +#define CHILD_WRITE readpipe[1]
4459 +#define CHILD_READ sendpipe[0]
4460 +#define PARENT_WRITE sendpipe[1]
4462 +#if defined (__sun__)
4463 +#define ADDR2LINE_PROG "/usr/gnu/bin/addr2line"
4465 +#define ADDR2LINE_PROG "/usr/bin/addr2line"
4469 +convert_addresses (const char *file_name,
4475 + int max_len = *len;
4478 + struct sigaction act, oact;
4480 + int sendpipe[2] = {-1,-1}, /* parent -> child */
4481 + readpipe[2] = {-1,-1}; /* parent <- child */
4484 + act.sa_handler = SIG_IGN;
4485 + sigemptyset(&act.sa_mask);
4487 + if (sigaction(SIGPIPE,&act,&oact) < 0)
4490 + if (pipe(sendpipe) < 0) { RESTSIG; return; }
4491 + if (pipe(readpipe) < 0) { CLOSE_SENDPIPE; RESTSIG; return; }
4492 + if ((childpid = fork()) < 0) {
4499 + if (childpid == 0) { /* child process */
4500 + close(PARENT_WRITE);
4501 + close(PARENT_READ);
4502 + if ((CHILD_READ != STDIN_FILENO) && (CHILD_WRITE != STDOUT_FILENO)) {
4503 + if ((CHILD_READ == STDOUT_FILENO) && (CHILD_WRITE == STDIN_FILENO)) {
4504 + const int temp_fd = dup(CHILD_WRITE);
4505 + close (CHILD_WRITE);
4506 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4507 + DUP2CLOSE (temp_fd, STDOUT_FILENO);
4509 + else if ((CHILD_READ == STDIN_FILENO) && (CHILD_WRITE > 1)) {
4510 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4512 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDOUT_FILENO)) {
4513 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4515 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDIN_FILENO)) {
4516 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4517 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4520 + /* CHILD_READ >= 1 and CHILD_WRITE > 1 */
4521 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4522 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4525 + /* As pointed out by Florian Weimer to JP, it is a security threat to call
4526 + the script with a user defined environment and using the path. That
4527 + would be Trojans pleasure. Therefore the absolute path to addr2line
4528 + and an empty environment is used. That should be safe.
4530 + char *const argv[] = { "addr2line",
4532 + "--demangle=gnat",
4536 + char *const envp[] = { NULL };
4537 + if (execve(ADDR2LINE_PROG, argv, envp) < 0) {
4538 + close (CHILD_WRITE);
4539 + close (CHILD_READ);
4545 + /* Below this line is parent process */
4548 + char line[MAX_LINE + 1];
4551 + long *trace_address = addrs;
4553 + close(CHILD_WRITE);
4554 + close(CHILD_READ);
4556 + for(i=0; i < n_addr; i++) {
4557 + snprintf(hex,sizeof(hex),"%#lx\n",*trace_address);
4558 + write(PARENT_WRITE,hex,strlen(hex));
4559 + n = read(PARENT_READ,line,MAX_LINE);
4564 + /* We have approx. 16 additional chars for "%#lx in " clause.
4565 + We use this info to prevent a buffer overrun. */
4566 + if (n + 16 + (*len) > max_len)
4569 + p = strchr(line,'\n');
4573 + *len += snprintf(s, (max_len - (*len)), "%#lx in %s at %s",
4574 + *trace_address, line, p+1);
4577 + *len += snprintf(s, (max_len - (*len)), "%#lx at %s",
4578 + *trace_address, line);
4582 + trace_address += 1;
4584 + close (PARENT_WRITE);
4585 + close (PARENT_READ);
4590 --- gcc/ada/gcc-interface/Makefile.in.orig
4591 +++ gcc/ada/gcc-interface/Makefile.in
4592 @@ -1227,6 +1227,7 @@
4593 ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
4594 LIBGNAT_TARGET_PAIRS = \
4595 a-intnam.ads<a-intnam-linux.ads \
4596 + g-socthi.adb<g-socthi-bsd.adb \
4597 s-inmaop.adb<s-inmaop-posix.adb \
4598 s-intman.adb<s-intman-android.adb \
4599 s-linux.ads<s-linux-android.ads \
4600 @@ -1311,6 +1312,7 @@
4601 a-intnam.ads<a-intnam-solaris.ads \
4602 s-inmaop.adb<s-inmaop-posix.adb \
4603 s-intman.adb<s-intman-solaris.adb \
4604 + s-trasym.adb<s-trasym-bsd.adb \
4605 s-mudido.adb<s-mudido-affinity.adb \
4606 s-osinte.adb<s-osinte-solaris.adb \
4607 s-osinte.ads<s-osinte-solaris.ads \
4608 @@ -1347,6 +1349,8 @@
4609 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4612 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4613 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4614 THREADSLIB = -lposix4 -lthread
4615 MISCLIB = -lposix4 -lnsl -lsocket
4617 @@ -1495,10 +1499,45 @@
4618 LIBRARY_VERSION := $(LIB_VERSION)
4622 +ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
4623 + LIBGNAT_TARGET_PAIRS = \
4624 + a-intnam.ads<a-intnam-linux.ads \
4625 + g-socthi.adb<g-socthi-bsd.adb \
4626 + s-inmaop.adb<s-inmaop-posix.adb \
4627 + s-intman.adb<s-intman-posix.adb \
4628 + s-linux.ads<s-linux-android.ads \
4629 + s-osinte.adb<s-osinte-android.adb \
4630 + s-osinte.ads<s-osinte-android.ads \
4631 + s-osprim.adb<s-osprim-posix.adb \
4632 + s-taprop.adb<s-taprop-posix.adb \
4633 + s-taspri.ads<s-taspri-posix.ads \
4634 + s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
4635 + $(ATOMICS_TARGET_PAIRS) \
4636 + $(X86_TARGET_PAIRS) \
4637 + system.ads<system-linux-x86.ads
4639 + TOOLS_TARGET_PAIRS = \
4640 + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
4641 + indepsw.adb<indepsw-gnu.adb
4643 + EXTRA_LIBGNAT_OBJS=
4644 + EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
4645 + EXTRA_GNATRTL_NONTASKING_OBJS=
4650 + GNATLIB_SHARED = gnatlib-shared-dual
4651 + LIBRARY_VERSION := $(LIB_VERSION)
4655 ifeq ($(strip $(filter-out %aarch64 freebsd%,$(target_cpu) $(target_os))),)
4656 LIBGNAT_TARGET_PAIRS = \
4657 a-intnam.ads<a-intnam-freebsd.ads \
4658 + g-socthi.adb<g-socthi-bsd.adb \
4659 + s-trasym.adb<s-trasym-bsd.adb \
4660 s-inmaop.adb<s-inmaop-posix.adb \
4661 s-intman.adb<s-intman-posix.adb \
4662 s-mudido.adb<s-mudido-affinity.adb \
4663 @@ -1516,6 +1555,9 @@
4664 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4665 GNATLIB_SHARED = gnatlib-shared-dual
4667 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4668 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4671 THREADSLIB= -lpthread
4673 @@ -1527,6 +1569,8 @@
4674 ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
4675 LIBGNAT_TARGET_PAIRS = \
4676 a-intnam.ads<a-intnam-freebsd.ads \
4677 + g-socthi.adb<g-socthi-bsd.adb \
4678 + s-trasym.adb<s-trasym-bsd.adb \
4679 s-inmaop.adb<s-inmaop-posix.adb \
4680 s-intman.adb<s-intman-posix.adb \
4681 s-mudido.adb<s-mudido-affinity.adb \
4682 @@ -1544,6 +1588,8 @@
4683 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4684 GNATLIB_SHARED = gnatlib-shared-dual
4686 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4687 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4688 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4691 @@ -1557,6 +1603,8 @@
4692 ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
4693 LIBGNAT_TARGET_PAIRS = \
4694 a-intnam.ads<a-intnam-freebsd.ads \
4695 + g-socthi.adb<g-socthi-bsd.adb \
4696 + s-trasym.adb<s-trasym-bsd.adb \
4697 s-inmaop.adb<s-inmaop-posix.adb \
4698 s-intman.adb<s-intman-posix.adb \
4699 s-mudido.adb<s-mudido-affinity.adb \
4700 @@ -1574,6 +1622,8 @@
4701 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4702 GNATLIB_SHARED = gnatlib-shared-dual
4704 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4705 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4706 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4709 @@ -1587,6 +1637,8 @@
4710 ifeq ($(strip $(filter-out %86_64 dragonfly%,$(target_cpu) $(target_os))),)
4711 LIBGNAT_TARGET_PAIRS = \
4712 a-intnam.ads<a-intnam-dragonfly.ads \
4713 + g-socthi.adb<g-socthi-bsd.adb \
4714 + s-trasym.adb<s-trasym-bsd.adb \
4715 s-inmaop.adb<s-inmaop-posix.adb \
4716 s-intman.adb<s-intman-posix.adb \
4717 s-mudido.adb<s-mudido-affinity.adb \
4718 @@ -1604,6 +1656,8 @@
4719 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4720 GNATLIB_SHARED = gnatlib-shared-dual
4722 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4723 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4724 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
4727 --- gcc/ada/gcc-interface/Make-lang.in.orig
4728 +++ gcc/ada/gcc-interface/Make-lang.in
4732 # Language-independent object files.
4733 -ADA_BACKEND = $(BACKEND) attribs.o
4734 +ADA_BACKEND = $(BACKEND2) attribs.o
4736 # List of target dependent sources, overridden below as necessary
4738 --- gcc/ada/init.c.orig
4740 @@ -2541,8 +2541,15 @@
4742 mcontext_t *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
4744 +#if defined (__i386__)
4745 + unsigned long *pc = (unsigned long *)mcontext->gregs[REG_EIP];
4746 + /* The pattern is "orl $0x0,(%esp)" for a probe in 32-bit mode. */
4747 + if (signo == SIGSEGV && pc && *pc == 0x00240c83)
4748 + mcontext->gregs[REG_ESP] += 4096 + 4 * sizeof (unsigned long);
4749 +#elif defined (__ARMEL__)
4750 /* ARM Bump has to be an even number because of odd/even architecture. */
4751 - ((mcontext_t *) mcontext)->arm_pc += 2;
4752 + mcontext->arm_pc += 2;
4759 [FILE:19397:patches/patch-diff-ada-testsuite]
4760 --- gcc/testsuite/ada/acats/run_acats.sh.orig
4761 +++ gcc/testsuite/ada/acats/run_acats.sh
4766 -# Provide which replacement.
4768 -# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
4769 -# ksh93 and bash have it.
4770 -# type output format differs between ksh88 and ksh93, so avoid it if
4771 -# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
4772 -# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
4775 - path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
4776 - path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
4777 - path=`whence $* 2>/dev/null` && { echo $path; return 0; }
4781 # Set up environment to use the Ada compiler from the object tree
4783 --- gcc/testsuite/ada/acats/run_all.sh.orig
4784 +++ gcc/testsuite/ada/acats/run_all.sh
4787 # End of customization section.
4789 -# Perform arithmetic evaluation on the ARGs, and store the result in the
4790 -# global $as_val. Take advantage of shells that can avoid forks. The arguments
4791 -# must be portable across $(()) and expr.
4792 -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
4793 - eval 'as_fn_arith ()
4800 - as_val=`expr "$@" || test $? -eq 1`
4806 printf "$@" >> $dir/acats.sum
4808 echo "$@" >> $dir/acats.log
4812 + printf "%04d %7s" $1 $2
4821 if [ "$dir" = "$testdir" ]; then
4823 gnatls -v >> $dir/acats.log
4826 -if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
4827 - dir_support=$dir/../acats/support
4830 - mv $dir/tests $dir/tests.$$ 2> /dev/null
4831 - rm -rf $dir/tests.$$ &
4834 - cp -pr $dir/../acats/tests $dir/
4836 - dir_support=$dir/support
4838 display " === acats support ==="
4839 display_noeol "Generating support files..."
4848 display " === acats tests ==="
4850 if [ $# -eq 0 ]; then
4851 @@ -228,14 +206,20 @@
4860 for chapter in $chapters; do
4861 - # Used to generate support once and finish after that.
4862 - [ "$chapter" = "NONE" ] && continue
4863 + if [ -d $dir/tests/$chapter ]; then
4864 + cd $dir/tests/$chapter
4865 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
4866 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
4867 + > $dir/tests/$chapter/${chapter}.lst
4868 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
4869 + countdown=`expr $countdown + $countn`
4873 +for chapter in $chapters; do
4874 display Running chapter $chapter ...
4876 if [ ! -d $dir/tests/$chapter ]; then
4877 @@ -244,45 +228,11 @@
4881 - cd $dir/tests/$chapter
4882 - ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
4883 - cut -c1-7 | sort | uniq | comm -23 - $dir_support/norun.lst \
4884 - > $dir/tests/$chapter/${chapter}.lst
4885 countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
4886 - as_fn_arith $glob_countn + $countn
4887 - glob_countn=$as_val
4888 + glob_countn=`expr $glob_countn + $countn`
4890 for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
4892 - # If running multiple run_all.sh jobs in parallel, decide
4893 - # if we should run this test in the current instance.
4894 - if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
4896 - # Ugh, some tests have inter-test dependencies, those
4897 - # tests have to be scheduled on the same parallel instance
4898 - # as previous test.
4899 - ce2108f | ce2108h | ce3112d) ;;
4900 - # All others can be hopefully scheduled freely.
4902 - as_fn_arith $par_countm + 1
4903 - par_countm=$as_val
4904 - [ $par_countm -eq 10 ] && par_countm=0
4905 - if [ $par_countm -eq 1 ]; then
4906 - as_fn_arith $par_count + 1
4908 - if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
4915 - if [ -z "$par_last" ]; then
4916 - as_fn_arith $glob_countn - 1
4917 - glob_countn=$as_val
4922 + counti=`expr $counti + 1`
4923 extraflags="-gnat95"
4924 grep $i $testdir/overflow.lst > /dev/null 2>&1
4925 if [ $? -eq 0 ]; then
4926 @@ -300,10 +250,13 @@
4927 if [ $? -eq 0 ]; then
4928 extraflags="$extraflags -fstack-check"
4930 + inform $countdown $i
4931 + countdown=`expr $countdown - 1`
4932 test=$dir/tests/$chapter/$i
4933 mkdir $test && cd $test >> $dir/acats.log 2>&1
4935 if [ $? -ne 0 ]; then
4938 failed="${failed}${i} "
4940 @@ -321,19 +274,22 @@
4941 echo "BUILD $main" >> $dir/acats.log
4944 - cxb30*) EXTERNAL_OBJECTS="$dir_support/cxb30040.o $dir_support/cxb30060.o $dir_support/cxb30130.o $dir_support/cxb30131.o";;
4945 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
4946 ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
4947 ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
4948 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
4950 if [ "$main" = "" ]; then
4953 failed="${failed}${i} "
4958 - target_gnatmake $extraflags -I$dir_support $main >> $dir/acats.log 2>&1
4959 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
4960 if [ $? -ne 0 ]; then
4963 failed="${failed}${i} "
4966 target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
4967 cd $dir/tests/$chapter/$i
4968 cat ${i}.log >> $dir/acats.log
4970 egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
4971 if [ $? -ne 0 ]; then
4972 grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
4973 @@ -357,15 +314,12 @@
4974 failed="${failed}${i} "
4976 log "UNSUPPORTED: $i"
4977 - as_fn_arith $glob_countn - 1
4978 - glob_countn=$as_val
4979 - as_fn_arith $glob_countu + 1
4980 - glob_countu=$as_val
4981 + glob_countn=`expr $glob_countn - 1`
4982 + glob_countu=`expr $glob_countu + 1`
4986 - as_fn_arith $glob_countok + 1
4987 - glob_countok=$as_val
4988 + glob_countok=`expr $glob_countok + 1`
4993 +++ gcc/testsuite/ada/acats/run_remote.sh
4996 +# Run ACATS with the GNU Ada compiler
4998 +# The following functions are to be customized if you run in cross
4999 +# environment or want to change compilation flags. Note that for
5000 +# tests requiring checks not turned on by default, this script
5001 +# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
5003 +# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
5004 +# gnatflags="-gnatN"
5007 +gnatflags="-gnatws"
5008 +tabtarget="/data/local/testsuite"
5009 +STRIP="@REMOTE_TARGET@-strip"
5012 + # Run on rooted tablet (port 22 vs port 2222)
5014 + $STRIP_FOR_TARGET $*
5015 + /usr/bin/scp -qp $* root@tablet:$tabtarget/
5016 + /usr/bin/ssh -q tablet $tabtarget/$BN
5020 + /usr/bin/ssh -q tablet "$1"
5023 +# End of customization section.
5027 + printf "$@" >> $dir/acats.sum
5028 + printf "$@" >> $dir/acats.log
5033 + echo "$@" >> $dir/acats.sum
5034 + echo "$@" >> $dir/acats.log
5038 + echo "$@" >> $dir/acats.sum
5039 + echo "$@" >> $dir/acats.log
5043 + printf "%04d %7s" $1 $2
5050 +dir=`${PWDCMD-pwd}`
5052 +if [ "$testdir" = "" ]; then
5053 + echo You must use make check or make check-ada
5057 +if [ "$dir" = "$testdir" ]; then
5058 + echo "error: srcdir must be different than objdir, exiting."
5062 +target_gnatmake () {
5063 + echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
5064 + gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
5072 + rm -f "$binmain" *.o *.ali > /dev/null 2>&1
5076 + ls ${i}?.adb > ${i}.lst 2> /dev/null
5077 + ls ${i}*m.adb >> ${i}.lst 2> /dev/null
5078 + ls ${i}.adb >> ${i}.lst 2> /dev/null
5079 + main=`tail -1 ${i}.lst`
5083 + local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'`
5087 +EXTERNAL_OBJECTS=""
5088 +# Global variable to communicate external objects to link with.
5090 +rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst
5092 +display "Test Run By $USER on `date`"
5094 +display " === acats configuration ==="
5096 +target=`$GCC -dumpmachine`
5098 +display target gcc is $GCC
5099 +display `$GCC -v 2>&1`
5100 +display host=`gcc -dumpmachine`
5101 +display target=$target
5102 +display `type gnatmake-cross`
5103 +gnatls-cross -v >> $dir/acats.log
5106 +# Let's be tidy and clear off the remote device first
5107 +target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *"
5109 +display " === acats support ==="
5110 +display_noeol "Generating support files..."
5112 +rm -rf $dir/support
5113 +mkdir -p $dir/support
5116 +cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
5118 +# Find out the size in bit of an address on the target
5119 +target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
5120 +target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
5121 +target_bit=`cat $dir/support/impbit.out`
5122 +echo target_bit="$target_bit" >> $dir/acats.log
5124 +# Find out a suitable asm statement
5125 +# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
5127 + ia64*-*-* | s390*-*-*)
5128 + target_insn="nop 0"
5131 + target_insn="swym 0"
5137 +echo target_insn="$target_insn" >> $dir/acats.log
5139 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5140 + < $testdir/support/impdef.a > $dir/support/impdef.a
5141 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5142 + -e "s,ACATS4GNATBIT,$target_bit,g" \
5143 + -e "s,ACATS4GNATINSN,$target_insn,g" \
5144 + < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
5145 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5146 + < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
5148 +cp $testdir/tests/cd/*.c $dir/support
5149 +cp $testdir/tests/cxb/*.c $dir/support
5150 +grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst
5153 +mv $dir/tests $dir/tests.$$ 2> /dev/null
5154 +rm -rf $dir/tests.$$ &
5157 +cp -pr $testdir/tests $dir/
5159 +for i in $dir/support/*.ada $dir/support/*.a; do
5160 + host_gnatchop $i >> $dir/acats.log 2>&1
5163 +# These tools are used to preprocess some ACATS sources
5164 +# they need to be compiled native on the host.
5166 +host_gnatmake -q -gnatws macrosub.adb
5167 +if [ $? -ne 0 ]; then
5168 + display "**** Failed to compile macrosub"
5171 +./macrosub > macrosub.out 2>&1
5174 +host_gnatmake -q -gnatws widechr.adb
5175 +if [ $? -ne 0 ]; then
5176 + display "**** Failed to compile widechr"
5179 +./widechr > widechr.out 2>&1
5181 +rm -f $dir/support/macrosub
5182 +rm -f $dir/support/widechr
5183 +rm -f $dir/support/*.ali
5184 +rm -f $dir/support/*.o
5188 +# From here, all compilations will be made by the target compiler
5190 +display_noeol "Compiling support files..."
5193 +if [ $? -ne 0 ]; then
5194 + display "**** Failed to compile C code"
5198 +host_gnatchop *.adt >> $dir/acats.log 2>&1
5200 +target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
5201 +target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
5205 +display " === acats tests ==="
5207 +if [ $# -eq 0 ]; then
5208 + chapters=`cd $dir/tests; echo [a-z]*`
5218 +for chapter in $chapters; do
5219 + if [ -d $dir/tests/$chapter ]; then
5220 + cd $dir/tests/$chapter
5221 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
5222 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
5223 + > $dir/tests/$chapter/${chapter}.lst
5224 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
5225 + countdown=`expr $countdown + $countn`
5229 +cat > $dir/execute.sh << EOF
5231 + printf "left: %04d" \$1
5238 + local total=\$(echo \$testlist | awk '{print NF}')
5240 + echo "Executing \$total tests on remote device"
5242 + for x in \$testlist; do
5243 + timeout -t 30 ./\${x} > logs/\${x}.log 2>&1
5244 + countx=\$(expr \$countx + 1)
5245 + if [ \$countx -eq 25 ]; then
5246 + total=\$(expr \$total - 25)
5253 + tar -czf remote.logs.tar.gz logs
5258 +display "All tests are being cross-compiled without execution first."
5260 +for chapter in $chapters; do
5261 + if [ ! -d $dir/tests/$chapter ]; then
5265 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
5266 + glob_countn=`expr $glob_countn + $countn`
5268 + for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
5269 + counti=`expr $counti + 1`
5270 + extraflags="-gnat95"
5271 + grep $i $testdir/overflow.lst > /dev/null 2>&1
5272 + if [ $? -eq 0 ]; then
5273 + extraflags="$extraflags -gnato"
5275 + grep $i $testdir/elabd.lst > /dev/null 2>&1
5276 + if [ $? -eq 0 ]; then
5277 + extraflags="$extraflags -gnatE"
5279 + grep $i $testdir/floatstore.lst > /dev/null 2>&1
5280 + if [ $? -eq 0 ]; then
5281 + extraflags="$extraflags -ffloat-store"
5283 + grep $i $testdir/stackcheck.lst > /dev/null 2>&1
5284 + if [ $? -eq 0 ]; then
5285 + extraflags="$extraflags -fstack-check"
5287 + inform $countdown $i
5288 + countdown=`expr $countdown - 1`
5289 + test=$dir/tests/$chapter/$i
5290 + mkdir $test && cd $test >> $dir/acats.log 2>&1
5292 + if [ $? -ne 0 ]; then
5294 + display "FAIL: $i"
5295 + failed="${failed}${i} "
5300 + host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
5302 + if [ -z "$main" ]; then
5306 + binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
5307 + echo "BUILD $main" >> $dir/acats.log
5308 + EXTERNAL_OBJECTS=""
5310 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
5311 + ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
5312 + ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
5313 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
5315 + if [ "$main" = "" ]; then
5317 + display "FAIL: $i"
5318 + failed="${failed}${i} "
5323 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
5324 + if [ $? -ne 0 ]; then
5326 + display "FAIL: $i"
5327 + failed="${failed}${i} "
5331 + echo $chapter/$i/$binmain >> $dir/transfer.lst
5332 + echo "$binmain \\" >> $dir/execute.sh
5337 +echo '"' >> $dir/execute.sh
5338 +echo "cycle" >> $dir/execute.sh
5341 +display "Transfer files to remote device: root@tablet:$tabtarget/"
5343 +cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \
5344 + target_cmd "tar -C $tabtarget -xzf -"
5346 +tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -"
5347 +target_cmd "cd $tabtarget; sh execute.sh"
5348 +rm -rf $dir/logs $dir/remote.logs.tar.gz
5349 +/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/
5350 +tar -xzf $dir/remote.logs.tar.gz
5352 +countdown=`wc -l < $dir/transfer.lst`
5353 +glob_countn=${countdown}
5354 +for i in `cat $dir/transfer.lst`; do
5356 + if [ "$section" != "$savedsect" ]; then
5357 + display Running chapter $section ...
5359 + savedsect=$section
5361 + #inform $countdown $TN
5362 + countdown=`expr $countdown - 1`
5363 + proglog="$dir/logs/${prog}.log"
5364 + echo "RUN $prog" >> $dir/acats.log
5365 + if [ ! -f $proglog ]; then
5366 + echo "LOG NOT FOUND!" >> $proglog
5369 + cat $proglog >> $dir/acats.log
5371 + egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1
5372 + if [ $? -ne 0 ]; then
5373 + grep 'tasking not implemented' $proglog > /dev/null 2>&1
5375 + if [ $? -ne 0 ]; then
5376 + display "FAIL: ${TN}"
5377 + failed="${failed}${TN} "
5379 + log "UNSUPPORTED: ${TN}"
5380 + glob_countn=`expr $glob_countn - 1`
5381 + glob_countu=`expr $glob_countu + 1`
5385 + glob_countok=`expr $glob_countok + 1`
5387 + cd $dir/tests/$section/$TN
5392 +display " === acats Summary ==="
5393 +display "# of expected passes $glob_countok"
5394 +display "# of unexpected failures `expr $glob_countn - $glob_countok`"
5396 +if [ $glob_countu -ne 0 ]; then
5397 + display "# of unsupported tests $glob_countu"
5400 +if [ $glob_countok -ne $glob_countn ]; then
5401 + display "*** FAILURES: $failed"
5404 +display "$0 completed at `date`"
5407 --- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
5408 +++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
5411 +-- { dg-do run { xfail *-*-openbsd* } }
5412 -- { dg-options "-O2" }
5414 -- This is an optimization test and its failure is only a missed optimization.
5415 --- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
5416 +++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
5418 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
5420 -with Unchecked_Conversion;
5422 -procedure Unchecked_Convert5 is
5424 - subtype c_1 is string(1..1);
5426 - function int2c1 is -- { dg-warning "different sizes" }
5427 - new unchecked_conversion (source => integer, target => c_1);
5433 - c1 := int2c1(16#12#);
5435 - if c1 (1) /= ASCII.Nul then
5436 - raise Program_Error;
5440 --- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
5441 +++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
5443 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
5445 -with Unchecked_Conversion;
5447 -procedure Unchecked_Convert6 is
5449 - subtype c_5 is string(1..5);
5451 - function int2c5 is -- { dg-warning "different sizes" }
5452 - new unchecked_conversion (source => integer, target => c_5);
5458 - c5 := int2c5(16#12#);
5460 - if c5 (4) /= ASCII.DC2 then
5461 - raise Program_Error;
5467 [FILE:6941:patches/patch-diff-core]
5468 --- gcc/config/dragonfly.h.orig
5469 +++ gcc/config/dragonfly.h
5472 %{static:-Bstatic} \
5474 - %{!static:--hash-style=gnu} \
5475 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5476 %{symbolic:-Bsymbolic}"
5479 #define LINK_SPEC DFBSD_LINK_SPEC
5481 -#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
5482 +#define DFBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.2"
5485 /* Use --as-needed -lgcc_s for eh support. */
5486 --- gcc/config/aarch64/aarch64-freebsd.h.orig
5487 +++ gcc/config/aarch64/aarch64-freebsd.h
5489 %{symbolic:-Bsymbolic} \
5490 %{static:-Bstatic} \
5492 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5493 %{rdynamic:-export-dynamic} \
5494 %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
5495 -X" SUBTARGET_EXTRA_LINK_SPEC " \
5498 #define MCOUNT_NAME ".mcount"
5500 +/* Static stack checking is supported by means of probes. */
5501 +#define STACK_CHECK_STATIC_BUILTIN 1
5502 #endif /* GCC_AARCH64_FREEBSD_H */
5503 --- gcc/config/i386/freebsd.h.orig
5504 +++ gcc/config/i386/freebsd.h
5506 %{rdynamic:-export-dynamic} \
5507 -dynamic-linker %(fbsd_dynamic_linker) } \
5508 %{static:-Bstatic}} \
5509 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5510 %{symbolic:-Bsymbolic}"
5512 /* A C statement to output to the stdio stream FILE an assembler
5513 --- gcc/config/i386/freebsd64.h.orig
5514 +++ gcc/config/i386/freebsd64.h
5516 %{rdynamic:-export-dynamic} \
5517 -dynamic-linker %(fbsd_dynamic_linker) } \
5518 %{static:-Bstatic}} \
5519 + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib} \
5520 %{symbolic:-Bsymbolic}"
5521 --- libgcc/config/i386/dragonfly-unwind.h.orig
5522 +++ libgcc/config/i386/dragonfly-unwind.h
5525 #include <sys/types.h>
5526 #include <sys/sysctl.h>
5527 +#include <sys/param.h>
5529 #include <sys/ucontext.h>
5530 #include <machine/sigframe.h>
5531 +#if __DragonFly_version > 400800
5532 +#include <sys/kinfo.h>
5536 #define REG_NAME(reg) sf_uc.uc_mcontext.mc_## reg
5538 #define MD_FALLBACK_FRAME_STATE_FOR x86_64_dragonfly_fallback_frame_state
5542 -x86_64_sigtramp_range (unsigned char **start, unsigned char **end)
5544 +x86_64_outside_sigtramp_range (unsigned char *pc)
5546 - unsigned long ps_strings;
5550 - mib[0] = CTL_KERN;
5551 - mib[1] = KERN_PS_STRINGS;
5552 - len = sizeof (ps_strings);
5553 - sysctl (mib, 2, &ps_strings, &len, NULL, 0);
5554 + static int sigtramp_range_determined = 0;
5555 + static unsigned char *sigtramp_start, *sigtramp_end;
5557 - *start = (unsigned char *)ps_strings - 32;
5558 - *end = (unsigned char *)ps_strings;
5559 + if (sigtramp_range_determined == 0)
5561 +#if __DragonFly_version > 400800
5562 + struct kinfo_sigtramp kst = {0};
5563 + size_t len = sizeof (kst);
5564 + int mib[3] = { CTL_KERN, KERN_PROC, KERN_PROC_SIGTRAMP };
5566 + sigtramp_range_determined = 1;
5567 + if (sysctl (mib, 3, &kst, &len, NULL, 0) == 0)
5569 + sigtramp_range_determined = 2;
5570 + sigtramp_start = kst.ksigtramp_start;
5571 + sigtramp_end = kst.ksigtramp_end;
5574 + unsigned long ps_strings;
5575 + size_t len = sizeof (ps_strings);
5576 + int mib[2] = { CTL_KERN, KERN_PS_STRINGS };
5578 + sigtramp_range_determined = 1;
5579 + if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0)
5581 + sigtramp_range_determined = 2;
5582 + sigtramp_start = (unsigned char *)ps_strings - 32;
5583 + sigtramp_end = (unsigned char *)ps_strings;
5587 + if (sigtramp_range_determined < 2) /* sysctl failed if < 2 */
5590 + return (pc < sigtramp_start || pc >= sigtramp_end );
5595 x86_64_dragonfly_fallback_frame_state
5596 (struct _Unwind_Context *context, _Unwind_FrameState *fs)
5598 - unsigned char *pc = context->ra;
5599 - unsigned char *sigtramp_start, *sigtramp_end;
5600 struct sigframe *sf;
5603 - x86_64_sigtramp_range(&sigtramp_start, &sigtramp_end);
5604 - if (pc >= sigtramp_end || pc < sigtramp_start)
5605 + if (x86_64_outside_sigtramp_range(context->ra))
5606 return _URC_END_OF_STACK;
5608 sf = (struct sigframe *) context->cfa;
5609 --- gcc/Makefile.in.orig
5611 @@ -1200,7 +1200,6 @@
5619 @@ -1597,6 +1596,7 @@
5620 $(OBJS-libcommon-target) main.o c-family/cppspec.o \
5621 $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
5622 $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
5623 + insn-modes.o insn-modes-ada.o \
5624 lto-wrapper.o collect-utils.o
5626 # for anything that is shared use the cc1plus profile data, as that
5627 @@ -1612,6 +1612,11 @@
5628 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
5630 BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \
5632 + $(CPPLIB) $(LIBDECNUMBER)
5634 +BACKEND2 = libbackend.a main.o libcommon-target.a libcommon.a \
5635 + insn-modes-ada.o \
5636 $(CPPLIB) $(LIBDECNUMBER)
5638 # This is defined to "yes" if Tree checking is enabled, which roughly means
5639 @@ -2311,6 +2316,7 @@
5641 insn-modes.c: s-modes; @true
5642 insn-modes.h: s-modes-h; @true
5643 +insn-modes-ada.c: s-modes-ada; @true
5644 min-insn-modes.c: s-modes-m; @true
5646 s-modes: build/genmodes$(build_exeext)
5647 @@ -2328,6 +2334,12 @@
5648 $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
5651 +s-modes-ada: s-modes
5652 + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \
5653 + < insn-modes.c > tmp-modes-ada.c)
5654 + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c
5655 + $(STAMP) s-modes-ada
5657 insn-preds.c: s-preds; @true
5658 tm-preds.h: s-preds-h; @true
5659 tm-constrs.h: s-constrs-h; @true
5660 @@ -3535,6 +3547,9 @@
5661 ( cd $(DESTDIR)$(bindir) && \
5662 $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
5664 + if [ -f gnat1$(exeext) ] ; then \
5665 + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \
5667 if [ ! -f gcc-cross$(exeext) ] \
5668 && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
5669 rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
5670 --- gcc/config/i386/gnu-user64.h.orig
5671 +++ gcc/config/i386/gnu-user64.h
5673 %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
5674 %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
5676 + %{!static:--enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib64} \
5679 %{rdynamic:-export-dynamic} \
5682 [FILE:1498:patches/patch-diff-cxx]
5683 --- libstdc++-v3/configure.host.orig
5684 +++ libstdc++-v3/configure.host
5687 os_include_dir="os/bsd/freebsd"
5690 + os_include_dir="os/bionic"
5693 os_include_dir="os/generic"
5695 --- libstdc++-v3/config/os/bionic/ctype_base.h.orig
5696 +++ libstdc++-v3/config/os/bionic/ctype_base.h
5698 // Non-standard typedefs.
5699 typedef const int* __to_type;
5702 +#define _U _CTYPE_U
5703 +#define _L _CTYPE_L
5704 +#define _D _CTYPE_D
5705 +#define _S _CTYPE_S
5706 +#define _P _CTYPE_P
5707 +#define _C _CTYPE_C
5708 +#define _X _CTYPE_X
5709 +#define _B _CTYPE_B
5710 +#define _N _CTYPE_D
5713 // NB: Offsets into ctype<char>::_M_table force a particular size
5714 // on the mask type. Because of this, we don't use an enum.
5716 --- libstdc++-v3/src/c++11/futex.cc.orig
5717 +++ libstdc++-v3/src/c++11/futex.cc
5719 #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1
5723 +#include <sys/syscall.h>
5725 #include <syscall.h>
5728 #include <sys/time.h>
5730 --- libstdc++-v3/src/filesystem/dir.cc.orig
5731 +++ libstdc++-v3/src/filesystem/dir.cc
5732 @@ -146,7 +146,13 @@
5734 int err = std::exchange(errno, 0);
5735 const auto entp = readdir(dirp);
5737 + int tmperr = errno;
5741 std::swap(errno, err);
5748 [FILE:1612:patches/patch-diff-gcc-testsuite]
5749 --- gcc/testsuite/gcc.dg/format/ext-1.c.orig
5750 +++ gcc/testsuite/gcc.dg/format/ext-1.c
5755 -foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
5756 +foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
5757 unsigned long long int ull, int i, unsigned int u, double d,
5758 char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
5760 --- gcc/testsuite/gcc.dg/format/ext-2.c.orig
5761 +++ gcc/testsuite/gcc.dg/format/ext-2.c
5766 -foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
5767 +foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
5768 unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
5769 int *ip, unsigned int *up)
5771 --- gcc/testsuite/gcc.dg/format/format.h.orig
5772 +++ gcc/testsuite/gcc.dg/format/format.h
5776 /* %q formats want a "quad"; GCC considers this to be a long long. */
5777 -typedef llong quad_t;
5778 -typedef ullong u_quad_t;
5779 +typedef llong quad2_t;
5780 +typedef ullong u_quad2_t;
5782 __extension__ typedef __INTMAX_TYPE__ intmax_t;
5783 __extension__ typedef __UINTMAX_TYPE__ uintmax_t;
5784 --- gcc/testsuite/gcc.dg/pch/pch.exp.orig
5785 +++ gcc/testsuite/gcc.dg/pch/pch.exp
5787 set test "largefile.c"
5788 set testh "largefile.hs"
5789 set f [open $test w]
5790 +puts $f "/* { dg-do run { target *-*-solaris* } } */"
5791 +puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
5792 puts $f "/* { dg-timeout-factor 4.0 } */"
5794 for { set v 0 } { $v < 10000 } { incr v } {