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.2.0
13 DISTFILE[1]= gcc-7.2.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 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.2.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 ${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.2.0/include-fixed
111 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.2.0/adalib/libgnarl.so
112 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/7.2.0/adalib/libgnat.so
114 [FILE:329:descriptions/desc.compilers]
115 This is series 6 of the GNU Compiler Collection (GCC)
117 This compiler supports the following languages: C, C++, Fortran and Ada.
118 The GNAT front-end implements the full Ada-83, Ada-95, Ada-2005 and
119 Ada-2012 standards. The C++ front-end defaults to the gnu++14 standard.
121 This package contains the compilers, drivers, and headers.
124 [FILE:104:descriptions/desc.ada_run]
125 This is series 6 of the GNU Compiler Collection (GCC)
127 This package contains the Ada runtime libraries.
130 [FILE:104:descriptions/desc.cxx_run]
131 This is series 6 of the GNU Compiler Collection (GCC)
133 This package contains the C++ runtime libraries.
136 [FILE:108:descriptions/desc.fortran_run]
137 This is series 6 of the GNU Compiler Collection (GCC)
139 This package contains the Fortran runtime libraries.
142 [FILE:162:descriptions/desc.libs]
143 This is series 6 of the GNU Compiler Collection (GCC)
145 This package contains the remaining runtime libraries after excluding
146 the Ada, C++, and Fortran libraries.
149 [FILE:126:descriptions/desc.infopages]
150 This is series 6 of the GNU Compiler Collection (GCC)
152 This package contains the man pages and info pages that come with GCC.
156 1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a 62312628 gcc-7.2.0.tar.xz
159 [FILE:25600:manifests/plist.compilers]
160 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/include/tgmath.h
161 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
164 %%ONLY-DRAGONFLY%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/dragonfly.h
165 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/
171 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
174 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
179 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
183 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk.h
184 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_api.h
185 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_api_linux.h
186 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_stub.h
187 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/cilk_undocumented.h
188 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/common.h
189 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/holder.h
190 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/hyperobject_base.h
191 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/metaprogramming.h
192 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer.h
193 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_file.h
194 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_list.h
195 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_max.h
196 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_min.h
197 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_min_max.h
198 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opadd.h
199 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opand.h
200 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opmul.h
201 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opor.h
202 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_opxor.h
203 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_ostream.h
204 @comment lib/gcc/%%TARGET%%/%%GCCVER%%/include/cilk/reducer_string.h
209 %%TARGET%%-gcc-%%GCCVER%%
212 %%TARGET%%-gcc-ranlib
240 include/c++/%%GCCVER%%/%%TARGET%%/bits/
263 include/c++/%%GCCVER%%/%%TARGET%%/ext/opt_random.h
264 include/c++/%%GCCVER%%/
269 include/c++/%%GCCVER%%/backward/
278 include/c++/%%GCCVER%%/bits/
285 atomic_lockfree_defines.h
290 boost_concept_check.h
299 cxxabi_init_exception.h
301 enable_special_members.h
325 locale_facets_nonio.h
326 locale_facets_nonio.tcc
373 stl_iterator_base_funcs.h
374 stl_iterator_base_types.h
382 stl_raw_storage_iter.h
405 include/c++/%%GCCVER%%/
439 include/c++/%%GCCVER%%/debug/
459 safe_local_iterator.h
460 safe_local_iterator.tcc
463 safe_unordered_base.h
464 safe_unordered_container.h
465 safe_unordered_container.tcc
473 include/c++/%%GCCVER%%/decimal/
476 include/c++/%%GCCVER%%/
479 include/c++/%%GCCVER%%/experimental/
483 include/c++/%%GCCVER%%/experimental/bits/
492 include/c++/%%GCCVER%%/experimental/
520 include/c++/%%GCCVER%%/ext/
529 codecvt_specializations.h
544 include/c++/%%GCCVER%%/ext/pb_ds/
546 include/c++/%%GCCVER%%/ext/pb_ds/detail/bin_search_tree_/
548 constructors_destructor_fn_imps.hpp
554 iterators_fn_imps.hpp
557 policy_access_fn_imps.hpp
560 split_join_fn_imps.hpp
562 include/c++/%%GCCVER%%/ext/pb_ds/detail/binary_heap_/
565 constructors_destructor_fn_imps.hpp
573 iterators_fn_imps.hpp
574 point_const_iterator.hpp
575 policy_access_fn_imps.hpp
577 split_join_fn_imps.hpp
579 include/c++/%%GCCVER%%/ext/pb_ds/detail/binomial_heap_/
581 constructors_destructor_fn_imps.hpp
583 include/c++/%%GCCVER%%/ext/pb_ds/detail/binomial_heap_base_/
584 binomial_heap_base_.hpp
585 constructors_destructor_fn_imps.hpp
590 split_join_fn_imps.hpp
591 include/c++/%%GCCVER%%/ext/pb_ds/detail/branch_policy/
593 null_node_metadata.hpp
595 include/c++/%%GCCVER%%/ext/pb_ds/detail/cc_hash_table_map_/
598 cond_key_dtor_entry_dealtor.hpp
599 constructor_destructor_fn_imps.hpp
600 constructor_destructor_no_store_hash_fn_imps.hpp
601 constructor_destructor_store_hash_fn_imps.hpp
603 debug_no_store_hash_fn_imps.hpp
604 debug_store_hash_fn_imps.hpp
605 entry_list_fn_imps.hpp
607 erase_no_store_hash_fn_imps.hpp
608 erase_store_hash_fn_imps.hpp
610 find_store_hash_fn_imps.hpp
613 insert_no_store_hash_fn_imps.hpp
614 insert_store_hash_fn_imps.hpp
615 iterators_fn_imps.hpp
616 policy_access_fn_imps.hpp
618 resize_no_store_hash_fn_imps.hpp
619 resize_store_hash_fn_imps.hpp
622 include/c++/%%GCCVER%%/ext/pb_ds/detail/
624 container_base_dispatch.hpp
626 include/c++/%%GCCVER%%/ext/pb_ds/detail/eq_fn/
629 include/c++/%%GCCVER%%/ext/pb_ds/detail/gp_hash_table_map_/
630 constructor_destructor_fn_imps.hpp
631 constructor_destructor_no_store_hash_fn_imps.hpp
632 constructor_destructor_store_hash_fn_imps.hpp
634 debug_no_store_hash_fn_imps.hpp
635 debug_store_hash_fn_imps.hpp
637 erase_no_store_hash_fn_imps.hpp
638 erase_store_hash_fn_imps.hpp
640 find_no_store_hash_fn_imps.hpp
641 find_store_hash_fn_imps.hpp
645 insert_no_store_hash_fn_imps.hpp
646 insert_store_hash_fn_imps.hpp
648 policy_access_fn_imps.hpp
650 resize_no_store_hash_fn_imps.hpp
651 resize_store_hash_fn_imps.hpp
653 include/c++/%%GCCVER%%/ext/pb_ds/detail/hash_fn/
654 direct_mask_range_hashing_imp.hpp
655 direct_mod_range_hashing_imp.hpp
656 linear_probe_fn_imp.hpp
657 mask_based_range_hashing.hpp
658 mod_based_range_hashing.hpp
660 quadratic_probe_fn_imp.hpp
664 sample_range_hashing.hpp
665 sample_ranged_hash_fn.hpp
666 sample_ranged_probe_fn.hpp
667 include/c++/%%GCCVER%%/ext/pb_ds/detail/left_child_next_sibling_heap_/
669 constructors_destructor_fn_imps.hpp
674 iterators_fn_imps.hpp
675 left_child_next_sibling_heap_.hpp
677 point_const_iterator.hpp
678 policy_access_fn_imps.hpp
680 include/c++/%%GCCVER%%/ext/pb_ds/detail/list_update_map_/
681 constructor_destructor_fn_imps.hpp
683 entry_metadata_base.hpp
688 iterators_fn_imps.hpp
691 include/c++/%%GCCVER%%/ext/pb_ds/detail/list_update_policy/
692 lu_counter_metadata.hpp
693 sample_update_policy.hpp
694 include/c++/%%GCCVER%%/ext/pb_ds/detail/ov_tree_map_/
695 constructors_destructor_fn_imps.hpp
700 iterators_fn_imps.hpp
703 policy_access_fn_imps.hpp
704 split_join_fn_imps.hpp
706 include/c++/%%GCCVER%%/ext/pb_ds/detail/pairing_heap_/
707 constructors_destructor_fn_imps.hpp
713 split_join_fn_imps.hpp
714 include/c++/%%GCCVER%%/ext/pb_ds/detail/pat_trie_/
715 constructors_destructor_fn_imps.hpp
720 insert_join_fn_imps.hpp
721 iterators_fn_imps.hpp
724 policy_access_fn_imps.hpp
728 synth_access_traits.hpp
732 include/c++/%%GCCVER%%/ext/pb_ds/detail/
733 priority_queue_base_dispatch.hpp
734 include/c++/%%GCCVER%%/ext/pb_ds/detail/rb_tree_map_/
735 constructors_destructor_fn_imps.hpp
743 split_join_fn_imps.hpp
745 include/c++/%%GCCVER%%/ext/pb_ds/detail/rc_binomial_heap_/
746 constructors_destructor_fn_imps.hpp
751 rc_binomial_heap_.hpp
752 split_join_fn_imps.hpp
754 include/c++/%%GCCVER%%/ext/pb_ds/detail/resize_policy/
755 cc_hash_max_collision_check_resize_trigger_imp.hpp
756 hash_exponential_size_policy_imp.hpp
757 hash_load_check_resize_trigger_imp.hpp
758 hash_load_check_resize_trigger_size_base.hpp
759 hash_prime_size_policy_imp.hpp
760 hash_standard_resize_policy_imp.hpp
761 sample_resize_policy.hpp
762 sample_resize_trigger.hpp
763 sample_size_policy.hpp
764 include/c++/%%GCCVER%%/ext/pb_ds/detail/splay_tree_/
765 constructors_destructor_fn_imps.hpp
774 split_join_fn_imps.hpp
776 include/c++/%%GCCVER%%/ext/pb_ds/detail/
777 standard_policies.hpp
778 include/c++/%%GCCVER%%/ext/pb_ds/detail/thin_heap_/
779 constructors_destructor_fn_imps.hpp
784 split_join_fn_imps.hpp
787 include/c++/%%GCCVER%%/ext/pb_ds/detail/tree_policy/
788 node_metadata_selector.hpp
789 order_statistics_imp.hpp
790 sample_tree_node_update.hpp
791 include/c++/%%GCCVER%%/ext/pb_ds/detail/
793 include/c++/%%GCCVER%%/ext/pb_ds/detail/trie_policy/
794 node_metadata_selector.hpp
795 order_statistics_imp.hpp
796 prefix_search_node_update_imp.hpp
797 sample_trie_access_traits.hpp
798 sample_trie_node_update.hpp
800 trie_string_access_traits_imp.hpp
801 include/c++/%%GCCVER%%/ext/pb_ds/detail/
804 include/c++/%%GCCVER%%/ext/pb_ds/detail/unordered_iterator/
807 point_const_iterator.hpp
809 include/c++/%%GCCVER%%/ext/pb_ds/
812 list_update_policy.hpp
817 include/c++/%%GCCVER%%/ext/
839 include/c++/%%GCCVER%%/
863 include/c++/%%GCCVER%%/parallel/
873 compiletime_settings.h
907 include/c++/%%GCCVER%%/profile/
913 include/c++/%%GCCVER%%/profile/impl/
916 profiler_container_size.h
918 profiler_hashtable_size.h
919 profiler_list_to_slist.h
920 profiler_list_to_vector.h
921 profiler_map_to_unordered_map.h
925 profiler_vector_size.h
926 profiler_vector_to_list.h
927 include/c++/%%GCCVER%%/profile/
941 include/c++/%%GCCVER%%/
959 include/c++/%%GCCVER%%/tr1/
993 legendre_function.tcc
997 modified_bessel_func.tcc
1006 special_function_util.h
1022 include/c++/%%GCCVER%%/tr2/
1029 include/c++/%%GCCVER%%/
1040 lib/gcc/%%TARGET%%/%%GCCVER%%/
1045 lib/gcc/%%TARGET%%/%%GCCVER%%/finclude/
1057 lib/gcc/%%TARGET%%/%%GCCVER%%/include/
1061 avx5124fmapsintrin.h
1062 avx5124vnniwintrin.h
1069 avx512ifmavlintrin.h
1072 avx512vbmivlintrin.h
1076 avx512vpopcntdqintrin.h
1116 lib/gcc/%%TARGET%%/%%GCCVER%%/include/ssp/
1121 lib/gcc/%%TARGET%%/%%GCCVER%%/include/
1144 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1147 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/include/
1150 lib/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1153 lib/gcc/%%TARGET%%/%%GCCVER%%/
1158 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/
1160 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/ada/gcc-interface/ada-tree.def
1161 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1182 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/c-family/
1188 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1213 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
1216 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/i386/
1226 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/config/
1229 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1235 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/cp/
1241 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/
1305 gimple-pretty-print.h
1330 highlev-plugin-common.h
1386 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/include/objc/objc-tree.def
1469 substring-locations.h
1476 target-hooks-macros.h
1514 tree-scalar-evolution.h
1521 tree-ssa-loop-ivopts.h
1522 tree-ssa-loop-manip.h
1523 tree-ssa-loop-niter.h
1526 tree-ssa-propagate.h
1528 tree-ssa-scopedtables.h
1530 tree-ssa-threadbackward.h
1531 tree-ssa-threadedge.h
1532 tree-ssa-threadupdate.h
1558 lib/gcc/%%TARGET%%/%%GCCVER%%/plugin/
1561 libcc1plugin.so.0.0.0
1564 libcp1plugin.so.0.0.0
1565 libexec/gcc/%%TARGET%%/%%GCCVER%%/
1571 libexec/gcc/%%TARGET%%/%%GCCVER%%/install-tools/
1576 libexec/gcc/%%TARGET%%/%%GCCVER%%/
1579 liblto_plugin.so.0.0.0
1582 libexec/gcc/%%TARGET%%/%%GCCVER%%/plugin/gengtype
1585 [FILE:27199:manifests/plist.ada_run]
1586 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/adainclude/
1589 %%ONLY-LINUX%%lib/gcc/%%TARGET%%/%%GCCVER%%/adalib/
1592 lib/gcc/%%TARGET%%/%%GCCVER%%/adainclude/
2838 lib/gcc/%%TARGET%%/%%GCCVER%%/adalib/
3533 [FILE:262:manifests/plist.cxx_run]
3539 libstdc++.so.6.0.24-gdb.py
3542 share/gcc-%%GCCVER%%/python/libstdcxx/__init__.py
3543 share/gcc-%%GCCVER%%/python/libstdcxx/v6/
3549 [FILE:240:manifests/plist.fortran_run]
3554 libgfortran.so.4.0.0
3564 libquadmath.so.0.0.0
3567 [FILE:452:manifests/plist.libs]
3576 @comment %%ASLIB%%/libcilkrts.a
3577 @comment %%ASLIB%%/libcilkrts.so
3578 @comment %%ASLIB%%/libcilkrts.so.5
3579 @comment %%ASLIB%%/libcilkrts.so.5.0.0
3580 @comment %%ASLIB%%/libcilkrts.spec
3595 [FILE:104:manifests/plist.infopages]
3606 [FILE:39877:patches/patch-diff-ada]
3607 --- gcc/ada/adaint.c.orig
3608 +++ gcc/ada/adaint.c
3609 @@ -1174,6 +1174,47 @@
3613 +#elif defined (__ANDROID__)
3616 + * ext2 /ext3/ext4/fat16/fat32 have no path limits
3617 + * /data/local/tmp normally requires rooted devices, if it even exists
3618 + * /sdcard is the standard location for external storage. Nativeactivity
3619 + * manifest needs to authorize its use, otherwise it might not have the
3620 + * proper permissions.
3624 + char *datadir = getenv ("ANDROID_DATA");
3626 + if (datadir == NULL)
3627 + strncpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX", L_tmpnam);
3629 + snprintf (tmp_filename, L_tmpnam, "%s/local/tmp/gnat-XXXXXX", datadir);
3631 + testfd = mkstemp (tmp_filename);
3638 + char *sdcard = getenv ("EXTERNAL_STORAGE");
3640 + if (sdcard == NULL)
3641 + strncpy (tmp_filename, "/sdcard/gnat-XXXXXX", L_tmpnam);
3643 + snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", sdcard);
3645 + testfd = mkstemp (tmp_filename);
3652 + tmpnam (tmp_filename);
3654 #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
3655 || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
3656 || defined (__DragonFly__)
3657 @@ -1460,7 +1501,7 @@
3658 utimbuf.modtime = time_stamp;
3660 /* Set access time to now in local time. */
3661 - t = time ((time_t) 0);
3663 utimbuf.actime = mktime (localtime (&t));
3665 utime (name, &utimbuf);
3666 --- gcc/ada/cio.c.orig
3670 /* Don't use macros on GNU/Linux since they cause incompatible changes between
3671 glibc 2.0 and 2.1 */
3673 +#if defined __linux__ && !defined __ANDROID__
3677 --- gcc/ada/cstreams.c.orig
3678 +++ gcc/ada/cstreams.c
3680 #include <unixlib.h>
3684 +#if defined __linux__ && !defined __ANDROID__
3685 /* Don't use macros on GNU/Linux since they cause incompatible changes between
3686 glibc 2.0 and 2.1 */
3689 +++ gcc/ada/g-socthi-bsd.adb
3691 +------------------------------------------------------------------------------
3693 +-- GNAT COMPILER COMPONENTS --
3695 +-- G N A T . S O C K E T S . T H I N --
3699 +-- Copyright (C) 2001-2013, AdaCore --
3701 +-- GNAT is free software; you can redistribute it and/or modify it under --
3702 +-- terms of the GNU General Public License as published by the Free Soft- --
3703 +-- ware Foundation; either version 3, or (at your option) any later ver- --
3704 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
3705 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
3706 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
3708 +-- As a special exception under Section 7 of GPL version 3, you are granted --
3709 +-- additional permissions described in the GCC Runtime Library Exception, --
3710 +-- version 3.1, as published by the Free Software Foundation. --
3712 +-- You should have received a copy of the GNU General Public License and --
3713 +-- a copy of the GCC Runtime Library Exception along with this program; --
3714 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
3715 +-- <http://www.gnu.org/licenses/>. --
3717 +-- GNAT was originally developed by the GNAT team at New York University. --
3718 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
3720 +------------------------------------------------------------------------------
3722 +-- This package provides a target dependent thin interface to the sockets
3723 +-- layer for use by the GNAT.Sockets package (g-socket.ads). This package
3724 +-- should not be directly with'ed by an applications program.
3726 +-- This is the *BSD version which uses fcntl rather than ioctl
3727 +-- The constant SCON.Thread_Blocking_IO is always true (for all platforms, not
3728 +-- just *BSD), so this binding is significantly simpler than the standard
3729 +-- one it replaces.
3731 +with GNAT.OS_Lib; use GNAT.OS_Lib;
3733 +with Interfaces.C; use Interfaces.C;
3735 +package body GNAT.Sockets.Thin is
3737 + function Syscall_Accept
3739 + Addr : System.Address;
3740 + Addrlen : not null access C.int) return C.int;
3741 + pragma Import (C, Syscall_Accept, "accept");
3742 + -- The accept() function accepts a connection on a socket. An incoming
3743 + -- connection is acknowledged and associated with an immediately created
3744 + -- socket. The original socket is returned to the listening state.
3746 + function Syscall_Connect
3748 + Name : System.Address;
3749 + Namelen : C.int) return C.int;
3750 + pragma Import (C, Syscall_Connect, "connect");
3751 + -- The connect() system call initiates a connection on a socket. If the
3752 + -- parameter S is of type SOCK_DGRAM then connect() permanently specifies
3753 + -- the peer to which datagrams are to be sent. If S is type SOCK_STREAM
3754 + -- then connect() attempts to make a connection with another socket, which
3755 + -- is identified by the parameter Name.
3757 + function Syscall_Recv
3759 + Msg : System.Address;
3761 + Flags : C.int) return C.int;
3762 + pragma Import (C, Syscall_Recv, "recv");
3763 + -- The recv() function receives a message from a socket. The call can be
3764 + -- used on a connection mode socket or a bound, connectionless socket. If
3765 + -- no messages are available at the socket, the recv() call waits for a
3766 + -- message to arrive unless the socket is non-blocking. If a socket is
3767 + -- non-blocking, the call returns a -1 and ERRNO is set to EWOULDBLOCK.
3769 + function Syscall_Recvfrom
3771 + Msg : System.Address;
3774 + From : System.Address;
3775 + Fromlen : not null access C.int) return C.int;
3776 + pragma Import (C, Syscall_Recvfrom, "recvfrom");
3777 + -- The recvfrom() system call receives a message from a socket and captures
3778 + -- the address from which the data was sent. It can be used to receive
3779 + -- data on an unconnected socket as well. If no messages are available,
3780 + -- the call waits for a message to arrive on blocking sockets. For
3781 + -- non-blocking sockets without messages, -1 is returned and ERRNO is set
3782 + -- to EAGAIN or EWOULDBLOCK.
3784 + function Syscall_Recvmsg
3786 + Msg : System.Address;
3787 + Flags : C.int) return System.CRTL.ssize_t;
3788 + pragma Import (C, Syscall_Recvmsg, "recvmsg");
3789 + -- The recvmsg call receives a message from a socket, and can be used to
3790 + -- receive data on an unconnected socket as well. If no messages are
3791 + -- available, the call waits for a message to arrive on blocking sockets.
3792 + -- For non-blocking sockets without messages, -1 is returned and ERRNO is
3793 + -- set to EAGAIN or EWOULDBLOCK.
3795 + function Syscall_Sendmsg
3797 + Msg : System.Address;
3798 + Flags : C.int) return System.CRTL.ssize_t;
3799 + pragma Import (C, Syscall_Sendmsg, "sendmsg");
3800 + -- The sendmsg() function sends a message to a socket, and can be used with
3801 + -- unconnected sockets as well (the msg is ignored in this case). The
3802 + -- function returns the number of bytes sent when successful, otherwise it
3803 + -- returns -1 and ERRNO is set (many possible values).
3805 + function Syscall_Sendto
3807 + Msg : System.Address;
3810 + To : System.Address;
3811 + Tolen : C.int) return C.int;
3812 + pragma Import (C, Syscall_Sendto, "sendto");
3813 + -- The sendto() function only works for connected sockets and it initiates
3814 + -- the transmission of a message. A successful call returns the numbers of
3815 + -- bytes sent, and a failure returns a -1 and ERRNO is set.
3817 + function Syscall_Socket
3820 + Protocol : C.int) return C.int;
3821 + pragma Import (C, Syscall_Socket, "socket");
3822 + -- The socket() function is used to create an unbound socket and returns a
3823 + -- file descriptor that can be used with other socket functions. Upon
3824 + -- failure, a -1 is returned and ERRNO is set.
3826 + procedure Disable_SIGPIPE (S : C.int);
3827 + pragma Import (C, Disable_SIGPIPE, "__gnat_disable_sigpipe");
3829 + procedure Disable_All_SIGPIPEs;
3830 + pragma Import (C, Disable_All_SIGPIPEs, "__gnat_disable_all_sigpipes");
3831 + -- Sets the process to ignore all SIGPIPE signals on platforms that
3832 + -- don't support Disable_SIGPIPE for particular streams.
3837 + Val : C.int) return C.int;
3838 + pragma Import (C, C_Fcntl, "fcntl");
3839 + -- The ioctl of 64-bit DragonFlyBSD, OpenBSD, and NetBSD does not support
3840 + -- setting a socket in non-blocking mode. fcntl must be used instead.
3848 + Addr : System.Address;
3849 + Addrlen : not null access C.int) return C.int
3851 + R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
3854 + Disable_SIGPIPE (R);
3862 + function C_Connect
3864 + Name : System.Address;
3865 + Namelen : C.int) return C.int
3868 + return Syscall_Connect (S, Name, Namelen);
3871 + ------------------
3872 + -- Socket_Ioctl --
3873 + ------------------
3875 + function Socket_Ioctl
3877 + Req : SOSC.IOCTL_Req_T;
3878 + Arg : access C.int) return C.int
3881 + if Req = SOSC.FIONBIO then
3884 + flags : constant Unsigned_32 :=
3885 + Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
3886 + nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.O_NDELAY);
3887 + enabled : constant Boolean := Arg.all = 1;
3888 + newval : C.int := C.int (flags);
3891 + newval := C.int (flags or nonblock);
3892 + elsif (flags and nonblock) > 0 then
3893 + newval := C.int (flags - nonblock);
3895 + return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
3899 + return C_Ioctl (S, Req, Arg);
3908 + Msg : System.Address;
3910 + Flags : C.int) return C.int
3913 + return Syscall_Recv (S, Msg, Len, Flags);
3920 + function C_Recvfrom
3922 + Msg : System.Address;
3925 + From : System.Address;
3926 + Fromlen : not null access C.int) return C.int
3929 + return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
3936 + function C_Recvmsg
3938 + Msg : System.Address;
3939 + Flags : C.int) return System.CRTL.ssize_t
3942 + return Syscall_Recvmsg (S, Msg, Flags);
3949 + function C_Sendmsg
3951 + Msg : System.Address;
3952 + Flags : C.int) return System.CRTL.ssize_t
3955 + return Syscall_Sendmsg (S, Msg, Flags);
3964 + Msg : System.Address;
3967 + To : System.Address;
3968 + Tolen : C.int) return C.int
3971 + return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
3981 + Protocol : C.int) return C.int
3983 + R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
3985 + Disable_SIGPIPE (R);
3993 + procedure Finalize is
3998 + -------------------------
3999 + -- Host_Error_Messages --
4000 + -------------------------
4002 + package body Host_Error_Messages is separate;
4008 + procedure Initialize is
4010 + Disable_All_SIGPIPEs;
4013 + --------------------
4014 + -- Signalling_Fds --
4015 + --------------------
4017 + package body Signalling_Fds is
4019 + -- In this default implementation, we use a C version of these
4020 + -- subprograms provided by socket.c.
4022 + function C_Create (Fds : not null access Fd_Pair) return C.int;
4023 + function C_Read (Rsig : C.int) return C.int;
4024 + function C_Write (Wsig : C.int) return C.int;
4025 + procedure C_Close (Sig : C.int);
4027 + pragma Import (C, C_Create, "__gnat_create_signalling_fds");
4028 + pragma Import (C, C_Read, "__gnat_read_signalling_fd");
4029 + pragma Import (C, C_Write, "__gnat_write_signalling_fd");
4030 + pragma Import (C, C_Close, "__gnat_close_signalling_fd");
4033 + (Fds : not null access Fd_Pair) return C.int renames C_Create;
4034 + function Read (Rsig : C.int) return C.int renames C_Read;
4035 + function Write (Wsig : C.int) return C.int renames C_Write;
4036 + procedure Close (Sig : C.int) renames C_Close;
4038 + end Signalling_Fds;
4040 + --------------------------
4041 + -- Socket_Error_Message --
4042 + --------------------------
4044 + function Socket_Error_Message (Errno : Integer) return String is separate;
4046 +end GNAT.Sockets.Thin;
4047 --- gcc/ada/gnatchop.adb.orig
4048 +++ gcc/ada/gnatchop.adb
4050 Config_File_Name : constant String_Access := new String'("gnat.adc");
4051 -- The name of the file holding the GNAT configuration pragmas
4053 - Gcc : String_Access := new String'("gcc");
4054 + Gcc : String_Access := new String'("ada");
4055 -- May be modified by switch --GCC=
4057 Gcc_Set : Boolean := False;
4058 --- gcc/ada/gnatlink.adb.orig
4059 +++ gcc/ada/gnatlink.adb
4061 -- This table collects the arguments to be passed to compile the binder
4064 - Gcc : String_Access := Program_Name ("gcc", "gnatlink");
4065 + Gcc : String_Access := Program_Name ("ada", "gnatlink");
4067 Read_Mode : constant String := "r" & ASCII.NUL;
4069 --- gcc/ada/make.adb.orig
4070 +++ gcc/ada/make.adb
4072 -- Compiler, Binder & Linker Data and Subprograms --
4073 ----------------------------------------------------
4075 - Gcc : String_Access := Program_Name ("gcc", "gnatmake");
4076 + Gcc : String_Access := Program_Name ("ada", "gnatmake");
4077 Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
4078 Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
4079 -- Default compiler, binder, linker programs
4080 --- gcc/ada/mlib-prj.adb.orig
4081 +++ gcc/ada/mlib-prj.adb
4082 @@ -335,6 +335,11 @@
4084 Foreign_Sources : Boolean;
4086 + Rpath_Disabled : Boolean := False;
4087 + -- If -R is passed through the library options for the linker, it will
4088 + -- prevent the implemented libraries portion of the rpath switch from
4089 + -- being built, even if the linker is capable of supporting rpath.
4091 Rpath : String_Access := null;
4092 -- Allocated only if Path Option is supported
4095 Opts.Table (Opts.Last) :=
4096 new String'("-L" & Name_Buffer (1 .. Name_Len));
4098 - if Path_Option /= null then
4099 + if not Rpath_Disabled and then Path_Option /= null then
4100 Add_Rpath (Name_Buffer (1 .. Name_Len));
4103 @@ -1299,9 +1304,13 @@
4104 Get_Name_String (Element.Value);
4106 if Name_Len /= 0 then
4107 - Opts.Increment_Last;
4108 - Opts.Table (Opts.Last) :=
4109 - new String'(Name_Buffer (1 .. Name_Len));
4110 + if Name_Buffer (1 .. Name_Len) = "-R" then
4111 + Rpath_Disabled := True;
4113 + Opts.Increment_Last;
4114 + Opts.Table (Opts.Last) :=
4115 + new String'(Name_Buffer (1 .. Name_Len));
4119 Current := Element.Next;
4120 --- gcc/ada/mlib-utl.adb.orig
4121 +++ gcc/ada/mlib-utl.adb
4123 if Driver_Name = No_Name then
4124 if Gcc_Exec = null then
4125 if Gcc_Name = null then
4126 - Gcc_Name := Osint.Program_Name ("gcc", "gnatmake");
4127 + Gcc_Name := Osint.Program_Name ("ada", "gnatmake");
4130 Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all);
4131 --- gcc/ada/prj-makr.adb.orig
4132 +++ gcc/ada/prj-makr.adb
4135 procedure Dup2 (Old_Fd, New_Fd : File_Descriptor);
4137 - Gcc : constant String := "gcc";
4138 + Gcc : constant String := "ada";
4139 Gcc_Path : String_Access := null;
4141 Non_Empty_Node : constant Project_Node_Id := 1;
4143 +++ gcc/ada/s-trasym-bsd.adb
4145 +------------------------------------------------------------------------------
4147 +-- GNAT RUN-TIME COMPONENTS --
4149 +-- S Y S T E M . T R A C E B A C K . S Y M B O L I C --
4153 +-- Copyright (C) 1999-2009, AdaCore --
4155 +-- GNAT is free software; you can redistribute it and/or modify it under --
4156 +-- terms of the GNU General Public License as published by the Free Soft- --
4157 +-- ware Foundation; either version 2, or (at your option) any later ver- --
4158 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
4159 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
4160 +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
4161 +-- for more details. You should have received a copy of the GNU General --
4162 +-- Public License distributed with GNAT; see file COPYING. If not, write --
4163 +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
4164 +-- Boston, MA 02110-1301, USA. --
4166 +-- As a special exception, if other files instantiate generics from this --
4167 +-- unit, or you link this unit with other files to produce an executable, --
4168 +-- this unit does not by itself cause the resulting executable to be --
4169 +-- covered by the GNU General Public License. This exception does not --
4170 +-- however invalidate any other reasons why the executable file might be --
4171 +-- covered by the GNU Public License. --
4173 +-- GNAT was originally developed by the GNAT team at New York University. --
4174 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
4176 +------------------------------------------------------------------------------
4178 +-- Run-time symbolic traceback support
4179 +-- This file is based on the work by Juergen Pfiefer which is still used
4180 +-- today to provide symbolic traceback support for gnu/kFreeBSD.
4181 +-- Incorporated in GNAT-AUX by John Marino <http://www.dragonlace.net>
4183 +with System.Soft_Links;
4184 +with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
4186 +package body System.Traceback.Symbolic is
4188 + package TSL renames System.Soft_Links;
4190 + -- To perform the raw addresses to symbolic form translation we rely on a
4191 + -- libaddr2line symbolizer which examines debug info from a provided
4192 + -- executable file name, and an absolute path is needed to ensure the file
4193 + -- is always found. This is "__gnat_locate_exec_on_path (gnat_argv [0])"
4194 + -- for our executable file, a fairly heavy operation so we cache the
4197 + Exename : System.Address;
4198 + -- Pointer to the name of the executable file to be used on all
4199 + -- invocations of the libaddr2line symbolization service.
4201 + Exename_Resolved : Boolean := False;
4202 + -- Flag to indicate whether we have performed the executable file name
4203 + -- resolution already. Relying on a not null Exename for this purpose
4204 + -- would be potentially inefficient as this is what we will get if the
4205 + -- resolution attempt fails.
4207 + ------------------------
4208 + -- Symbolic_Traceback --
4209 + ------------------------
4211 + function Symbolic_Traceback (Traceback : Tracebacks_Array) return String is
4213 + procedure convert_addresses
4214 + (filename : System.Address;
4215 + addrs : System.Address;
4216 + n_addrs : Integer;
4217 + buf : System.Address;
4218 + len : System.Address);
4219 + pragma Import (C, convert_addresses, "convert_addresses");
4220 + -- This is the procedure version of the Ada-aware addr2line. It places
4221 + -- in BUF a string representing the symbolic translation of the N_ADDRS
4222 + -- raw addresses provided in ADDRS, looked up in debug information from
4223 + -- FILENAME. LEN points to an integer which contains the size of the
4224 + -- BUF buffer at input and the result length at output.
4226 + -- Note that this procedure is *not* thread-safe.
4228 + type Argv_Array is array (0 .. 0) of System.Address;
4229 + gnat_argv : access Argv_Array;
4230 + pragma Import (C, gnat_argv, "gnat_argv");
4232 + function locate_exec_on_path
4233 + (c_exename : System.Address) return System.Address;
4234 + pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
4236 + B_Size : constant Integer := 256 * Traceback'Length;
4237 + Len : Integer := B_Size;
4238 + Res : String (1 .. B_Size);
4240 + use type System.Address;
4243 + -- The symbolic translation of an empty set of addresses is an empty
4246 + if Traceback'Length = 0 then
4250 + -- If our input set of raw addresses is not empty, resort to the
4251 + -- libaddr2line service to symbolize it all.
4253 + -- Compute, cache and provide the absolute path to our executable file
4254 + -- name as the binary file where the relevant debug information is to be
4255 + -- found. If the executable file name resolution fails, we have no
4256 + -- sensible basis to invoke the symbolizer at all.
4258 + -- Protect all this against concurrent accesses explicitly, as the
4259 + -- underlying services are potentially thread unsafe.
4261 + TSL.Lock_Task.all;
4263 + if not Exename_Resolved then
4264 + Exename := locate_exec_on_path (gnat_argv (0));
4265 + Exename_Resolved := True;
4268 + if Exename /= System.Null_Address then
4269 + Len := Res'Length;
4271 + (Exename, Traceback'Address, Traceback'Length,
4272 + Res (1)'Address, Len'Address);
4275 + TSL.Unlock_Task.all;
4277 + -- Return what the addr2line symbolizer has produced if we have called
4278 + -- it (the executable name resolution succeeded), or an empty string
4281 + if Exename /= System.Null_Address then
4282 + return Res (1 .. Len);
4287 + end Symbolic_Traceback;
4289 + function Symbolic_Traceback
4290 + (E : Ada.Exceptions.Exception_Occurrence) return String is
4292 + return Symbolic_Traceback (Tracebacks (E));
4293 + end Symbolic_Traceback;
4295 +end System.Traceback.Symbolic;
4296 --- gcc/ada/terminals.c.orig
4297 +++ gcc/ada/terminals.c
4299 /* First all usupported platforms. Add stubs for exported routines. */
4301 #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \
4302 - || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__)
4303 + || defined (__PikeOS__) || defined(__DJGPP__)
4305 #define ATTRIBUTE_UNUSED __attribute__((unused))
4307 @@ -1052,7 +1052,7 @@
4308 || defined (__OpenBSD__) \
4309 || defined (__NetBSD__) \
4310 || defined (__DragonFly__)
4315 /* Include every system header we need */
4316 @@ -1063,8 +1063,8 @@
4318 /* On some system termio is either absent or including it will disable termios
4320 -#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \
4321 - && !defined (__rtems__)
4322 +#if ! defined (__hpux__) && ! defined (FREEBSD) && \
4323 + ! defined (__APPLE__) && ! defined(__rtems__)
4324 # include <termio.h>
4327 @@ -1076,10 +1076,10 @@
4328 #include <sys/types.h>
4329 #include <sys/wait.h>
4331 -#if defined (__sun__)
4333 # include <sys/stropts.h>
4335 -#if defined (BSD) || defined (__sun__)
4336 +#if defined (FREEBSD) || defined (sun)
4337 # include <sys/signal.h>
4339 #if defined (__hpux__)
4340 @@ -1087,11 +1087,15 @@
4341 # include <sys/stropts.h>
4345 +#define CDISABLE _PC_VDISABLE
4347 #define CDISABLE _POSIX_VDISABLE
4350 /* On HP-UX and Sun system, there is a bzero function but with a different
4351 signature. Use memset instead */
4352 -#if defined (__hpux__) || defined (__sun__) || defined (_AIX)
4353 +#if defined (__hpux__) || defined (sun) || defined (_AIX)
4354 # define bzero(s,n) memset (s,0,n)
4357 @@ -1109,11 +1113,11 @@
4360 /* Configurable part */
4361 -#if defined (__APPLE__) || defined (BSD)
4362 +#if defined (__APPLE__) || defined (FREEBSD)
4364 -#elif defined (__linux__)
4365 +#elif defined (linux)
4367 -#elif defined (__sun__)
4368 +#elif defined (sun)
4369 #define USE_CLONE_DEVICE "/dev/ptmx"
4370 #elif defined (_AIX)
4371 #define USE_CLONE_DEVICE "/dev/ptc"
4372 @@ -1399,7 +1403,7 @@
4373 desc->slave_fd = open (desc->slave_name, O_RDWR, 0);
4376 -#if defined (__sun__) || defined (__hpux__)
4377 +#if defined (sun) || defined (__hpux__)
4378 /* On systems such as Solaris we are using stream. We need to push the right
4379 "modules" in order to get the expected terminal behaviors. Otherwise
4380 functionalities such as termios are not available. */
4382 +++ gcc/ada/traceback_symbolic.c
4385 + Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
4386 + Ada for Linux Team (ALT)
4387 + Heavily modified by John Marino <http://www.dragonlace.net>
4389 + Permission is hereby granted, free of charge, to any person obtaining a
4390 + copy of this software and associated documentation files (the
4391 + "Software"), to deal in the Software without restriction, including
4392 + without limitation the rights to use, copy, modify, merge, publish,
4393 + distribute, distribute with modifications, sublicense, and/or sell
4394 + copies of the Software, and to permit persons to whom the Software is
4395 + furnished to do so, subject to the following conditions:
4397 + The above copyright notice and this permission notice shall be included
4398 + in all copies or substantial portions of the Software.
4400 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
4401 + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4402 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
4403 + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
4404 + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
4405 + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
4406 + THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4408 + Except as contained in this notice, the name(s) of the above copyright
4409 + holders shall not be used in advertising or otherwise to promote the
4410 + sale, use or other dealings in this Software without prior written
4418 + * Running addr2line doesn't make sense for cross-compiled objects.
4419 + * Create a dummy function to satisfy g-trasym.o
4423 +convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
4424 + void *addrs ATTRIBUTE_UNUSED,
4425 + int n_addr ATTRIBUTE_UNUSED,
4426 + void *buf ATTRIBUTE_UNUSED,
4427 + int *len ATTRIBUTE_UNUSED)
4436 + * use the external program /usr/bin/addr2line to convert addresses
4437 + * into file names and line numbers
4440 +#include <sys/types.h>
4441 +#include <stdlib.h>
4442 +#include <unistd.h>
4443 +#include <string.h>
4444 +#include <signal.h>
4446 +#define CLOSE_SENDPIPE close(sendpipe[0]); close(sendpipe[1])
4447 +#define CLOSE_READPIPE close(readpipe[0]); close(readpipe[1])
4448 +#define DUP2CLOSE(oldfd, newfd) dup2(oldfd, newfd); close(oldfd);
4449 +#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
4451 +#define MAX_LINE 1024
4452 +#define PARENT_READ readpipe[0]
4453 +#define CHILD_WRITE readpipe[1]
4454 +#define CHILD_READ sendpipe[0]
4455 +#define PARENT_WRITE sendpipe[1]
4457 +#if defined (__sun__)
4458 +#define ADDR2LINE_PROG "/usr/gnu/bin/addr2line"
4460 +#define ADDR2LINE_PROG "/usr/bin/addr2line"
4464 +convert_addresses (const char *file_name,
4470 + int max_len = *len;
4473 + struct sigaction act, oact;
4475 + int sendpipe[2] = {-1,-1}, /* parent -> child */
4476 + readpipe[2] = {-1,-1}; /* parent <- child */
4479 + act.sa_handler = SIG_IGN;
4480 + sigemptyset(&act.sa_mask);
4482 + if (sigaction(SIGPIPE,&act,&oact) < 0)
4485 + if (pipe(sendpipe) < 0) { RESTSIG; return; }
4486 + if (pipe(readpipe) < 0) { CLOSE_SENDPIPE; RESTSIG; return; }
4487 + if ((childpid = fork()) < 0) {
4494 + if (childpid == 0) { /* child process */
4495 + close(PARENT_WRITE);
4496 + close(PARENT_READ);
4497 + if ((CHILD_READ != STDIN_FILENO) && (CHILD_WRITE != STDOUT_FILENO)) {
4498 + if ((CHILD_READ == STDOUT_FILENO) && (CHILD_WRITE == STDIN_FILENO)) {
4499 + const int temp_fd = dup(CHILD_WRITE);
4500 + close (CHILD_WRITE);
4501 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4502 + DUP2CLOSE (temp_fd, STDOUT_FILENO);
4504 + else if ((CHILD_READ == STDIN_FILENO) && (CHILD_WRITE > 1)) {
4505 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4507 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDOUT_FILENO)) {
4508 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4510 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDIN_FILENO)) {
4511 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4512 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4515 + /* CHILD_READ >= 1 and CHILD_WRITE > 1 */
4516 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
4517 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
4520 + /* As pointed out by Florian Weimer to JP, it is a security threat to call
4521 + the script with a user defined environment and using the path. That
4522 + would be Trojans pleasure. Therefore the absolute path to addr2line
4523 + and an empty environment is used. That should be safe.
4525 + char *const argv[] = { "addr2line",
4527 + "--demangle=gnat",
4531 + char *const envp[] = { NULL };
4532 + if (execve(ADDR2LINE_PROG, argv, envp) < 0) {
4533 + close (CHILD_WRITE);
4534 + close (CHILD_READ);
4540 + /* Below this line is parent process */
4543 + char line[MAX_LINE + 1];
4546 + long *trace_address = addrs;
4548 + close(CHILD_WRITE);
4549 + close(CHILD_READ);
4551 + for(i=0; i < n_addr; i++) {
4552 + snprintf(hex,sizeof(hex),"%#lx\n",*trace_address);
4553 + write(PARENT_WRITE,hex,strlen(hex));
4554 + n = read(PARENT_READ,line,MAX_LINE);
4559 + /* We have approx. 16 additional chars for "%#lx in " clause.
4560 + We use this info to prevent a buffer overrun. */
4561 + if (n + 16 + (*len) > max_len)
4564 + p = strchr(line,'\n');
4568 + *len += snprintf(s, (max_len - (*len)), "%#lx in %s at %s",
4569 + *trace_address, line, p+1);
4572 + *len += snprintf(s, (max_len - (*len)), "%#lx at %s",
4573 + *trace_address, line);
4577 + trace_address += 1;
4579 + close (PARENT_WRITE);
4580 + close (PARENT_READ);
4585 --- gcc/ada/gcc-interface/Makefile.in.orig
4586 +++ gcc/ada/gcc-interface/Makefile.in
4587 @@ -1227,6 +1227,7 @@
4588 ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
4589 LIBGNAT_TARGET_PAIRS = \
4590 a-intnam.ads<a-intnam-linux.ads \
4591 + g-socthi.adb<g-socthi-bsd.adb \
4592 s-inmaop.adb<s-inmaop-posix.adb \
4593 s-intman.adb<s-intman-android.adb \
4594 s-linux.ads<s-linux-android.ads \
4595 @@ -1311,6 +1312,7 @@
4596 a-intnam.ads<a-intnam-solaris.ads \
4597 s-inmaop.adb<s-inmaop-posix.adb \
4598 s-intman.adb<s-intman-solaris.adb \
4599 + s-trasym.adb<s-trasym-bsd.adb \
4600 s-mudido.adb<s-mudido-affinity.adb \
4601 s-osinte.adb<s-osinte-solaris.adb \
4602 s-osinte.ads<s-osinte-solaris.ads \
4603 @@ -1347,6 +1349,8 @@
4604 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4607 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4608 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4609 THREADSLIB = -lposix4 -lthread
4610 MISCLIB = -lposix4 -lnsl -lsocket
4612 @@ -1495,10 +1499,45 @@
4613 LIBRARY_VERSION := $(LIB_VERSION)
4617 +ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
4618 + LIBGNAT_TARGET_PAIRS = \
4619 + a-intnam.ads<a-intnam-linux.ads \
4620 + g-socthi.adb<g-socthi-bsd.adb \
4621 + s-inmaop.adb<s-inmaop-posix.adb \
4622 + s-intman.adb<s-intman-posix.adb \
4623 + s-linux.ads<s-linux-android.ads \
4624 + s-osinte.adb<s-osinte-android.adb \
4625 + s-osinte.ads<s-osinte-android.ads \
4626 + s-osprim.adb<s-osprim-posix.adb \
4627 + s-taprop.adb<s-taprop-posix.adb \
4628 + s-taspri.ads<s-taspri-posix.ads \
4629 + s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
4630 + $(ATOMICS_TARGET_PAIRS) \
4631 + $(X86_TARGET_PAIRS) \
4632 + system.ads<system-linux-x86.ads
4634 + TOOLS_TARGET_PAIRS = \
4635 + mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
4636 + indepsw.adb<indepsw-gnu.adb
4638 + EXTRA_LIBGNAT_OBJS=
4639 + EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
4640 + EXTRA_GNATRTL_NONTASKING_OBJS=
4645 + GNATLIB_SHARED = gnatlib-shared-dual
4646 + LIBRARY_VERSION := $(LIB_VERSION)
4650 ifeq ($(strip $(filter-out %aarch64 freebsd%,$(target_cpu) $(target_os))),)
4651 LIBGNAT_TARGET_PAIRS = \
4652 a-intnam.ads<a-intnam-freebsd.ads \
4653 + g-socthi.adb<g-socthi-bsd.adb \
4654 + s-trasym.adb<s-trasym-bsd.adb \
4655 s-inmaop.adb<s-inmaop-posix.adb \
4656 s-intman.adb<s-intman-posix.adb \
4657 s-mudido.adb<s-mudido-affinity.adb \
4658 @@ -1516,6 +1555,9 @@
4659 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4660 GNATLIB_SHARED = gnatlib-shared-dual
4662 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4663 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4666 THREADSLIB= -lpthread
4668 @@ -1527,6 +1569,8 @@
4669 ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
4670 LIBGNAT_TARGET_PAIRS = \
4671 a-intnam.ads<a-intnam-freebsd.ads \
4672 + g-socthi.adb<g-socthi-bsd.adb \
4673 + s-trasym.adb<s-trasym-bsd.adb \
4674 s-inmaop.adb<s-inmaop-posix.adb \
4675 s-intman.adb<s-intman-posix.adb \
4676 s-mudido.adb<s-mudido-affinity.adb \
4677 @@ -1544,6 +1588,8 @@
4678 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4679 GNATLIB_SHARED = gnatlib-shared-dual
4681 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4682 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4683 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4686 @@ -1557,6 +1603,8 @@
4687 ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
4688 LIBGNAT_TARGET_PAIRS = \
4689 a-intnam.ads<a-intnam-freebsd.ads \
4690 + g-socthi.adb<g-socthi-bsd.adb \
4691 + s-trasym.adb<s-trasym-bsd.adb \
4692 s-inmaop.adb<s-inmaop-posix.adb \
4693 s-intman.adb<s-intman-posix.adb \
4694 s-mudido.adb<s-mudido-affinity.adb \
4695 @@ -1574,6 +1622,8 @@
4696 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4697 GNATLIB_SHARED = gnatlib-shared-dual
4699 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4700 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4701 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
4704 @@ -1587,6 +1637,8 @@
4705 ifeq ($(strip $(filter-out %86_64 dragonfly%,$(target_cpu) $(target_os))),)
4706 LIBGNAT_TARGET_PAIRS = \
4707 a-intnam.ads<a-intnam-dragonfly.ads \
4708 + g-socthi.adb<g-socthi-bsd.adb \
4709 + s-trasym.adb<s-trasym-bsd.adb \
4710 s-inmaop.adb<s-inmaop-posix.adb \
4711 s-intman.adb<s-intman-posix.adb \
4712 s-mudido.adb<s-mudido-affinity.adb \
4713 @@ -1604,6 +1656,8 @@
4714 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
4715 GNATLIB_SHARED = gnatlib-shared-dual
4717 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
4718 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
4719 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
4722 --- gcc/ada/gcc-interface/Make-lang.in.orig
4723 +++ gcc/ada/gcc-interface/Make-lang.in
4727 # Language-independent object files.
4728 -ADA_BACKEND = $(BACKEND) attribs.o
4729 +ADA_BACKEND = $(BACKEND2) attribs.o
4731 # List of target dependent sources, overridden below as necessary
4733 --- gcc/ada/init.c.orig
4735 @@ -2541,8 +2541,15 @@
4737 mcontext_t *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
4739 +#if defined (__i386__)
4740 + unsigned long *pc = (unsigned long *)mcontext->gregs[REG_EIP];
4741 + /* The pattern is "orl $0x0,(%esp)" for a probe in 32-bit mode. */
4742 + if (signo == SIGSEGV && pc && *pc == 0x00240c83)
4743 + mcontext->gregs[REG_ESP] += 4096 + 4 * sizeof (unsigned long);
4744 +#elif defined (__ARMEL__)
4745 /* ARM Bump has to be an even number because of odd/even architecture. */
4746 - ((mcontext_t *) mcontext)->arm_pc += 2;
4747 + mcontext->arm_pc += 2;
4754 [FILE:19397:patches/patch-diff-ada-testsuite]
4755 --- gcc/testsuite/ada/acats/run_acats.sh.orig
4756 +++ gcc/testsuite/ada/acats/run_acats.sh
4761 -# Provide which replacement.
4763 -# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
4764 -# ksh93 and bash have it.
4765 -# type output format differs between ksh88 and ksh93, so avoid it if
4766 -# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
4767 -# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
4770 - path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
4771 - path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
4772 - path=`whence $* 2>/dev/null` && { echo $path; return 0; }
4776 # Set up environment to use the Ada compiler from the object tree
4778 --- gcc/testsuite/ada/acats/run_all.sh.orig
4779 +++ gcc/testsuite/ada/acats/run_all.sh
4782 # End of customization section.
4784 -# Perform arithmetic evaluation on the ARGs, and store the result in the
4785 -# global $as_val. Take advantage of shells that can avoid forks. The arguments
4786 -# must be portable across $(()) and expr.
4787 -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
4788 - eval 'as_fn_arith ()
4795 - as_val=`expr "$@" || test $? -eq 1`
4801 printf "$@" >> $dir/acats.sum
4803 echo "$@" >> $dir/acats.log
4807 + printf "%04d %7s" $1 $2
4816 if [ "$dir" = "$testdir" ]; then
4818 gnatls -v >> $dir/acats.log
4821 -if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
4822 - dir_support=$dir/../acats/support
4825 - mv $dir/tests $dir/tests.$$ 2> /dev/null
4826 - rm -rf $dir/tests.$$ &
4829 - cp -pr $dir/../acats/tests $dir/
4831 - dir_support=$dir/support
4833 display " === acats support ==="
4834 display_noeol "Generating support files..."
4843 display " === acats tests ==="
4845 if [ $# -eq 0 ]; then
4846 @@ -228,14 +206,20 @@
4855 for chapter in $chapters; do
4856 - # Used to generate support once and finish after that.
4857 - [ "$chapter" = "NONE" ] && continue
4858 + if [ -d $dir/tests/$chapter ]; then
4859 + cd $dir/tests/$chapter
4860 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
4861 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
4862 + > $dir/tests/$chapter/${chapter}.lst
4863 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
4864 + countdown=`expr $countdown + $countn`
4868 +for chapter in $chapters; do
4869 display Running chapter $chapter ...
4871 if [ ! -d $dir/tests/$chapter ]; then
4872 @@ -244,45 +228,11 @@
4876 - cd $dir/tests/$chapter
4877 - ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
4878 - cut -c1-7 | sort | uniq | comm -23 - $dir_support/norun.lst \
4879 - > $dir/tests/$chapter/${chapter}.lst
4880 countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
4881 - as_fn_arith $glob_countn + $countn
4882 - glob_countn=$as_val
4883 + glob_countn=`expr $glob_countn + $countn`
4885 for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
4887 - # If running multiple run_all.sh jobs in parallel, decide
4888 - # if we should run this test in the current instance.
4889 - if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
4891 - # Ugh, some tests have inter-test dependencies, those
4892 - # tests have to be scheduled on the same parallel instance
4893 - # as previous test.
4894 - ce2108f | ce2108h | ce3112d) ;;
4895 - # All others can be hopefully scheduled freely.
4897 - as_fn_arith $par_countm + 1
4898 - par_countm=$as_val
4899 - [ $par_countm -eq 10 ] && par_countm=0
4900 - if [ $par_countm -eq 1 ]; then
4901 - as_fn_arith $par_count + 1
4903 - if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
4910 - if [ -z "$par_last" ]; then
4911 - as_fn_arith $glob_countn - 1
4912 - glob_countn=$as_val
4917 + counti=`expr $counti + 1`
4918 extraflags="-gnat95"
4919 grep $i $testdir/overflow.lst > /dev/null 2>&1
4920 if [ $? -eq 0 ]; then
4921 @@ -300,10 +250,13 @@
4922 if [ $? -eq 0 ]; then
4923 extraflags="$extraflags -fstack-check"
4925 + inform $countdown $i
4926 + countdown=`expr $countdown - 1`
4927 test=$dir/tests/$chapter/$i
4928 mkdir $test && cd $test >> $dir/acats.log 2>&1
4930 if [ $? -ne 0 ]; then
4933 failed="${failed}${i} "
4935 @@ -321,19 +274,22 @@
4936 echo "BUILD $main" >> $dir/acats.log
4939 - cxb30*) EXTERNAL_OBJECTS="$dir_support/cxb30040.o $dir_support/cxb30060.o $dir_support/cxb30130.o $dir_support/cxb30131.o";;
4940 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
4941 ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
4942 ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
4943 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
4945 if [ "$main" = "" ]; then
4948 failed="${failed}${i} "
4953 - target_gnatmake $extraflags -I$dir_support $main >> $dir/acats.log 2>&1
4954 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
4955 if [ $? -ne 0 ]; then
4958 failed="${failed}${i} "
4961 target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
4962 cd $dir/tests/$chapter/$i
4963 cat ${i}.log >> $dir/acats.log
4965 egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
4966 if [ $? -ne 0 ]; then
4967 grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
4968 @@ -357,15 +314,12 @@
4969 failed="${failed}${i} "
4971 log "UNSUPPORTED: $i"
4972 - as_fn_arith $glob_countn - 1
4973 - glob_countn=$as_val
4974 - as_fn_arith $glob_countu + 1
4975 - glob_countu=$as_val
4976 + glob_countn=`expr $glob_countn - 1`
4977 + glob_countu=`expr $glob_countu + 1`
4981 - as_fn_arith $glob_countok + 1
4982 - glob_countok=$as_val
4983 + glob_countok=`expr $glob_countok + 1`
4988 +++ gcc/testsuite/ada/acats/run_remote.sh
4991 +# Run ACATS with the GNU Ada compiler
4993 +# The following functions are to be customized if you run in cross
4994 +# environment or want to change compilation flags. Note that for
4995 +# tests requiring checks not turned on by default, this script
4996 +# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
4998 +# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
4999 +# gnatflags="-gnatN"
5002 +gnatflags="-gnatws"
5003 +tabtarget="/data/local/testsuite"
5004 +STRIP="@REMOTE_TARGET@-strip"
5007 + # Run on rooted tablet (port 22 vs port 2222)
5009 + $STRIP_FOR_TARGET $*
5010 + /usr/bin/scp -qp $* root@tablet:$tabtarget/
5011 + /usr/bin/ssh -q tablet $tabtarget/$BN
5015 + /usr/bin/ssh -q tablet "$1"
5018 +# End of customization section.
5022 + printf "$@" >> $dir/acats.sum
5023 + printf "$@" >> $dir/acats.log
5028 + echo "$@" >> $dir/acats.sum
5029 + echo "$@" >> $dir/acats.log
5033 + echo "$@" >> $dir/acats.sum
5034 + echo "$@" >> $dir/acats.log
5038 + printf "%04d %7s" $1 $2
5045 +dir=`${PWDCMD-pwd}`
5047 +if [ "$testdir" = "" ]; then
5048 + echo You must use make check or make check-ada
5052 +if [ "$dir" = "$testdir" ]; then
5053 + echo "error: srcdir must be different than objdir, exiting."
5057 +target_gnatmake () {
5058 + echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
5059 + gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
5067 + rm -f "$binmain" *.o *.ali > /dev/null 2>&1
5071 + ls ${i}?.adb > ${i}.lst 2> /dev/null
5072 + ls ${i}*m.adb >> ${i}.lst 2> /dev/null
5073 + ls ${i}.adb >> ${i}.lst 2> /dev/null
5074 + main=`tail -1 ${i}.lst`
5078 + local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'`
5082 +EXTERNAL_OBJECTS=""
5083 +# Global variable to communicate external objects to link with.
5085 +rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst
5087 +display "Test Run By $USER on `date`"
5089 +display " === acats configuration ==="
5091 +target=`$GCC -dumpmachine`
5093 +display target gcc is $GCC
5094 +display `$GCC -v 2>&1`
5095 +display host=`gcc -dumpmachine`
5096 +display target=$target
5097 +display `type gnatmake-cross`
5098 +gnatls-cross -v >> $dir/acats.log
5101 +# Let's be tidy and clear off the remote device first
5102 +target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *"
5104 +display " === acats support ==="
5105 +display_noeol "Generating support files..."
5107 +rm -rf $dir/support
5108 +mkdir -p $dir/support
5111 +cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
5113 +# Find out the size in bit of an address on the target
5114 +target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
5115 +target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
5116 +target_bit=`cat $dir/support/impbit.out`
5117 +echo target_bit="$target_bit" >> $dir/acats.log
5119 +# Find out a suitable asm statement
5120 +# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
5122 + ia64*-*-* | s390*-*-*)
5123 + target_insn="nop 0"
5126 + target_insn="swym 0"
5132 +echo target_insn="$target_insn" >> $dir/acats.log
5134 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5135 + < $testdir/support/impdef.a > $dir/support/impdef.a
5136 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5137 + -e "s,ACATS4GNATBIT,$target_bit,g" \
5138 + -e "s,ACATS4GNATINSN,$target_insn,g" \
5139 + < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
5140 +sed -e "s,ACATS4GNATDIR,$dir,g" \
5141 + < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
5143 +cp $testdir/tests/cd/*.c $dir/support
5144 +cp $testdir/tests/cxb/*.c $dir/support
5145 +grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst
5148 +mv $dir/tests $dir/tests.$$ 2> /dev/null
5149 +rm -rf $dir/tests.$$ &
5152 +cp -pr $testdir/tests $dir/
5154 +for i in $dir/support/*.ada $dir/support/*.a; do
5155 + host_gnatchop $i >> $dir/acats.log 2>&1
5158 +# These tools are used to preprocess some ACATS sources
5159 +# they need to be compiled native on the host.
5161 +host_gnatmake -q -gnatws macrosub.adb
5162 +if [ $? -ne 0 ]; then
5163 + display "**** Failed to compile macrosub"
5166 +./macrosub > macrosub.out 2>&1
5169 +host_gnatmake -q -gnatws widechr.adb
5170 +if [ $? -ne 0 ]; then
5171 + display "**** Failed to compile widechr"
5174 +./widechr > widechr.out 2>&1
5176 +rm -f $dir/support/macrosub
5177 +rm -f $dir/support/widechr
5178 +rm -f $dir/support/*.ali
5179 +rm -f $dir/support/*.o
5183 +# From here, all compilations will be made by the target compiler
5185 +display_noeol "Compiling support files..."
5188 +if [ $? -ne 0 ]; then
5189 + display "**** Failed to compile C code"
5193 +host_gnatchop *.adt >> $dir/acats.log 2>&1
5195 +target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
5196 +target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
5200 +display " === acats tests ==="
5202 +if [ $# -eq 0 ]; then
5203 + chapters=`cd $dir/tests; echo [a-z]*`
5213 +for chapter in $chapters; do
5214 + if [ -d $dir/tests/$chapter ]; then
5215 + cd $dir/tests/$chapter
5216 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
5217 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
5218 + > $dir/tests/$chapter/${chapter}.lst
5219 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
5220 + countdown=`expr $countdown + $countn`
5224 +cat > $dir/execute.sh << EOF
5226 + printf "left: %04d" \$1
5233 + local total=\$(echo \$testlist | awk '{print NF}')
5235 + echo "Executing \$total tests on remote device"
5237 + for x in \$testlist; do
5238 + timeout -t 30 ./\${x} > logs/\${x}.log 2>&1
5239 + countx=\$(expr \$countx + 1)
5240 + if [ \$countx -eq 25 ]; then
5241 + total=\$(expr \$total - 25)
5248 + tar -czf remote.logs.tar.gz logs
5253 +display "All tests are being cross-compiled without execution first."
5255 +for chapter in $chapters; do
5256 + if [ ! -d $dir/tests/$chapter ]; then
5260 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
5261 + glob_countn=`expr $glob_countn + $countn`
5263 + for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
5264 + counti=`expr $counti + 1`
5265 + extraflags="-gnat95"
5266 + grep $i $testdir/overflow.lst > /dev/null 2>&1
5267 + if [ $? -eq 0 ]; then
5268 + extraflags="$extraflags -gnato"
5270 + grep $i $testdir/elabd.lst > /dev/null 2>&1
5271 + if [ $? -eq 0 ]; then
5272 + extraflags="$extraflags -gnatE"
5274 + grep $i $testdir/floatstore.lst > /dev/null 2>&1
5275 + if [ $? -eq 0 ]; then
5276 + extraflags="$extraflags -ffloat-store"
5278 + grep $i $testdir/stackcheck.lst > /dev/null 2>&1
5279 + if [ $? -eq 0 ]; then
5280 + extraflags="$extraflags -fstack-check"
5282 + inform $countdown $i
5283 + countdown=`expr $countdown - 1`
5284 + test=$dir/tests/$chapter/$i
5285 + mkdir $test && cd $test >> $dir/acats.log 2>&1
5287 + if [ $? -ne 0 ]; then
5289 + display "FAIL: $i"
5290 + failed="${failed}${i} "
5295 + host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
5297 + if [ -z "$main" ]; then
5301 + binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
5302 + echo "BUILD $main" >> $dir/acats.log
5303 + EXTERNAL_OBJECTS=""
5305 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
5306 + ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
5307 + ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
5308 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
5310 + if [ "$main" = "" ]; then
5312 + display "FAIL: $i"
5313 + failed="${failed}${i} "
5318 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
5319 + if [ $? -ne 0 ]; then
5321 + display "FAIL: $i"
5322 + failed="${failed}${i} "
5326 + echo $chapter/$i/$binmain >> $dir/transfer.lst
5327 + echo "$binmain \\" >> $dir/execute.sh
5332 +echo '"' >> $dir/execute.sh
5333 +echo "cycle" >> $dir/execute.sh
5336 +display "Transfer files to remote device: root@tablet:$tabtarget/"
5338 +cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \
5339 + target_cmd "tar -C $tabtarget -xzf -"
5341 +tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -"
5342 +target_cmd "cd $tabtarget; sh execute.sh"
5343 +rm -rf $dir/logs $dir/remote.logs.tar.gz
5344 +/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/
5345 +tar -xzf $dir/remote.logs.tar.gz
5347 +countdown=`wc -l < $dir/transfer.lst`
5348 +glob_countn=${countdown}
5349 +for i in `cat $dir/transfer.lst`; do
5351 + if [ "$section" != "$savedsect" ]; then
5352 + display Running chapter $section ...
5354 + savedsect=$section
5356 + #inform $countdown $TN
5357 + countdown=`expr $countdown - 1`
5358 + proglog="$dir/logs/${prog}.log"
5359 + echo "RUN $prog" >> $dir/acats.log
5360 + if [ ! -f $proglog ]; then
5361 + echo "LOG NOT FOUND!" >> $proglog
5364 + cat $proglog >> $dir/acats.log
5366 + egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1
5367 + if [ $? -ne 0 ]; then
5368 + grep 'tasking not implemented' $proglog > /dev/null 2>&1
5370 + if [ $? -ne 0 ]; then
5371 + display "FAIL: ${TN}"
5372 + failed="${failed}${TN} "
5374 + log "UNSUPPORTED: ${TN}"
5375 + glob_countn=`expr $glob_countn - 1`
5376 + glob_countu=`expr $glob_countu + 1`
5380 + glob_countok=`expr $glob_countok + 1`
5382 + cd $dir/tests/$section/$TN
5387 +display " === acats Summary ==="
5388 +display "# of expected passes $glob_countok"
5389 +display "# of unexpected failures `expr $glob_countn - $glob_countok`"
5391 +if [ $glob_countu -ne 0 ]; then
5392 + display "# of unsupported tests $glob_countu"
5395 +if [ $glob_countok -ne $glob_countn ]; then
5396 + display "*** FAILURES: $failed"
5399 +display "$0 completed at `date`"
5402 --- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
5403 +++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
5406 +-- { dg-do run { xfail *-*-openbsd* } }
5407 -- { dg-options "-O2" }
5409 -- This is an optimization test and its failure is only a missed optimization.
5410 --- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
5411 +++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
5413 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
5415 -with Unchecked_Conversion;
5417 -procedure Unchecked_Convert5 is
5419 - subtype c_1 is string(1..1);
5421 - function int2c1 is -- { dg-warning "different sizes" }
5422 - new unchecked_conversion (source => integer, target => c_1);
5428 - c1 := int2c1(16#12#);
5430 - if c1 (1) /= ASCII.Nul then
5431 - raise Program_Error;
5435 --- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
5436 +++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
5438 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
5440 -with Unchecked_Conversion;
5442 -procedure Unchecked_Convert6 is
5444 - subtype c_5 is string(1..5);
5446 - function int2c5 is -- { dg-warning "different sizes" }
5447 - new unchecked_conversion (source => integer, target => c_5);
5453 - c5 := int2c5(16#12#);
5455 - if c5 (4) /= ASCII.DC2 then
5456 - raise Program_Error;
5462 [FILE:11341:patches/patch-diff-core]
5463 --- gcc/config/dragonfly.h.orig
5464 +++ gcc/config/dragonfly.h
5467 %{static:-Bstatic} \
5469 - %{!static:--hash-style=gnu} \
5470 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5471 %{symbolic:-Bsymbolic}"
5474 #define LINK_SPEC DFBSD_LINK_SPEC
5476 -#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
5477 +#define DFBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.2"
5480 /* Use --as-needed -lgcc_s for eh support. */
5481 --- gcc/config/aarch64/aarch64-freebsd.h.orig
5482 +++ gcc/config/aarch64/aarch64-freebsd.h
5484 %{symbolic:-Bsymbolic} \
5485 %{static:-Bstatic} \
5487 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5488 %{rdynamic:-export-dynamic} \
5489 %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
5490 -X" SUBTARGET_EXTRA_LINK_SPEC " \
5493 #define MCOUNT_NAME ".mcount"
5495 +/* Static stack checking is supported by means of probes. */
5496 +#define STACK_CHECK_STATIC_BUILTIN 1
5497 #endif /* GCC_AARCH64_FREEBSD_H */
5498 --- gcc/config/i386/freebsd.h.orig
5499 +++ gcc/config/i386/freebsd.h
5501 %{rdynamic:-export-dynamic} \
5502 -dynamic-linker %(fbsd_dynamic_linker) } \
5503 %{static:-Bstatic}} \
5504 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib} \
5505 %{symbolic:-Bsymbolic}"
5507 /* A C statement to output to the stdio stream FILE an assembler
5508 --- gcc/config/i386/freebsd64.h.orig
5509 +++ gcc/config/i386/freebsd64.h
5511 %{rdynamic:-export-dynamic} \
5512 -dynamic-linker %(fbsd_dynamic_linker) } \
5513 %{static:-Bstatic}} \
5514 + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib} \
5515 %{symbolic:-Bsymbolic}"
5516 --- gcc/Makefile.in.orig
5518 @@ -1200,7 +1200,6 @@
5526 @@ -1597,6 +1596,7 @@
5527 $(OBJS-libcommon-target) main.o c-family/cppspec.o \
5528 $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
5529 $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
5530 + insn-modes.o insn-modes-ada.o \
5531 lto-wrapper.o collect-utils.o
5533 # for anything that is shared use the cc1plus profile data, as that
5534 @@ -1612,6 +1612,11 @@
5535 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
5537 BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \
5539 + $(CPPLIB) $(LIBDECNUMBER)
5541 +BACKEND2 = libbackend.a main.o libcommon-target.a libcommon.a \
5542 + insn-modes-ada.o \
5543 $(CPPLIB) $(LIBDECNUMBER)
5545 # This is defined to "yes" if Tree checking is enabled, which roughly means
5546 @@ -2312,6 +2317,7 @@
5548 insn-modes.c: s-modes; @true
5549 insn-modes.h: s-modes-h; @true
5550 +insn-modes-ada.c: s-modes-ada; @true
5551 min-insn-modes.c: s-modes-m; @true
5553 s-modes: build/genmodes$(build_exeext)
5554 @@ -2329,6 +2335,12 @@
5555 $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
5558 +s-modes-ada: s-modes
5559 + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \
5560 + < insn-modes.c > tmp-modes-ada.c)
5561 + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c
5562 + $(STAMP) s-modes-ada
5564 insn-preds.c: s-preds; @true
5565 tm-preds.h: s-preds-h; @true
5566 tm-constrs.h: s-constrs-h; @true
5567 @@ -3536,6 +3548,9 @@
5568 ( cd $(DESTDIR)$(bindir) && \
5569 $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
5571 + if [ -f gnat1$(exeext) ] ; then \
5572 + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \
5574 if [ ! -f gcc-cross$(exeext) ] \
5575 && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
5576 rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
5577 --- gcc/config/i386/gnu-user64.h.orig
5578 +++ gcc/config/i386/gnu-user64.h
5580 %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
5581 %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
5583 + %{!static:--enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib64} \
5586 %{rdynamic:-export-dynamic} \
5587 --- gcc/dwarf2out.c.orig
5589 @@ -12514,6 +12514,15 @@
5591 if (qualified_type == dtype)
5593 + tree origin = decl_ultimate_origin (name);
5595 + /* Typedef variants that have an abstract origin don't get their own
5596 + type DIE (see gen_typedef_die), so fall back on the ultimate
5597 + abstract origin instead. */
5598 + if (origin != NULL)
5599 + return modified_type_die (TREE_TYPE (origin), cv_quals, reverse,
5602 /* For a named type, use the typedef. */
5603 gen_type_die (qualified_type, context_die);
5604 return lookup_type_die (qualified_type);
5605 @@ -24346,7 +24355,7 @@
5606 gen_typedef_die (tree decl, dw_die_ref context_die)
5608 dw_die_ref type_die;
5612 if (TREE_ASM_WRITTEN (decl))
5614 @@ -24355,75 +24364,71 @@
5618 + /* As we avoid creating DIEs for local typedefs (see decl_ultimate_origin
5619 + checks in process_scope_var and modified_type_die), this should be called
5620 + only for original types. */
5621 + gcc_assert (decl_ultimate_origin (decl) == NULL);
5623 TREE_ASM_WRITTEN (decl) = 1;
5624 type_die = new_die (DW_TAG_typedef, context_die, decl);
5625 - origin = decl_ultimate_origin (decl);
5626 - if (origin != NULL)
5627 - add_abstract_origin_attribute (type_die, origin);
5630 + add_name_and_src_coords_attributes (type_die, decl);
5631 + if (DECL_ORIGINAL_TYPE (decl))
5633 - tree type = TREE_TYPE (decl);
5634 + type = DECL_ORIGINAL_TYPE (decl);
5635 + if (type == error_mark_node)
5638 + gcc_assert (type != TREE_TYPE (decl));
5639 + equate_type_number_to_die (TREE_TYPE (decl), type_die);
5643 + type = TREE_TYPE (decl);
5644 if (type == error_mark_node)
5647 - add_name_and_src_coords_attributes (type_die, decl);
5648 - if (DECL_ORIGINAL_TYPE (decl))
5649 + if (is_naming_typedef_decl (TYPE_NAME (type)))
5651 - type = DECL_ORIGINAL_TYPE (decl);
5653 - if (type == error_mark_node)
5656 - gcc_assert (type != TREE_TYPE (decl));
5657 - equate_type_number_to_die (TREE_TYPE (decl), type_die);
5658 + /* Here, we are in the case of decl being a typedef naming
5659 + an anonymous type, e.g:
5660 + typedef struct {...} foo;
5661 + In that case TREE_TYPE (decl) is not a typedef variant
5662 + type and TYPE_NAME of the anonymous type is set to the
5663 + TYPE_DECL of the typedef. This construct is emitted by
5666 + TYPE is the anonymous struct named by the typedef
5667 + DECL. As we need the DW_AT_type attribute of the
5668 + DW_TAG_typedef to point to the DIE of TYPE, let's
5669 + generate that DIE right away. add_type_attribute
5670 + called below will then pick (via lookup_type_die) that
5671 + anonymous struct DIE. */
5672 + if (!TREE_ASM_WRITTEN (type))
5673 + gen_tagged_type_die (type, context_die, DINFO_USAGE_DIR_USE);
5675 + /* This is a GNU Extension. We are adding a
5676 + DW_AT_linkage_name attribute to the DIE of the
5677 + anonymous struct TYPE. The value of that attribute
5678 + is the name of the typedef decl naming the anonymous
5679 + struct. This greatly eases the work of consumers of
5680 + this debug info. */
5681 + add_linkage_name_raw (lookup_type_die (type), decl);
5685 - if (is_naming_typedef_decl (TYPE_NAME (type)))
5687 - /* Here, we are in the case of decl being a typedef naming
5688 - an anonymous type, e.g:
5689 - typedef struct {...} foo;
5690 - In that case TREE_TYPE (decl) is not a typedef variant
5691 - type and TYPE_NAME of the anonymous type is set to the
5692 - TYPE_DECL of the typedef. This construct is emitted by
5695 - TYPE is the anonymous struct named by the typedef
5696 - DECL. As we need the DW_AT_type attribute of the
5697 - DW_TAG_typedef to point to the DIE of TYPE, let's
5698 - generate that DIE right away. add_type_attribute
5699 - called below will then pick (via lookup_type_die) that
5700 - anonymous struct DIE. */
5701 - if (!TREE_ASM_WRITTEN (type))
5702 - gen_tagged_type_die (type, context_die, DINFO_USAGE_DIR_USE);
5704 - /* This is a GNU Extension. We are adding a
5705 - DW_AT_linkage_name attribute to the DIE of the
5706 - anonymous struct TYPE. The value of that attribute
5707 - is the name of the typedef decl naming the anonymous
5708 - struct. This greatly eases the work of consumers of
5709 - this debug info. */
5710 - add_linkage_name_raw (lookup_type_die (type), decl);
5714 - add_type_attribute (type_die, type, decl_quals (decl), false,
5718 - if (is_naming_typedef_decl (decl))
5719 - /* We want that all subsequent calls to lookup_type_die with
5720 - TYPE in argument yield the DW_TAG_typedef we have just
5722 - equate_type_number_to_die (type, type_die);
5723 + add_type_attribute (type_die, type, decl_quals (decl), false,
5726 - type = TREE_TYPE (decl);
5727 + if (is_naming_typedef_decl (decl))
5728 + /* We want that all subsequent calls to lookup_type_die with
5729 + TYPE in argument yield the DW_TAG_typedef we have just
5731 + equate_type_number_to_die (type, type_die);
5733 - add_alignment_attribute (type_die, type);
5734 + add_alignment_attribute (type_die, TREE_TYPE (decl));
5736 - add_accessibility_attribute (type_die, decl);
5738 + add_accessibility_attribute (type_die, decl);
5740 if (DECL_ABSTRACT_P (decl))
5741 equate_decl_number_to_die (decl, type_die);
5742 @@ -24535,15 +24540,23 @@
5743 if (TREE_ASM_WRITTEN (type))
5746 + tree name = TYPE_NAME (type);
5747 + tree origin = decl_ultimate_origin (name);
5748 + if (origin != NULL)
5750 + gen_decl_die (origin, NULL, NULL, context_die);
5754 /* Prevent broken recursion; we can't hand off to the same type. */
5755 - gcc_assert (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) != type);
5756 + gcc_assert (DECL_ORIGINAL_TYPE (name) != type);
5758 /* Give typedefs the right scope. */
5759 context_die = scope_die_for (type, context_die);
5761 TREE_ASM_WRITTEN (type) = 1;
5763 - gen_decl_die (TYPE_NAME (type), NULL, NULL, context_die);
5764 + gen_decl_die (name, NULL, NULL, context_die);
5768 @@ -24862,6 +24875,22 @@
5772 + /* Avoid creating DIEs for local typedefs and concrete static variables that
5773 + will only be pruned later. */
5774 + if ((origin || decl_ultimate_origin (decl))
5775 + && (TREE_CODE (decl_or_origin) == TYPE_DECL
5776 + || (VAR_P (decl_or_origin) && TREE_STATIC (decl_or_origin))))
5778 + origin = decl_ultimate_origin (decl_or_origin);
5779 + if (decl && VAR_P (decl) && die != NULL)
5781 + die = lookup_decl_die (origin);
5783 + equate_decl_number_to_die (decl, die);
5788 if (die != NULL && die->die_parent == NULL)
5789 add_child_die (context_die, die);
5790 else if (TREE_CODE (decl_or_origin) == IMPORTED_DECL)
5793 [FILE:1498:patches/patch-diff-cxx]
5794 --- libstdc++-v3/configure.host.orig
5795 +++ libstdc++-v3/configure.host
5798 os_include_dir="os/bsd/freebsd"
5801 + os_include_dir="os/bionic"
5804 os_include_dir="os/generic"
5806 --- libstdc++-v3/config/os/bionic/ctype_base.h.orig
5807 +++ libstdc++-v3/config/os/bionic/ctype_base.h
5809 // Non-standard typedefs.
5810 typedef const int* __to_type;
5813 +#define _U _CTYPE_U
5814 +#define _L _CTYPE_L
5815 +#define _D _CTYPE_D
5816 +#define _S _CTYPE_S
5817 +#define _P _CTYPE_P
5818 +#define _C _CTYPE_C
5819 +#define _X _CTYPE_X
5820 +#define _B _CTYPE_B
5821 +#define _N _CTYPE_D
5824 // NB: Offsets into ctype<char>::_M_table force a particular size
5825 // on the mask type. Because of this, we don't use an enum.
5827 --- libstdc++-v3/src/c++11/futex.cc.orig
5828 +++ libstdc++-v3/src/c++11/futex.cc
5830 #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1
5834 +#include <sys/syscall.h>
5836 #include <syscall.h>
5839 #include <sys/time.h>
5841 --- libstdc++-v3/src/filesystem/dir.cc.orig
5842 +++ libstdc++-v3/src/filesystem/dir.cc
5843 @@ -146,7 +146,13 @@
5845 int err = std::exchange(errno, 0);
5846 const auto entp = readdir(dirp);
5848 + int tmperr = errno;
5852 std::swap(errno, err);
5859 [FILE:1612:patches/patch-diff-gcc-testsuite]
5860 --- gcc/testsuite/gcc.dg/format/ext-1.c.orig
5861 +++ gcc/testsuite/gcc.dg/format/ext-1.c
5866 -foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
5867 +foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
5868 unsigned long long int ull, int i, unsigned int u, double d,
5869 char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
5871 --- gcc/testsuite/gcc.dg/format/ext-2.c.orig
5872 +++ gcc/testsuite/gcc.dg/format/ext-2.c
5877 -foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
5878 +foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
5879 unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
5880 int *ip, unsigned int *up)
5882 --- gcc/testsuite/gcc.dg/format/format.h.orig
5883 +++ gcc/testsuite/gcc.dg/format/format.h
5887 /* %q formats want a "quad"; GCC considers this to be a long long. */
5888 -typedef llong quad_t;
5889 -typedef ullong u_quad_t;
5890 +typedef llong quad2_t;
5891 +typedef ullong u_quad2_t;
5893 __extension__ typedef __INTMAX_TYPE__ intmax_t;
5894 __extension__ typedef __UINTMAX_TYPE__ uintmax_t;
5895 --- gcc/testsuite/gcc.dg/pch/pch.exp.orig
5896 +++ gcc/testsuite/gcc.dg/pch/pch.exp
5898 set test "largefile.c"
5899 set testh "largefile.hs"
5900 set f [open $test w]
5901 +puts $f "/* { dg-do run { target *-*-solaris* } } */"
5902 +puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
5903 puts $f "/* { dg-timeout-factor 4.0 } */"
5905 for { set v 0 } { $v < 10000 } { incr v } {