1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= gnatcross-bootstrap
7 SDESC[standard]= Gnatcross-to-native compiler generator
8 HOMEPAGE= http://www.dragonlace.net/
9 CONTACT= John_Marino[draco@marino.st]
11 DOWNLOAD_GROUPS= main gmp iconv mpc mpfr
12 SITES[main]= GCC/releases/gcc-9.4.0
14 SITES[iconv]= GNU/libiconv
16 SITES[mpfr]= http://www.mpfr.org/mpfr-3.1.4/
17 DISTFILE[1]= gcc-9.4.0.tar.xz:main
18 DISTFILE[2]= mpfr-3.1.4.tar.xz:mpfr
19 DISTFILE[3]= gmp-6.1.0.tar.xz:gmp
20 DISTFILE[4]= mpc-1.0.3.tar.gz:mpc
21 DISTFILE[5]= libiconv-1.15.tar.gz:iconv
23 SPKGS[standard]= single
25 OPTIONS_AVAILABLE= DISABLE FARM64_R11 FAMD64_R12 FI386_R12 SOL10
26 OPTIONS_STANDARD= DISABLE FARM64_R11 FAMD64_R12 FI386_R12 SOL10
27 OPTGROUP_RADIO= TARGET
28 OPTDESCR[TARGET]= Target platform for generated compiler
29 OPTGROUP[TARGET]= DISABLE FARM64_R11 FAMD64_R12 FI386_R12 SOL10
32 USES= gmake libtool perl:build zstd:build
36 CC= {{BSPREFIX}}/bin/{{TGTSYS}}-gcc
37 CPP= {{BSPREFIX}}/bin/{{TGTSYS}}-cpp
38 CXX= {{BSPREFIX}}/bin/{{TGTSYS}}-c++
41 CONFIGURE_OUTSOURCE= yes
42 CONFIGURE_ARGS= --enable-languages="c,c++,ada"
43 --prefix={{LOCALBASE}}/toolchain/gcc9
45 --enable-threads=posix
46 --enable-checking=release
50 --disable-libsanitizer
54 --with-pkgversion="Ravenports"
56 CONFIGURE_ENV= build_configargs="CPPFLAGS=\"{{CPPFLAGS}}\""
57 host_configargs="CPPFLAGS=\"{{CPPFLAGS}}\""
59 INSTALL_TARGET= install-strip
60 PLIST_SUB= TGTSYS={{TGTSYS}}
62 [FARM64_R11].DESCRIPTION= Build native compiler for FreeBSD/ARM64 Release 11
63 [FARM64_R11].BUILD_DEPENDS_ON= gnatcross:single:FARM64_R11
64 [FARM64_R11].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
65 --host=aarch64-raven-freebsd11.3
66 --target=aarch64-raven-freebsd11.3
67 --disable-libstdcxx-pch
68 [FARM64_R11].MAKEFILE_ON= TGTSYS=aarch64-raven-freebsd11.3
69 BSPREFIX={{LOCALBASE}}/FreeBSD11_ARM64
70 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
72 [SOL10].DESCRIPTION= Build native compiler for Solaris 10
73 [SOL10].BROKEN_ON= Doesn't get pass configure
74 [SOL10].BUILD_DEPENDS_ON= gnatcross:single:SOL10
75 [SOL10].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
76 --host=x86_64-raven-solaris2.10
77 --target=x86_64-raven-solaris2.10
78 --disable-libstdcxx-pch
82 --with-ld={{LOCALBASE}}/toolchain/bin/ld
83 --with-as={{LOCALBASE}}/toolchain/bin/as
84 [SOL10].MAKEFILE_ON= TGTSYS=x86_64-raven-solaris2.10
85 BSPREFIX={{LOCALBASE}}/Solaris10_AMD64
86 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
87 [SOL10].MAKE_ENV_ON= ac_cv_header_sys_sysctl_h=no
88 ac_cv_header_alloca_h=no
89 ac_cv_header_stdio_ext_h=no
90 ac_cv_header_malloc_h=no
91 ac_cv_func_clearerr_unlocked=no
92 ac_cv_func_feof_unlocked=no
93 ac_cv_func_ferror_unlocked=no
94 ac_cv_func_fileno_unlocked=no
95 ac_cv_func_asprintf=no
96 ac_cv_func_vasprintf=no
101 [FI386_R12].DESCRIPTION= Build native compiler for FreeBSD/I386 Release 12
102 [FI386_R12].BUILD_DEPENDS_ON= gnatcross:single:FI386_R12
103 [FI386_R12].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
104 --host=i386-raven-freebsd12.2
105 --target=i386-raven-freebsd12.2
106 --disable-libstdcxx-pch
107 [FI386_R12].MAKEFILE_ON= TGTSYS=i386-raven-freebsd12.2
108 BSPREFIX={{LOCALBASE}}/FreeBSD12_I386
109 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
111 [DISABLE].DESCRIPTION= Disable building of native compiler (default)
112 [DISABLE].BROKEN_ON= Native compiler building disabled (set option!)
114 [FAMD64_R12].DESCRIPTION= Build native compiler for FreeBSD/AMD64 Release 12
115 [FAMD64_R12].BUILD_DEPENDS_ON= gnatcross:single:FAMD64_R12
116 [FAMD64_R12].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
117 --host=x86_64-raven-freebsd12.2
118 --target=x86_64-raven-freebsd12.2
119 --disable-libstdcxx-pch
120 [FAMD64_R12].MAKEFILE_ON= TGTSYS=x86_64-raven-freebsd12.2
121 BSPREFIX={{LOCALBASE}}/FreeBSD12_AMD64
122 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
125 # Update LINK_SPEC to add gcc-aux lib runpath in every binary
126 @${ECHO} "Configuring LINK_SPEC runpath"
127 ${REINPLACE_CMD} -e 's;\@PREFIX\@;${PREFIX:H};' \
128 -e 's;\@GCCAUX\@;${NAMEBASE};' \
129 -e 's;\@LOCALBASE\@;${LOCALBASE};g' \
130 ${WRKSRC}/gcc/gcc.c \
131 ${WRKSRC}/gcc/config/darwin.h \
132 ${WRKSRC}/gcc/config/dragonfly.h \
133 ${WRKSRC}/gcc/config/sol2.h \
134 ${WRKSRC}/gcc/config/i386/freebsd64.h \
135 ${WRKSRC}/gcc/config/i386/freebsd.h \
136 ${WRKSRC}/gcc/config/i386/gnu-user64.h \
137 ${WRKSRC}/gcc/config/aarch64/aarch64-freebsd.h \
138 ${WRKSRC}/gcc/ada/gnatls.adb
139 # fix FreeBSD spec error
140 ${REINPLACE_CMD} -e 's|static:crtbeginT.o%s;||' \
141 ${WRKSRC}/gcc/config/freebsd-spec.h
144 # package bootstrap compiler with zstd, then relocate files to avoid packaging them
145 ${MKDIR} ${WRKDIR}/bootstrap_compiler
146 (cd ${STAGEDIR}${PREFIX}/toolchain/gcc9 \
147 && ${CP} -a bin ${WRKDIR}/bootstrap_compiler \
148 && ${CP} -a lib ${WRKDIR}/bootstrap_compiler \
149 && ${CP} -a include ${WRKDIR}/bootstrap_compiler \
150 && ${CP} -a libexec ${WRKDIR}/bootstrap_compiler)
151 ${ECHO_CMD} "Relocate directories to: ${PREFIX}/toolchain/gcc9" \
152 >> ${WRKDIR}/bootstrap_compiler/README
153 ${RM} ${WRKDIR}/bootstrap_compiler/bin/${TGTSYS}*
154 ${MV} ${STAGEDIR} ${STAGEDIR}.old
155 ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/${NAMEBASE}
156 (cd ${WRKDIR} && ${TAR} -cf \
157 ${STAGEDIR}${LOCALBASE}/share/${NAMEBASE}/${TGTSYS}-gcc.tar \
159 (cd ${STAGEDIR}${LOCALBASE}/share/${NAMEBASE} && \
160 zstd -7 --no-progress --rm ${TGTSYS}-gcc.tar)
162 post-patch-FI386_R12-ON:
163 # work around malloc detection issue
164 ${REINPLACE_CMD} -e 's/#undef HAVE_ALIGNED_ALLOC/#define HAVE_ALIGNED_ALLOC 1/' \
165 ${WRKSRC}/libstdc++-v3/config.h.in
168 cp ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/gcc ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/cc
169 cp ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/g++ ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/CC
170 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.4.0/adalib/libgnarl.so
171 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.4.0/adalib/libgnat.so
173 post-install-FARM64_R11-ON:
174 ${RM} -r ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.4.0/include-fixed
177 ${MKDIR} ${WRKSRC}/libiconv
178 ${MV} ${WRKDIR}/gmp-* ${WRKSRC}/gmp
179 ${MV} ${WRKDIR}/mpc-* ${WRKSRC}/mpc
180 ${MV} ${WRKDIR}/mpfr-* ${WRKSRC}/mpfr
181 ${MV} ${WRKDIR}/libiconv-* ${WRKSRC}/libiconv
183 post-patch-FARM64_R11-ON:
184 # work around malloc detection issue
185 ${REINPLACE_CMD} -e 's/#undef HAVE_ALIGNED_ALLOC/#define HAVE_ALIGNED_ALLOC 1/' \
186 ${WRKSRC}/libstdc++-v3/config.h.in
188 post-install-FI386_R12-ON:
189 ${RM} -r ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.4.0/include-fixed
191 post-install-FAMD64_R12-ON:
192 ${RM} -r ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.4.0/include-fixed
194 post-patch-FAMD64_R12-ON:
195 # work around malloc detection issue
196 ${REINPLACE_CMD} -e 's/#undef HAVE_ALIGNED_ALLOC/#define HAVE_ALIGNED_ALLOC 1/' \
197 ${WRKSRC}/libstdc++-v3/config.h.in
198 ${REINPLACE_CMD} -e '/<malloc.h>/d' ${WRKSRC}/libiberty/hashtab.c
200 [FILE:141:descriptions/desc.single]
201 This package contains a native compiler bootstrapped by a gnatcross
202 cross-compiler. The target system is determined by the set port option.
206 71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1 70533868 gcc-9.3.0.tar.xz
207 761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5 1122152 mpfr-3.1.4.tar.xz
208 68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989 1950316 gmp-6.1.0.tar.xz
209 617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 669925 mpc-1.0.3.tar.gz
210 ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 5264188 libiconv-1.15.tar.gz
213 [FILE:49:manifests/plist.single]
214 share/gnatcross-bootstrap/%%TGTSYS%%-gcc.tar.zst
217 [FILE:43251:patches/patch-diff-ada]
218 --- gcc/ada/Makefile.rtl.orig
219 +++ gcc/ada/Makefile.rtl
220 @@ -1377,6 +1377,7 @@
221 s-linux.ads<libgnarl/s-linux__android.ads \
222 s-osinte.adb<libgnarl/s-osinte__android.adb \
223 s-osinte.ads<libgnarl/s-osinte__android.ads \
224 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
225 s-osprim.adb<libgnat/s-osprim__posix.adb \
226 s-taprop.adb<libgnarl/s-taprop__posix.adb \
227 s-taspri.ads<libgnarl/s-taspri__posix.ads \
228 @@ -1470,6 +1471,7 @@
229 s-osinte.adb<libgnarl/s-osinte__solaris.adb \
230 s-osinte.ads<libgnarl/s-osinte__solaris.ads \
231 s-osprim.adb<libgnat/s-osprim__solaris.adb \
232 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
233 s-taprop.adb<libgnarl/s-taprop__solaris.adb \
234 s-tasinf.adb<libgnarl/s-tasinf__solaris.adb \
235 s-tasinf.ads<libgnarl/s-tasinf__solaris.ads \
236 @@ -1502,6 +1504,8 @@
237 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
240 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
241 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
242 THREADSLIB = -lposix4 -lthread
243 MISCLIB = -lposix4 -lnsl -lsocket
245 @@ -1641,6 +1645,38 @@
246 LIBRARY_VERSION := $(LIB_VERSION)
250 +ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
251 + LIBGNAT_TARGET_PAIRS = \
252 + a-intnam.ads<libgnarl/a-intnam__linux.ads \
253 + s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
254 + s-intman.adb<libgnarl/s-intman__posix.adb \
255 + s-linux.ads<libgnarl/s-linux__android.ads \
256 + s-osinte.adb<libgnarl/s-osinte__android.adb \
257 + s-osinte.ads<libgnarl/s-osinte__android.ads \
258 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
259 + s-osprim.adb<libgnat/s-osprim__posix.adb \
260 + s-taprop.adb<libgnarl/s-taprop__posix.adb \
261 + s-taspri.ads<libgnarl/s-taspri__posix.ads \
262 + s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
263 + $(ATOMICS_TARGET_PAIRS) \
264 + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
265 + system.ads<libgnat/system-linux-x86.ads
267 + TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
269 + EXTRA_LIBGNAT_OBJS=
270 + EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
271 + EXTRA_GNATRTL_NONTASKING_OBJS=
276 + GNATLIB_SHARED = gnatlib-shared-dual
277 + LIBRARY_VERSION := $(LIB_VERSION)
282 ifeq ($(strip $(filter-out %aarch64 freebsd%,$(target_cpu) $(target_os))),)
283 LIBGNAT_TARGET_PAIRS = \
284 @@ -1650,7 +1686,9 @@
285 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
286 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
287 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
288 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
289 s-osprim.adb<libgnat/s-osprim__posix.adb \
290 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
291 s-taprop.adb<libgnarl/s-taprop__posix.adb \
292 s-taspri.ads<libgnarl/s-taspri__posix.ads \
293 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
294 @@ -1660,6 +1698,9 @@
296 GNATLIB_SHARED = gnatlib-shared-dual
298 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
299 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
302 THREADSLIB= -lpthread
304 @@ -1676,7 +1717,9 @@
305 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
306 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
307 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
308 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
309 s-osprim.adb<libgnat/s-osprim__posix.adb \
310 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
311 s-taprop.adb<libgnarl/s-taprop__posix.adb \
312 s-taspri.ads<libgnarl/s-taspri__posix.ads \
313 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
314 @@ -1687,6 +1730,8 @@
316 GNATLIB_SHARED = gnatlib-shared-dual
318 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
319 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
320 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
321 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
323 @@ -1706,7 +1751,9 @@
324 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
325 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
326 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
327 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
328 s-osprim.adb<libgnat/s-osprim__posix.adb \
329 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
330 s-taprop.adb<libgnarl/s-taprop__posix.adb \
331 s-taspri.ads<libgnarl/s-taspri__posix.ads \
332 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
333 @@ -1717,6 +1764,8 @@
335 GNATLIB_SHARED = gnatlib-shared-dual
337 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
338 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
339 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
340 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
342 @@ -1736,17 +1785,23 @@
343 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
344 s-osinte.adb<libgnarl/s-osinte__dragonfly.adb \
345 s-osinte.ads<libgnarl/s-osinte__dragonfly.ads \
346 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
347 s-osprim.adb<libgnat/s-osprim__posix.adb \
348 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
349 s-taprop.adb<libgnarl/s-taprop__posix.adb \
350 s-taspri.ads<libgnarl/s-taspri__posix.ads \
351 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
352 + $(TRASYM_DWARF_UNIX_PAIRS) \
353 $(ATOMICS_TARGET_PAIRS) \
354 $(X86_64_TARGET_PAIRS) \
355 system.ads<libgnat/system-dragonfly-x86_64.ads
357 GNATLIB_SHARED = gnatlib-shared-dual
359 - EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
360 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
361 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
362 + EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
363 + EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
366 THREADSLIB= -lpthread
367 --- gcc/ada/adaint.c.orig
369 @@ -1190,6 +1190,47 @@
373 +#elif defined (__ANDROID__)
376 + * ext2 /ext3/ext4/fat16/fat32 have no path limits
377 + * /data/local/tmp normally requires rooted devices, if it even exists
378 + * /sdcard is the standard location for external storage. Nativeactivity
379 + * manifest needs to authorize its use, otherwise it might not have the
380 + * proper permissions.
384 + char *datadir = getenv ("ANDROID_DATA");
386 + if (datadir == NULL)
387 + strncpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX", L_tmpnam);
389 + snprintf (tmp_filename, L_tmpnam, "%s/local/tmp/gnat-XXXXXX", datadir);
391 + testfd = mkstemp (tmp_filename);
398 + char *sdcard = getenv ("EXTERNAL_STORAGE");
400 + if (sdcard == NULL)
401 + strncpy (tmp_filename, "/sdcard/gnat-XXXXXX", L_tmpnam);
403 + snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", sdcard);
405 + testfd = mkstemp (tmp_filename);
412 + tmpnam (tmp_filename);
414 #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
415 || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
416 || defined (__DragonFly__) || defined (__QNX__)
417 --- gcc/ada/cio.c.orig
421 /* Don't use macros on GNU/Linux since they cause incompatible changes between
424 +#if defined __linux__ && !defined __ANDROID__
428 --- gcc/ada/cstreams.c.orig
429 +++ gcc/ada/cstreams.c
435 +#if defined __linux__ && !defined __ANDROID__
436 /* Don't use macros on GNU/Linux since they cause incompatible changes between
439 --- gcc/ada/gnatchop.adb.orig
440 +++ gcc/ada/gnatchop.adb
442 Config_File_Name : constant String_Access := new String'("gnat.adc");
443 -- The name of the file holding the GNAT configuration pragmas
445 - Gcc : String_Access := new String'("gcc");
446 + Gcc : String_Access := new String'("ada");
447 -- May be modified by switch --GCC=
449 Gcc_Set : Boolean := False;
450 --- gcc/ada/gnatlink.adb.orig
451 +++ gcc/ada/gnatlink.adb
453 -- This table collects the arguments to be passed to compile the binder
456 - Gcc : String_Access := Program_Name ("gcc", "gnatlink");
457 + Gcc : String_Access := Program_Name ("ada", "gnatlink");
459 Read_Mode : constant String := "r" & ASCII.NUL;
461 --- gcc/ada/gnatls.adb.orig
462 +++ gcc/ada/gnatls.adb
465 with Fname; use Fname;
466 with Gnatvsn; use Gnatvsn;
467 -with Make_Util; use Make_Util;
468 with Namet; use Namet;
470 with Osint; use Osint;
471 @@ -1285,31 +1284,10 @@
472 -- The path name(s) of directories where project files may reside.
475 - Prefix : String_Ptr;
476 - Runtime : String_Ptr;
478 - procedure Add_Target (Suffix : String);
479 - -- Add :<prefix>/<target>/Suffix to the project path
481 FD : File_Descriptor;
488 - procedure Add_Target (Suffix : String) is
489 - Extra_Sep : constant String :=
490 - (if Target_Name (Target_Name'Last) = '/' then
493 - (1 => Directory_Separator));
494 - -- Note: Target_Name has a trailing / when it comes from Sdefault
497 - Add_Str_To_Name_Buffer
498 - (Path_Separator & Prefix.all & Target_Name & Extra_Sep & Suffix);
500 + pragma Unreferenced (Runtime_Name);
502 -- Start of processing for Initialize_Default_Project_Path
504 @@ -1493,81 +1471,15 @@
505 -- Set the initial value of Current_Project_Path
507 if Add_Default_Dir then
508 - if Sdefault.Search_Dir_Prefix = null then
512 - Prefix := new String'(Executable_Prefix_Path);
515 - Prefix := new String'(Sdefault.Search_Dir_Prefix.all
516 - & ".." & Dir_Separator
517 - & ".." & Dir_Separator
518 - & ".." & Dir_Separator
519 - & ".." & Dir_Separator);
522 - if Prefix.all /= "" then
523 - if Target_Name /= "" then
525 - if Runtime_Name /= "" then
526 - if Base_Name (Runtime_Name) = Runtime_Name then
528 - -- $prefix/$target/$runtime/lib/gnat
531 - (Runtime_Name & Directory_Separator &
532 - "lib" & Directory_Separator & "gnat");
534 - -- $prefix/$target/$runtime/share/gpr
537 - (Runtime_Name & Directory_Separator &
538 - "share" & Directory_Separator & "gpr");
542 - new String'(Normalize_Pathname (Runtime_Name));
544 - -- $runtime_dir/lib/gnat
546 - Add_Str_To_Name_Buffer
547 - (Path_Separator & Runtime.all & Directory_Separator &
548 - "lib" & Directory_Separator & "gnat");
550 - -- $runtime_dir/share/gpr
552 - Add_Str_To_Name_Buffer
553 - (Path_Separator & Runtime.all & Directory_Separator &
554 - "share" & Directory_Separator & "gpr");
558 - -- $prefix/$target/lib/gnat
561 - ("lib" & Directory_Separator & "gnat");
563 - -- $prefix/$target/share/gpr
566 - ("share" & Directory_Separator & "gpr");
569 - -- $prefix/share/gpr
571 - Add_Str_To_Name_Buffer
572 - (Path_Separator & Prefix.all & "share"
573 - & Directory_Separator & "gpr");
575 - -- $prefix/lib/gnat
577 - Add_Str_To_Name_Buffer
578 - (Path_Separator & Prefix.all & "lib"
579 - & Directory_Separator & "gnat");
581 + -- /raven/share/gpr
582 + Add_Str_To_Name_Buffer (Path_Separator &
583 + "@LOCALBASE@/share/gpr");
586 + Add_Str_To_Name_Buffer (Path_Separator &
587 + "@LOCALBASE@/lib/gnat");
592 Self := new String'(Name_Buffer (1 .. Name_Len));
593 --- gcc/ada/make.adb.orig
596 -- Compiler, Binder & Linker Data and Subprograms --
597 ----------------------------------------------------
599 - Gcc : String_Access := Program_Name ("gcc", "gnatmake");
600 + Gcc : String_Access := Program_Name ("ada", "gnatmake");
601 Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
602 Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
603 -- Default compiler, binder, linker programs
604 --- gcc/ada/terminals.c.orig
605 +++ gcc/ada/terminals.c
607 /* First all usupported platforms. Add stubs for exported routines. */
609 #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \
610 - || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__)
611 + || defined (__PikeOS__) || defined(__DJGPP__)
614 __gnat_new_tty (void)
615 @@ -1099,7 +1099,7 @@
616 || defined (__OpenBSD__) \
617 || defined (__NetBSD__) \
618 || defined (__DragonFly__)
623 /* Include every system header we need */
624 @@ -1115,21 +1115,25 @@
625 #include <sys/types.h>
626 #include <sys/wait.h>
628 -#if defined (__sun__)
630 # include <sys/stropts.h>
632 -#if defined (BSD) || defined (__sun__)
633 +#if defined (FREEBSD) || defined (sun)
634 # include <sys/signal.h>
636 #if defined (__hpux__)
637 # include <sys/stropts.h>
641 +#define CDISABLE _PC_VDISABLE
643 #define CDISABLE _POSIX_VDISABLE
646 /* On HP-UX and Sun system, there is a bzero function but with a different
647 signature. Use memset instead */
648 -#if defined (__hpux__) || defined (__sun__) || defined (_AIX)
649 +#if defined (__hpux__) || defined (sun) || defined (_AIX)
650 # define bzero(s,n) memset (s,0,n)
653 @@ -1147,11 +1151,11 @@
656 /* Configurable part */
657 -#if defined (__APPLE__) || defined (BSD)
658 +#if defined (__APPLE__) || defined (FREEBSD)
660 -#elif defined (__linux__)
661 +#elif defined (linux)
663 -#elif defined (__sun__)
665 #define USE_CLONE_DEVICE "/dev/ptmx"
667 #define USE_CLONE_DEVICE "/dev/ptc"
668 @@ -1437,7 +1441,7 @@
669 desc->slave_fd = open (desc->slave_name, O_RDWR, 0);
672 -#if defined (__sun__) || defined (__hpux__)
673 +#if defined (sun) || defined (__hpux__)
674 /* On systems such as Solaris we are using stream. We need to push the right
675 "modules" in order to get the expected terminal behaviors. Otherwise
676 functionalities such as termios are not available. */
678 +++ gcc/ada/traceback_symbolic.c
681 + Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
682 + Ada for Linux Team (ALT)
683 + Heavily modified by John Marino <http://www.dragonlace.net>
685 + Permission is hereby granted, free of charge, to any person obtaining a
686 + copy of this software and associated documentation files (the
687 + "Software"), to deal in the Software without restriction, including
688 + without limitation the rights to use, copy, modify, merge, publish,
689 + distribute, distribute with modifications, sublicense, and/or sell
690 + copies of the Software, and to permit persons to whom the Software is
691 + furnished to do so, subject to the following conditions:
693 + The above copyright notice and this permission notice shall be included
694 + in all copies or substantial portions of the Software.
696 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
697 + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
698 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
699 + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
700 + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
701 + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
702 + THE USE OR OTHER DEALINGS IN THE SOFTWARE.
704 + Except as contained in this notice, the name(s) of the above copyright
705 + holders shall not be used in advertising or otherwise to promote the
706 + sale, use or other dealings in this Software without prior written
714 + * Running addr2line doesn't make sense for cross-compiled objects.
715 + * Create a dummy function to satisfy g-trasym.o
719 +convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
720 + void *addrs ATTRIBUTE_UNUSED,
721 + int n_addr ATTRIBUTE_UNUSED,
722 + void *buf ATTRIBUTE_UNUSED,
723 + int *len ATTRIBUTE_UNUSED)
732 + * use the external program /usr/bin/addr2line to convert addresses
733 + * into file names and line numbers
736 +#include <sys/types.h>
742 +#define CLOSE_SENDPIPE close(sendpipe[0]); close(sendpipe[1])
743 +#define CLOSE_READPIPE close(readpipe[0]); close(readpipe[1])
744 +#define DUP2CLOSE(oldfd, newfd) dup2(oldfd, newfd); close(oldfd);
745 +#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
747 +#define MAX_LINE 1024
748 +#define PARENT_READ readpipe[0]
749 +#define CHILD_WRITE readpipe[1]
750 +#define CHILD_READ sendpipe[0]
751 +#define PARENT_WRITE sendpipe[1]
753 +#if defined (__sun__)
754 +#define ADDR2LINE_PROG "/usr/gnu/bin/addr2line"
756 +#define ADDR2LINE_PROG "/usr/bin/addr2line"
760 +convert_addresses (const char *file_name,
766 + int max_len = *len;
769 + struct sigaction act, oact;
771 + int sendpipe[2] = {-1,-1}, /* parent -> child */
772 + readpipe[2] = {-1,-1}; /* parent <- child */
775 + act.sa_handler = SIG_IGN;
776 + sigemptyset(&act.sa_mask);
778 + if (sigaction(SIGPIPE,&act,&oact) < 0)
781 + if (pipe(sendpipe) < 0) { RESTSIG; return; }
782 + if (pipe(readpipe) < 0) { CLOSE_SENDPIPE; RESTSIG; return; }
783 + if ((childpid = fork()) < 0) {
790 + if (childpid == 0) { /* child process */
791 + close(PARENT_WRITE);
792 + close(PARENT_READ);
793 + if ((CHILD_READ != STDIN_FILENO) && (CHILD_WRITE != STDOUT_FILENO)) {
794 + if ((CHILD_READ == STDOUT_FILENO) && (CHILD_WRITE == STDIN_FILENO)) {
795 + const int temp_fd = dup(CHILD_WRITE);
796 + close (CHILD_WRITE);
797 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
798 + DUP2CLOSE (temp_fd, STDOUT_FILENO);
800 + else if ((CHILD_READ == STDIN_FILENO) && (CHILD_WRITE > 1)) {
801 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
803 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDOUT_FILENO)) {
804 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
806 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDIN_FILENO)) {
807 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
808 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
811 + /* CHILD_READ >= 1 and CHILD_WRITE > 1 */
812 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
813 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
816 + /* As pointed out by Florian Weimer to JP, it is a security threat to call
817 + the script with a user defined environment and using the path. That
818 + would be Trojans pleasure. Therefore the absolute path to addr2line
819 + and an empty environment is used. That should be safe.
821 + char *const argv[] = { "addr2line",
827 + char *const envp[] = { NULL };
828 + if (execve(ADDR2LINE_PROG, argv, envp) < 0) {
829 + close (CHILD_WRITE);
830 + close (CHILD_READ);
836 + /* Below this line is parent process */
839 + char line[MAX_LINE + 1];
842 + long *trace_address = addrs;
844 + close(CHILD_WRITE);
847 + for(i=0; i < n_addr; i++) {
848 + snprintf(hex,sizeof(hex),"%#lx\n",*trace_address);
849 + write(PARENT_WRITE,hex,strlen(hex));
850 + n = read(PARENT_READ,line,MAX_LINE);
855 + /* We have approx. 16 additional chars for "%#lx in " clause.
856 + We use this info to prevent a buffer overrun. */
857 + if (n + 16 + (*len) > max_len)
860 + p = strchr(line,'\n');
864 + *len += snprintf(s, (max_len - (*len)), "%#lx in %s at %s",
865 + *trace_address, line, p+1);
868 + *len += snprintf(s, (max_len - (*len)), "%#lx at %s",
869 + *trace_address, line);
873 + trace_address += 1;
875 + close (PARENT_WRITE);
876 + close (PARENT_READ);
882 +++ gcc/ada/libgnat/g-socthi__bsd.adb
884 +------------------------------------------------------------------------------
886 +-- GNAT COMPILER COMPONENTS --
888 +-- G N A T . S O C K E T S . T H I N --
892 +-- Copyright (C) 2001-2018, AdaCore --
894 +-- GNAT is free software; you can redistribute it and/or modify it under --
895 +-- terms of the GNU General Public License as published by the Free Soft- --
896 +-- ware Foundation; either version 3, or (at your option) any later ver- --
897 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
898 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
899 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
901 +-- As a special exception under Section 7 of GPL version 3, you are granted --
902 +-- additional permissions described in the GCC Runtime Library Exception, --
903 +-- version 3.1, as published by the Free Software Foundation. --
905 +-- You should have received a copy of the GNU General Public License and --
906 +-- a copy of the GCC Runtime Library Exception along with this program; --
907 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
908 +-- <http://www.gnu.org/licenses/>. --
910 +-- GNAT was originally developed by the GNAT team at New York University. --
911 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
913 +------------------------------------------------------------------------------
915 +-- This package provides a target dependent thin interface to the sockets
916 +-- layer for use by the GNAT.Sockets package (g-socket.ads). This package
917 +-- should not be directly with'ed by an applications program.
919 +-- This is the *BSD version which uses fcntl rather than ioctl
920 +-- The constant SCON.Thread_Blocking_IO is always true (for all platforms, not
921 +-- just *BSD), so this binding is significantly simpler than the standard
924 +with GNAT.OS_Lib; use GNAT.OS_Lib;
926 +with Interfaces.C; use Interfaces.C;
928 +package body GNAT.Sockets.Thin is
930 + function Syscall_Accept
932 + Addr : System.Address;
933 + Addrlen : not null access C.int) return C.int;
934 + pragma Import (C, Syscall_Accept, "accept");
935 + -- The accept() function accepts a connection on a socket. An incoming
936 + -- connection is acknowledged and associated with an immediately created
937 + -- socket. The original socket is returned to the listening state.
939 + function Syscall_Connect
941 + Name : System.Address;
942 + Namelen : C.int) return C.int;
943 + pragma Import (C, Syscall_Connect, "connect");
944 + -- The connect() system call initiates a connection on a socket. If the
945 + -- parameter S is of type SOCK_DGRAM then connect() permanently specifies
946 + -- the peer to which datagrams are to be sent. If S is type SOCK_STREAM
947 + -- then connect() attempts to make a connection with another socket, which
948 + -- is identified by the parameter Name.
950 + function Syscall_Recv
952 + Msg : System.Address;
954 + Flags : C.int) return C.int;
955 + pragma Import (C, Syscall_Recv, "recv");
956 + -- The recv() function receives a message from a socket. The call can be
957 + -- used on a connection mode socket or a bound, connectionless socket. If
958 + -- no messages are available at the socket, the recv() call waits for a
959 + -- message to arrive unless the socket is non-blocking. If a socket is
960 + -- non-blocking, the call returns a -1 and ERRNO is set to EWOULDBLOCK.
962 + function Syscall_Recvfrom
964 + Msg : System.Address;
967 + From : System.Address;
968 + Fromlen : not null access C.int) return C.int;
969 + pragma Import (C, Syscall_Recvfrom, "recvfrom");
970 + -- The recvfrom() system call receives a message from a socket and captures
971 + -- the address from which the data was sent. It can be used to receive
972 + -- data on an unconnected socket as well. If no messages are available,
973 + -- the call waits for a message to arrive on blocking sockets. For
974 + -- non-blocking sockets without messages, -1 is returned and ERRNO is set
975 + -- to EAGAIN or EWOULDBLOCK.
977 + function Syscall_Recvmsg
979 + Msg : System.Address;
980 + Flags : C.int) return System.CRTL.ssize_t;
981 + pragma Import (C, Syscall_Recvmsg, "recvmsg");
982 + -- The recvmsg call receives a message from a socket, and can be used to
983 + -- receive data on an unconnected socket as well. If no messages are
984 + -- available, the call waits for a message to arrive on blocking sockets.
985 + -- For non-blocking sockets without messages, -1 is returned and ERRNO is
986 + -- set to EAGAIN or EWOULDBLOCK.
988 + function Syscall_Sendmsg
990 + Msg : System.Address;
991 + Flags : C.int) return System.CRTL.ssize_t;
992 + pragma Import (C, Syscall_Sendmsg, "sendmsg");
993 + -- The sendmsg() function sends a message to a socket, and can be used with
994 + -- unconnected sockets as well (the msg is ignored in this case). The
995 + -- function returns the number of bytes sent when successful, otherwise it
996 + -- returns -1 and ERRNO is set (many possible values).
998 + function Syscall_Sendto
1000 + Msg : System.Address;
1003 + To : System.Address;
1004 + Tolen : C.int) return C.int;
1005 + pragma Import (C, Syscall_Sendto, "sendto");
1006 + -- The sendto() function only works for connected sockets and it initiates
1007 + -- the transmission of a message. A successful call returns the numbers of
1008 + -- bytes sent, and a failure returns a -1 and ERRNO is set.
1010 + function Syscall_Socket
1013 + Protocol : C.int) return C.int;
1014 + pragma Import (C, Syscall_Socket, "socket");
1015 + -- The socket() function is used to create an unbound socket and returns a
1016 + -- file descriptor that can be used with other socket functions. Upon
1017 + -- failure, a -1 is returned and ERRNO is set.
1019 + procedure Disable_SIGPIPE (S : C.int);
1020 + pragma Import (C, Disable_SIGPIPE, "__gnat_disable_sigpipe");
1022 + procedure Disable_All_SIGPIPEs;
1023 + pragma Import (C, Disable_All_SIGPIPEs, "__gnat_disable_all_sigpipes");
1024 + -- Sets the process to ignore all SIGPIPE signals on platforms that
1025 + -- don't support Disable_SIGPIPE for particular streams.
1030 + Val : C.int) return C.int;
1031 + pragma Import (C, C_Fcntl, "fcntl");
1032 + -- The ioctl of 64-bit DragonFlyBSD, OpenBSD, and NetBSD does not support
1033 + -- setting a socket in non-blocking mode. fcntl must be used instead.
1041 + Addr : System.Address;
1042 + Addrlen : not null access C.int) return C.int
1044 + R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
1047 + Disable_SIGPIPE (R);
1055 + function C_Connect
1057 + Name : System.Address;
1058 + Namelen : C.int) return C.int
1061 + return Syscall_Connect (S, Name, Namelen);
1064 + ------------------
1065 + -- Socket_Ioctl --
1066 + ------------------
1068 + function Socket_Ioctl
1070 + Req : SOSC.IOCTL_Req_T;
1071 + Arg : access C.int) return C.int
1074 + if Req = SOSC.FIONBIO then
1077 + flags : constant Unsigned_32 :=
1078 + Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
1079 + nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.O_NDELAY);
1080 + enabled : constant Boolean := Arg.all = 1;
1081 + newval : C.int := C.int (flags);
1084 + newval := C.int (flags or nonblock);
1085 + elsif (flags and nonblock) > 0 then
1086 + newval := C.int (flags - nonblock);
1088 + return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
1092 + return C_Ioctl (S, Req, Arg);
1101 + Msg : System.Address;
1103 + Flags : C.int) return C.int
1106 + return Syscall_Recv (S, Msg, Len, Flags);
1113 + function C_Recvfrom
1115 + Msg : System.Address;
1118 + From : System.Address;
1119 + Fromlen : not null access C.int) return C.int
1122 + return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
1129 + function C_Recvmsg
1131 + Msg : System.Address;
1132 + Flags : C.int) return System.CRTL.ssize_t
1135 + return Syscall_Recvmsg (S, Msg, Flags);
1142 + function C_Sendmsg
1144 + Msg : System.Address;
1145 + Flags : C.int) return System.CRTL.ssize_t
1148 + return Syscall_Sendmsg (S, Msg, Flags);
1157 + Msg : System.Address;
1160 + To : System.Address;
1161 + Tolen : C.int) return C.int
1164 + return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
1174 + Protocol : C.int) return C.int
1176 + R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
1178 + Disable_SIGPIPE (R);
1186 + procedure Finalize is
1191 + -------------------------
1192 + -- Host_Error_Messages --
1193 + -------------------------
1195 + package body Host_Error_Messages is separate;
1201 + procedure Initialize is
1203 + Disable_All_SIGPIPEs;
1206 + --------------------
1207 + -- Signalling_Fds --
1208 + --------------------
1210 + package body Signalling_Fds is
1212 + -- In this default implementation, we use a C version of these
1213 + -- subprograms provided by socket.c.
1215 + function C_Create (Fds : not null access Fd_Pair) return C.int;
1216 + function C_Read (Rsig : C.int) return C.int;
1217 + function C_Write (Wsig : C.int) return C.int;
1218 + procedure C_Close (Sig : C.int);
1220 + pragma Import (C, C_Create, "__gnat_create_signalling_fds");
1221 + pragma Import (C, C_Read, "__gnat_read_signalling_fd");
1222 + pragma Import (C, C_Write, "__gnat_write_signalling_fd");
1223 + pragma Import (C, C_Close, "__gnat_close_signalling_fd");
1226 + (Fds : not null access Fd_Pair) return C.int renames C_Create;
1227 + function Read (Rsig : C.int) return C.int renames C_Read;
1228 + function Write (Wsig : C.int) return C.int renames C_Write;
1229 + procedure Close (Sig : C.int) renames C_Close;
1231 + end Signalling_Fds;
1233 + --------------------------
1234 + -- Socket_Error_Message --
1235 + --------------------------
1237 + function Socket_Error_Message (Errno : Integer) return String is separate;
1239 +end GNAT.Sockets.Thin;
1241 +++ gcc/ada/libgnat/s-trasym__bsd.adb
1243 +------------------------------------------------------------------------------
1245 +-- GNAT RUN-TIME COMPONENTS --
1247 +-- S Y S T E M . T R A C E B A C K . S Y M B O L I C --
1251 +-- Copyright (C) 1999-2018, AdaCore --
1253 +-- GNAT is free software; you can redistribute it and/or modify it under --
1254 +-- terms of the GNU General Public License as published by the Free Soft- --
1255 +-- ware Foundation; either version 3, or (at your option) any later ver- --
1256 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
1257 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
1258 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
1260 +-- As a special exception under Section 7 of GPL version 3, you are granted --
1261 +-- additional permissions described in the GCC Runtime Library Exception, --
1262 +-- version 3.1, as published by the Free Software Foundation. --
1264 +-- You should have received a copy of the GNU General Public License and --
1265 +-- a copy of the GCC Runtime Library Exception along with this program; --
1266 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
1267 +-- <http://www.gnu.org/licenses/>. --
1269 +-- GNAT was originally developed by the GNAT team at New York University. --
1270 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
1272 +------------------------------------------------------------------------------
1274 +-- Run-time symbolic traceback support
1275 +-- This file is based on the work by Juergen Pfiefer which is still used
1276 +-- today to provide symbolic traceback support for gnu/kFreeBSD.
1277 +-- Incorporated in GNAT-AUX by John Marino <http://www.dragonlace.net>
1279 +pragma Polling (Off);
1280 +-- We must turn polling off for this unit, because otherwise we can get
1281 +-- elaboration circularities when polling is turned on.
1283 +with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
1284 +with System.Soft_Links;
1286 +package body System.Traceback.Symbolic is
1288 + -- Note that Suppress_Hex is ignored in this version of this package.
1290 + package TSL renames System.Soft_Links;
1292 + -- To perform the raw addresses to symbolic form translation we rely on a
1293 + -- libaddr2line symbolizer which examines debug info from a provided
1294 + -- executable file name, and an absolute path is needed to ensure the file
1295 + -- is always found. This is "__gnat_locate_exec_on_path (gnat_argv [0])"
1296 + -- for our executable file, a fairly heavy operation so we cache the
1299 + Exename : System.Address;
1300 + -- Pointer to the name of the executable file to be used on all
1301 + -- invocations of the libaddr2line symbolization service.
1303 + Exename_Resolved : Boolean := False;
1304 + -- Flag to indicate whether we have performed the executable file name
1305 + -- resolution already. Relying on a not null Exename for this purpose
1306 + -- would be potentially inefficient as this is what we will get if the
1307 + -- resolution attempt fails.
1309 + ------------------------
1310 + -- Symbolic_Traceback --
1311 + ------------------------
1313 + function Symbolic_Traceback
1314 + (Traceback : System.Traceback_Entries.Tracebacks_Array) return String
1316 + procedure convert_addresses
1317 + (filename : System.Address;
1318 + addrs : System.Address;
1319 + n_addrs : Integer;
1320 + buf : System.Address;
1321 + len : System.Address);
1322 + pragma Import (C, convert_addresses, "convert_addresses");
1323 + -- This is the procedure version of the Ada-aware addr2line. It places
1324 + -- in BUF a string representing the symbolic translation of the N_ADDRS
1325 + -- raw addresses provided in ADDRS, looked up in debug information from
1326 + -- FILENAME. LEN points to an integer which contains the size of the
1327 + -- BUF buffer at input and the result length at output.
1329 + -- Note that this procedure is *not* thread-safe.
1331 + type Argv_Array is array (0 .. 0) of System.Address;
1332 + gnat_argv : access Argv_Array;
1333 + pragma Import (C, gnat_argv, "gnat_argv");
1335 + function locate_exec_on_path
1336 + (c_exename : System.Address) return System.Address;
1337 + pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
1339 + B_Size : constant Integer := 256 * Traceback'Length;
1340 + Len : Integer := B_Size;
1341 + Res : String (1 .. B_Size);
1344 + if Traceback'Length = 0 then
1348 + -- If our input set of raw addresses is not empty, resort to the
1349 + -- libaddr2line service to symbolize it all.
1351 + -- Compute, cache and provide the absolute path to our executable file
1352 + -- name as the binary file where the relevant debug information is to be
1353 + -- found. If the executable file name resolution fails, we have no
1354 + -- sensible basis to invoke the symbolizer at all.
1356 + -- Protect all this against concurrent accesses explicitly, as the
1357 + -- underlying services are potentially thread unsafe.
1359 + TSL.Lock_Task.all;
1361 + if not Exename_Resolved then
1362 + Exename := locate_exec_on_path (gnat_argv (0));
1363 + Exename_Resolved := True;
1366 + if Exename /= System.Null_Address then
1367 + Len := Res'Length;
1369 + (Exename, Traceback'Address, Traceback'Length,
1370 + Res (1)'Address, Len'Address);
1373 + TSL.Unlock_Task.all;
1375 + -- Return what the addr2line symbolizer has produced if we have called
1376 + -- it (the executable name resolution succeeded), or an empty string
1379 + if Exename /= System.Null_Address then
1380 + return Res (1 .. Len);
1384 + end Symbolic_Traceback;
1386 + -- "No_Hex" is ignored in this version, because otherwise we have nothing
1387 + -- at all to print.
1389 + function Symbolic_Traceback_No_Hex
1390 + (Traceback : System.Traceback_Entries.Tracebacks_Array) return String is
1392 + return Symbolic_Traceback (Traceback);
1393 + end Symbolic_Traceback_No_Hex;
1395 + function Symbolic_Traceback
1396 + (E : Ada.Exceptions.Exception_Occurrence) return String
1399 + return Symbolic_Traceback (Tracebacks (E));
1400 + end Symbolic_Traceback;
1402 + function Symbolic_Traceback_No_Hex
1403 + (E : Ada.Exceptions.Exception_Occurrence) return String is
1405 + return Symbolic_Traceback (E);
1406 + end Symbolic_Traceback_No_Hex;
1408 + ------------------
1409 + -- Enable_Cache --
1410 + ------------------
1412 + procedure Enable_Cache (Include_Modules : Boolean := False) is
1417 +end System.Traceback.Symbolic;
1418 --- gcc/ada/gcc-interface/Make-lang.in.orig
1419 +++ gcc/ada/gcc-interface/Make-lang.in
1423 # Language-independent object files.
1424 -ADA_BACKEND = $(BACKEND) attribs.o
1425 +ADA_BACKEND = $(BACKEND2) attribs.o
1427 # List of target dependent sources, overridden below as necessary
1429 --- gcc/ada/init.c.orig
1431 @@ -2643,8 +2643,15 @@
1433 mcontext_t *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
1435 +#if defined (__i386__)
1436 + unsigned long *pc = (unsigned long *)mcontext->gregs[REG_EIP];
1437 + /* The pattern is "orl $0x0,(%esp)" for a probe in 32-bit mode. */
1438 + if (signo == SIGSEGV && pc && *pc == 0x00240c83)
1439 + mcontext->gregs[REG_ESP] += 4096 + 4 * sizeof (unsigned long);
1440 +#elif defined (__ARMEL__)
1441 /* ARM Bump has to be an even number because of odd/even architecture. */
1442 - ((mcontext_t *) mcontext)->arm_pc += 2;
1443 + mcontext->arm_pc += 2;
1448 --- gcc/ada/libgnat/g-socthi.ads.orig
1449 +++ gcc/ada/libgnat/g-socthi.ads
1452 package C renames Interfaces.C;
1454 - use type System.CRTL.ssize_t;
1456 function Socket_Errno return Integer renames GNAT.OS_Lib.Errno;
1457 -- Returns last socket error number
1461 [FILE:19397:patches/patch-diff-ada-testsuite]
1462 --- gcc/testsuite/ada/acats/run_acats.sh.orig
1463 +++ gcc/testsuite/ada/acats/run_acats.sh
1468 -# Provide which replacement.
1470 -# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
1471 -# ksh93 and bash have it.
1472 -# type output format differs between ksh88 and ksh93, so avoid it if
1473 -# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
1474 -# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
1477 - path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
1478 - path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
1479 - path=`whence $* 2>/dev/null` && { echo $path; return 0; }
1483 # Set up environment to use the Ada compiler from the object tree
1485 --- gcc/testsuite/ada/acats/run_all.sh.orig
1486 +++ gcc/testsuite/ada/acats/run_all.sh
1489 # End of customization section.
1491 -# Perform arithmetic evaluation on the ARGs, and store the result in the
1492 -# global $as_val. Take advantage of shells that can avoid forks. The arguments
1493 -# must be portable across $(()) and expr.
1494 -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
1495 - eval 'as_fn_arith ()
1502 - as_val=`expr "$@" || test $? -eq 1`
1508 printf "$@" >> $dir/acats.sum
1510 echo "$@" >> $dir/acats.log
1514 + printf "%04d %7s" $1 $2
1523 if [ "$dir" = "$testdir" ]; then
1525 gnatls -v >> $dir/acats.log
1528 -if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
1529 - dir_support=$dir/../acats/support
1532 - mv $dir/tests $dir/tests.$$ 2> /dev/null
1533 - rm -rf $dir/tests.$$ &
1536 - cp -pr $dir/../acats/tests $dir/
1538 - dir_support=$dir/support
1540 display " === acats support ==="
1541 display_noeol "Generating support files..."
1550 display " === acats tests ==="
1552 if [ $# -eq 0 ]; then
1553 @@ -228,14 +206,20 @@
1562 for chapter in $chapters; do
1563 - # Used to generate support once and finish after that.
1564 - [ "$chapter" = "NONE" ] && continue
1565 + if [ -d $dir/tests/$chapter ]; then
1566 + cd $dir/tests/$chapter
1567 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
1568 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
1569 + > $dir/tests/$chapter/${chapter}.lst
1570 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1571 + countdown=`expr $countdown + $countn`
1575 +for chapter in $chapters; do
1576 display Running chapter $chapter ...
1578 if [ ! -d $dir/tests/$chapter ]; then
1579 @@ -244,45 +228,11 @@
1583 - cd $dir/tests/$chapter
1584 - ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
1585 - cut -c1-7 | sort | uniq | comm -23 - $dir_support/norun.lst \
1586 - > $dir/tests/$chapter/${chapter}.lst
1587 countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1588 - as_fn_arith $glob_countn + $countn
1589 - glob_countn=$as_val
1590 + glob_countn=`expr $glob_countn + $countn`
1592 for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
1594 - # If running multiple run_all.sh jobs in parallel, decide
1595 - # if we should run this test in the current instance.
1596 - if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
1598 - # Ugh, some tests have inter-test dependencies, those
1599 - # tests have to be scheduled on the same parallel instance
1600 - # as previous test.
1601 - ce2108f | ce2108h | ce3112d) ;;
1602 - # All others can be hopefully scheduled freely.
1604 - as_fn_arith $par_countm + 1
1605 - par_countm=$as_val
1606 - [ $par_countm -eq 10 ] && par_countm=0
1607 - if [ $par_countm -eq 1 ]; then
1608 - as_fn_arith $par_count + 1
1610 - if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
1617 - if [ -z "$par_last" ]; then
1618 - as_fn_arith $glob_countn - 1
1619 - glob_countn=$as_val
1624 + counti=`expr $counti + 1`
1625 extraflags="-gnat95"
1626 grep $i $testdir/overflow.lst > /dev/null 2>&1
1627 if [ $? -eq 0 ]; then
1628 @@ -300,10 +250,13 @@
1629 if [ $? -eq 0 ]; then
1630 extraflags="$extraflags -fstack-check"
1632 + inform $countdown $i
1633 + countdown=`expr $countdown - 1`
1634 test=$dir/tests/$chapter/$i
1635 mkdir $test && cd $test >> $dir/acats.log 2>&1
1637 if [ $? -ne 0 ]; then
1640 failed="${failed}${i} "
1642 @@ -321,19 +274,22 @@
1643 echo "BUILD $main" >> $dir/acats.log
1646 - cxb30*) EXTERNAL_OBJECTS="$dir_support/cxb30040.o $dir_support/cxb30060.o $dir_support/cxb30130.o $dir_support/cxb30131.o";;
1647 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
1648 ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
1649 ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
1650 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
1652 if [ "$main" = "" ]; then
1655 failed="${failed}${i} "
1660 - target_gnatmake $extraflags -I$dir_support $main >> $dir/acats.log 2>&1
1661 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
1662 if [ $? -ne 0 ]; then
1665 failed="${failed}${i} "
1668 target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
1669 cd $dir/tests/$chapter/$i
1670 cat ${i}.log >> $dir/acats.log
1672 egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
1673 if [ $? -ne 0 ]; then
1674 grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
1675 @@ -357,15 +314,12 @@
1676 failed="${failed}${i} "
1678 log "UNSUPPORTED: $i"
1679 - as_fn_arith $glob_countn - 1
1680 - glob_countn=$as_val
1681 - as_fn_arith $glob_countu + 1
1682 - glob_countu=$as_val
1683 + glob_countn=`expr $glob_countn - 1`
1684 + glob_countu=`expr $glob_countu + 1`
1688 - as_fn_arith $glob_countok + 1
1689 - glob_countok=$as_val
1690 + glob_countok=`expr $glob_countok + 1`
1695 +++ gcc/testsuite/ada/acats/run_remote.sh
1698 +# Run ACATS with the GNU Ada compiler
1700 +# The following functions are to be customized if you run in cross
1701 +# environment or want to change compilation flags. Note that for
1702 +# tests requiring checks not turned on by default, this script
1703 +# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
1705 +# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
1706 +# gnatflags="-gnatN"
1709 +gnatflags="-gnatws"
1710 +tabtarget="/data/local/testsuite"
1711 +STRIP="@REMOTE_TARGET@-strip"
1714 + # Run on rooted tablet (port 22 vs port 2222)
1716 + $STRIP_FOR_TARGET $*
1717 + /usr/bin/scp -qp $* root@tablet:$tabtarget/
1718 + /usr/bin/ssh -q tablet $tabtarget/$BN
1722 + /usr/bin/ssh -q tablet "$1"
1725 +# End of customization section.
1729 + printf "$@" >> $dir/acats.sum
1730 + printf "$@" >> $dir/acats.log
1735 + echo "$@" >> $dir/acats.sum
1736 + echo "$@" >> $dir/acats.log
1740 + echo "$@" >> $dir/acats.sum
1741 + echo "$@" >> $dir/acats.log
1745 + printf "%04d %7s" $1 $2
1752 +dir=`${PWDCMD-pwd}`
1754 +if [ "$testdir" = "" ]; then
1755 + echo You must use make check or make check-ada
1759 +if [ "$dir" = "$testdir" ]; then
1760 + echo "error: srcdir must be different than objdir, exiting."
1764 +target_gnatmake () {
1765 + echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
1766 + gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
1774 + rm -f "$binmain" *.o *.ali > /dev/null 2>&1
1778 + ls ${i}?.adb > ${i}.lst 2> /dev/null
1779 + ls ${i}*m.adb >> ${i}.lst 2> /dev/null
1780 + ls ${i}.adb >> ${i}.lst 2> /dev/null
1781 + main=`tail -1 ${i}.lst`
1785 + local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'`
1789 +EXTERNAL_OBJECTS=""
1790 +# Global variable to communicate external objects to link with.
1792 +rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst
1794 +display "Test Run By $USER on `date`"
1796 +display " === acats configuration ==="
1798 +target=`$GCC -dumpmachine`
1800 +display target gcc is $GCC
1801 +display `$GCC -v 2>&1`
1802 +display host=`gcc -dumpmachine`
1803 +display target=$target
1804 +display `type gnatmake-cross`
1805 +gnatls-cross -v >> $dir/acats.log
1808 +# Let's be tidy and clear off the remote device first
1809 +target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *"
1811 +display " === acats support ==="
1812 +display_noeol "Generating support files..."
1814 +rm -rf $dir/support
1815 +mkdir -p $dir/support
1818 +cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
1820 +# Find out the size in bit of an address on the target
1821 +target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
1822 +target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
1823 +target_bit=`cat $dir/support/impbit.out`
1824 +echo target_bit="$target_bit" >> $dir/acats.log
1826 +# Find out a suitable asm statement
1827 +# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
1829 + ia64*-*-* | s390*-*-*)
1830 + target_insn="nop 0"
1833 + target_insn="swym 0"
1839 +echo target_insn="$target_insn" >> $dir/acats.log
1841 +sed -e "s,ACATS4GNATDIR,$dir,g" \
1842 + < $testdir/support/impdef.a > $dir/support/impdef.a
1843 +sed -e "s,ACATS4GNATDIR,$dir,g" \
1844 + -e "s,ACATS4GNATBIT,$target_bit,g" \
1845 + -e "s,ACATS4GNATINSN,$target_insn,g" \
1846 + < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
1847 +sed -e "s,ACATS4GNATDIR,$dir,g" \
1848 + < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
1850 +cp $testdir/tests/cd/*.c $dir/support
1851 +cp $testdir/tests/cxb/*.c $dir/support
1852 +grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst
1855 +mv $dir/tests $dir/tests.$$ 2> /dev/null
1856 +rm -rf $dir/tests.$$ &
1859 +cp -pr $testdir/tests $dir/
1861 +for i in $dir/support/*.ada $dir/support/*.a; do
1862 + host_gnatchop $i >> $dir/acats.log 2>&1
1865 +# These tools are used to preprocess some ACATS sources
1866 +# they need to be compiled native on the host.
1868 +host_gnatmake -q -gnatws macrosub.adb
1869 +if [ $? -ne 0 ]; then
1870 + display "**** Failed to compile macrosub"
1873 +./macrosub > macrosub.out 2>&1
1876 +host_gnatmake -q -gnatws widechr.adb
1877 +if [ $? -ne 0 ]; then
1878 + display "**** Failed to compile widechr"
1881 +./widechr > widechr.out 2>&1
1883 +rm -f $dir/support/macrosub
1884 +rm -f $dir/support/widechr
1885 +rm -f $dir/support/*.ali
1886 +rm -f $dir/support/*.o
1890 +# From here, all compilations will be made by the target compiler
1892 +display_noeol "Compiling support files..."
1895 +if [ $? -ne 0 ]; then
1896 + display "**** Failed to compile C code"
1900 +host_gnatchop *.adt >> $dir/acats.log 2>&1
1902 +target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
1903 +target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
1907 +display " === acats tests ==="
1909 +if [ $# -eq 0 ]; then
1910 + chapters=`cd $dir/tests; echo [a-z]*`
1920 +for chapter in $chapters; do
1921 + if [ -d $dir/tests/$chapter ]; then
1922 + cd $dir/tests/$chapter
1923 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
1924 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
1925 + > $dir/tests/$chapter/${chapter}.lst
1926 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1927 + countdown=`expr $countdown + $countn`
1931 +cat > $dir/execute.sh << EOF
1933 + printf "left: %04d" \$1
1940 + local total=\$(echo \$testlist | awk '{print NF}')
1942 + echo "Executing \$total tests on remote device"
1944 + for x in \$testlist; do
1945 + timeout -t 30 ./\${x} > logs/\${x}.log 2>&1
1946 + countx=\$(expr \$countx + 1)
1947 + if [ \$countx -eq 25 ]; then
1948 + total=\$(expr \$total - 25)
1955 + tar -czf remote.logs.tar.gz logs
1960 +display "All tests are being cross-compiled without execution first."
1962 +for chapter in $chapters; do
1963 + if [ ! -d $dir/tests/$chapter ]; then
1967 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1968 + glob_countn=`expr $glob_countn + $countn`
1970 + for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
1971 + counti=`expr $counti + 1`
1972 + extraflags="-gnat95"
1973 + grep $i $testdir/overflow.lst > /dev/null 2>&1
1974 + if [ $? -eq 0 ]; then
1975 + extraflags="$extraflags -gnato"
1977 + grep $i $testdir/elabd.lst > /dev/null 2>&1
1978 + if [ $? -eq 0 ]; then
1979 + extraflags="$extraflags -gnatE"
1981 + grep $i $testdir/floatstore.lst > /dev/null 2>&1
1982 + if [ $? -eq 0 ]; then
1983 + extraflags="$extraflags -ffloat-store"
1985 + grep $i $testdir/stackcheck.lst > /dev/null 2>&1
1986 + if [ $? -eq 0 ]; then
1987 + extraflags="$extraflags -fstack-check"
1989 + inform $countdown $i
1990 + countdown=`expr $countdown - 1`
1991 + test=$dir/tests/$chapter/$i
1992 + mkdir $test && cd $test >> $dir/acats.log 2>&1
1994 + if [ $? -ne 0 ]; then
1996 + display "FAIL: $i"
1997 + failed="${failed}${i} "
2002 + host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
2004 + if [ -z "$main" ]; then
2008 + binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
2009 + echo "BUILD $main" >> $dir/acats.log
2010 + EXTERNAL_OBJECTS=""
2012 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
2013 + ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
2014 + ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
2015 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
2017 + if [ "$main" = "" ]; then
2019 + display "FAIL: $i"
2020 + failed="${failed}${i} "
2025 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
2026 + if [ $? -ne 0 ]; then
2028 + display "FAIL: $i"
2029 + failed="${failed}${i} "
2033 + echo $chapter/$i/$binmain >> $dir/transfer.lst
2034 + echo "$binmain \\" >> $dir/execute.sh
2039 +echo '"' >> $dir/execute.sh
2040 +echo "cycle" >> $dir/execute.sh
2043 +display "Transfer files to remote device: root@tablet:$tabtarget/"
2045 +cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \
2046 + target_cmd "tar -C $tabtarget -xzf -"
2048 +tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -"
2049 +target_cmd "cd $tabtarget; sh execute.sh"
2050 +rm -rf $dir/logs $dir/remote.logs.tar.gz
2051 +/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/
2052 +tar -xzf $dir/remote.logs.tar.gz
2054 +countdown=`wc -l < $dir/transfer.lst`
2055 +glob_countn=${countdown}
2056 +for i in `cat $dir/transfer.lst`; do
2058 + if [ "$section" != "$savedsect" ]; then
2059 + display Running chapter $section ...
2061 + savedsect=$section
2063 + #inform $countdown $TN
2064 + countdown=`expr $countdown - 1`
2065 + proglog="$dir/logs/${prog}.log"
2066 + echo "RUN $prog" >> $dir/acats.log
2067 + if [ ! -f $proglog ]; then
2068 + echo "LOG NOT FOUND!" >> $proglog
2071 + cat $proglog >> $dir/acats.log
2073 + egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1
2074 + if [ $? -ne 0 ]; then
2075 + grep 'tasking not implemented' $proglog > /dev/null 2>&1
2077 + if [ $? -ne 0 ]; then
2078 + display "FAIL: ${TN}"
2079 + failed="${failed}${TN} "
2081 + log "UNSUPPORTED: ${TN}"
2082 + glob_countn=`expr $glob_countn - 1`
2083 + glob_countu=`expr $glob_countu + 1`
2087 + glob_countok=`expr $glob_countok + 1`
2089 + cd $dir/tests/$section/$TN
2094 +display " === acats Summary ==="
2095 +display "# of expected passes $glob_countok"
2096 +display "# of unexpected failures `expr $glob_countn - $glob_countok`"
2098 +if [ $glob_countu -ne 0 ]; then
2099 + display "# of unsupported tests $glob_countu"
2102 +if [ $glob_countok -ne $glob_countn ]; then
2103 + display "*** FAILURES: $failed"
2106 +display "$0 completed at `date`"
2109 --- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
2110 +++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
2113 +-- { dg-do run { xfail *-*-openbsd* } }
2114 -- { dg-options "-O2" }
2116 -- This is an optimization test and its failure is only a missed optimization.
2117 --- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
2118 +++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
2120 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
2122 -with Unchecked_Conversion;
2124 -procedure Unchecked_Convert5 is
2126 - subtype c_1 is string(1..1);
2128 - function int2c1 is -- { dg-warning "different sizes" }
2129 - new unchecked_conversion (source => integer, target => c_1);
2135 - c1 := int2c1(16#12#);
2137 - if c1 (1) /= ASCII.Nul then
2138 - raise Program_Error;
2142 --- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
2143 +++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
2145 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
2147 -with Unchecked_Conversion;
2149 -procedure Unchecked_Convert6 is
2151 - subtype c_5 is string(1..5);
2153 - function int2c5 is -- { dg-warning "different sizes" }
2154 - new unchecked_conversion (source => integer, target => c_5);
2160 - c5 := int2c5(16#12#);
2162 - if c5 (4) /= ASCII.DC2 then
2163 - raise Program_Error;
2169 [FILE:6122:patches/patch-diff-core]
2170 --- gcc/config/darwin.h.orig
2171 +++ gcc/config/darwin.h
2173 multiple times on a command line with different arguments each time,
2174 so put a * after their names so all of them get passed. */
2176 - "%{static}%{!static:-dynamic} \
2177 + "%{static}%{!static:-dynamic -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2178 %:remove-outfile(-ldl) \
2179 %:remove-outfile(-lm) \
2180 %:remove-outfile(-lpthread) \
2181 --- gcc/config/dragonfly.h.orig
2182 +++ gcc/config/dragonfly.h
2185 %{static:-Bstatic} \
2187 - %{!static:--hash-style=gnu} \
2188 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2189 %{symbolic:-Bsymbolic}"
2192 #define LINK_SPEC DFBSD_LINK_SPEC
2194 -#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
2195 +#define DFBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.2"
2198 /* Use --as-needed -lgcc_s for eh support. */
2199 --- gcc/config/sol2.h.orig
2200 +++ gcc/config/sol2.h
2202 %{static:-dn -Bstatic} \
2203 %{shared:-G -dy %{!mimpure-text:-z text}} " \
2204 LINK_LIBGCC_MAPFILE_SPEC LINK_CLEARCAP_SPEC " \
2205 + %{!static:-R/lib/amd64:@PREFIX@/@GCCAUX@/lib/amd64:@LOCALBASE@/lib} \
2206 %{symbolic:-Bsymbolic -G -dy -z text} \
2209 --- gcc/config/aarch64/aarch64-freebsd.h.orig
2210 +++ gcc/config/aarch64/aarch64-freebsd.h
2212 %{shared:-Bshareable %{h*} %{soname*}} \
2213 %{symbolic:-Bsymbolic} \
2214 %{static:-Bstatic} \
2216 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib \
2217 %{rdynamic:-export-dynamic} \
2218 %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
2219 -X" SUBTARGET_EXTRA_LINK_SPEC " \
2222 #define MCOUNT_NAME ".mcount"
2224 +/* Static stack checking is supported by means of probes. */
2225 +#define STACK_CHECK_STATIC_BUILTIN 1
2226 #endif /* GCC_AARCH64_FREEBSD_H */
2227 --- gcc/config/i386/freebsd.h.orig
2228 +++ gcc/config/i386/freebsd.h
2230 %{rdynamic:-export-dynamic} \
2231 -dynamic-linker %(fbsd_dynamic_linker) } \
2232 %{static:-Bstatic}} \
2233 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2234 %{symbolic:-Bsymbolic}"
2236 /* A C statement to output to the stdio stream FILE an assembler
2237 --- gcc/config/i386/freebsd64.h.orig
2238 +++ gcc/config/i386/freebsd64.h
2240 %{rdynamic:-export-dynamic} \
2241 -dynamic-linker %(fbsd_dynamic_linker) } \
2242 %{static:-Bstatic}} \
2243 + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2244 %{symbolic:-Bsymbolic}"
2245 --- gcc/Makefile.in.orig
2247 @@ -1225,7 +1225,6 @@
2255 @@ -1637,6 +1636,7 @@
2256 $(OBJS-libcommon-target) main.o c-family/cppspec.o \
2257 $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
2258 $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
2259 + insn-modes.o insn-modes-ada.o \
2260 lto-wrapper.o collect-utils.o
2262 # for anything that is shared use the cc1plus profile data, as that
2263 @@ -1652,6 +1652,11 @@
2264 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
2266 BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \
2268 + $(CPPLIB) $(LIBDECNUMBER)
2270 +BACKEND2 = libbackend.a main.o libcommon-target.a libcommon.a \
2271 + insn-modes-ada.o \
2272 $(CPPLIB) $(LIBDECNUMBER)
2274 # This is defined to "yes" if Tree checking is enabled, which roughly means
2275 @@ -2362,6 +2367,7 @@
2277 insn-modes.c: s-modes; @true
2278 insn-modes.h: s-modes-h; @true
2279 +insn-modes-ada.c: s-modes-ada; @true
2280 insn-modes-inline.h: s-modes-inline-h; @true
2281 min-insn-modes.c: s-modes-m; @true
2283 @@ -2386,6 +2392,12 @@
2284 $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
2287 +s-modes-ada: s-modes
2288 + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \
2289 + < insn-modes.c > tmp-modes-ada.c)
2290 + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c
2291 + $(STAMP) s-modes-ada
2293 insn-preds.c: s-preds; @true
2294 tm-preds.h: s-preds-h; @true
2295 tm-constrs.h: s-constrs-h; @true
2296 @@ -3617,6 +3629,9 @@
2297 ( cd $(DESTDIR)$(bindir) && \
2298 $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
2300 + if [ -f gnat1$(exeext) ] ; then \
2301 + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \
2303 if [ ! -f gcc-cross$(exeext) ] \
2304 && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
2305 rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
2306 --- gcc/config/i386/gnu-user64.h.orig
2307 +++ gcc/config/i386/gnu-user64.h
2309 %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
2310 %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
2312 + %{!static:--enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib64:@LOCALBASE@/lib} \
2318 @@ -1513,6 +1513,9 @@
2319 static const char *const standard_startfile_prefix_2
2320 = STANDARD_STARTFILE_PREFIX_2;
2322 +/* Since we hardset rpath to LOCALBASE, follow with library search path */
2323 +static const char *const standard_raven_prefix = "@LOCALBASE@/lib/";
2325 /* A relative path to be used in finding the location of tools
2326 relative to the driver. */
2327 static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
2328 @@ -4695,6 +4698,8 @@
2330 add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
2331 PREFIX_PRIORITY_LAST, 1, 0);
2332 + add_prefix (&startfile_prefixes, standard_raven_prefix, "BINUTILS",
2333 + PREFIX_PRIORITY_LAST, 0, 0);
2336 gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix));
2339 [FILE:8497:patches/patch-diff-cxx]
2340 --- libstdc++-v3/configure.host.orig
2341 +++ libstdc++-v3/configure.host
2344 os_include_dir="os/bsd/freebsd"
2347 + os_include_dir="os/bionic"
2350 os_include_dir="os/generic"
2352 --- libstdc++-v3/config/os/bionic/ctype_base.h.orig
2353 +++ libstdc++-v3/config/os/bionic/ctype_base.h
2355 // Non-standard typedefs.
2356 typedef const int* __to_type;
2359 +#define _U _CTYPE_U
2360 +#define _L _CTYPE_L
2361 +#define _D _CTYPE_D
2362 +#define _S _CTYPE_S
2363 +#define _P _CTYPE_P
2364 +#define _C _CTYPE_C
2365 +#define _X _CTYPE_X
2366 +#define _B _CTYPE_B
2367 +#define _N _CTYPE_D
2370 // NB: Offsets into ctype<char>::_M_table force a particular size
2371 // on the mask type. Because of this, we don't use an enum.
2373 --- libstdc++-v3/src/c++11/futex.cc.orig
2374 +++ libstdc++-v3/src/c++11/futex.cc
2376 #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1
2380 +#include <sys/syscall.h>
2382 #include <syscall.h>
2385 #include <sys/time.h>
2387 --- libstdc++-v3/include/bits/c++config.orig
2388 +++ libstdc++-v3/include/bits/c++config
2390 #ifndef _GLIBCXX_CXX_CONFIG_H
2391 #define _GLIBCXX_CXX_CONFIG_H 1
2396 +#define _GTHROW throw()
2399 // The major release number for the GCC release the C++ library belongs to.
2400 #define _GLIBCXX_RELEASE
2402 --- libstdc++-v3/include/c_global/cstdio.orig
2403 +++ libstdc++-v3/include/c_global/cstdio
2404 @@ -159,16 +159,16 @@
2405 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2407 (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...)
2411 (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list);
2412 extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list);
2414 (vsnprintf)(char * __restrict, std::size_t, const char * __restrict,
2415 - __gnuc_va_list) throw ();
2416 + __gnuc_va_list) _GTHROW;
2418 (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list)
2423 #if !_GLIBCXX_USE_C99_DYNAMIC
2424 --- libstdc++-v3/include/c_global/cstdlib.orig
2425 +++ libstdc++-v3/include/c_global/cstdlib
2430 - extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
2431 - extern "C" int atexit(void (*)(void)) throw ();
2432 - extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
2433 + extern "C" void abort(void) _GTHROW _GLIBCXX_NORETURN;
2434 + extern "C" int atexit(void (*)(void)) _GTHROW;
2435 + extern "C" void exit(int) _GTHROW _GLIBCXX_NORETURN;
2436 #if __cplusplus >= 201103L
2437 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
2438 - extern "C" int at_quick_exit(void (*)(void)) throw ();
2439 + extern "C" int at_quick_exit(void (*)(void)) _GTHROW;
2441 # ifdef _GLIBCXX_HAVE_QUICK_EXIT
2442 - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
2443 + extern "C" void quick_exit(int) _GTHROW _GLIBCXX_NORETURN;
2450 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2451 - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
2452 + extern "C" void (_Exit)(int) _GTHROW _GLIBCXX_NORETURN;
2454 #if !_GLIBCXX_USE_C99_DYNAMIC
2456 @@ -217,11 +217,11 @@
2459 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2460 - extern "C" long long int (atoll)(const char *) throw ();
2461 + extern "C" long long int (atoll)(const char *) _GTHROW;
2462 extern "C" long long int
2463 - (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
2464 + (strtoll)(const char * __restrict, char ** __restrict, int) _GTHROW;
2465 extern "C" unsigned long long int
2466 - (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
2467 + (strtoull)(const char * __restrict, char ** __restrict, int) _GTHROW;
2469 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2471 --- libstdc++-v3/include/c_global/cwchar.orig
2472 +++ libstdc++-v3/include/c_global/cwchar
2473 @@ -245,16 +245,16 @@
2475 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2476 extern "C" long double
2477 - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
2478 + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) _GTHROW;
2480 #if !_GLIBCXX_USE_C99_DYNAMIC
2483 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2484 extern "C" long long int
2485 - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2486 + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2487 extern "C" unsigned long long int
2488 - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2489 + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2491 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2493 --- libstdc++-v3/include/c_std/cstdio.orig
2494 +++ libstdc++-v3/include/c_std/cstdio
2495 @@ -157,16 +157,16 @@
2496 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2498 (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...)
2502 (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list);
2503 extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list);
2505 (vsnprintf)(char * __restrict, std::size_t, const char * __restrict,
2506 - __gnuc_va_list) throw ();
2507 + __gnuc_va_list) _GTHROW;
2509 (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list)
2514 #if !_GLIBCXX_USE_C99_DYNAMIC
2515 --- libstdc++-v3/include/c_std/cstdlib.orig
2516 +++ libstdc++-v3/include/c_std/cstdlib
2521 - extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
2522 - extern "C" int atexit(void (*)(void)) throw ();
2523 - extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
2524 + extern "C" void abort(void) _GTHROW _GLIBCXX_NORETURN;
2525 + extern "C" int atexit(void (*)(void)) _GTHROW;
2526 + extern "C" void exit(int) _GTHROW _GLIBCXX_NORETURN;
2527 #if __cplusplus >= 201103L
2528 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
2529 - extern "C" int at_quick_exit(void (*)(void)) throw ();
2530 + extern "C" int at_quick_exit(void (*)(void)) _GTHROW;
2532 # ifdef _GLIBCXX_HAVE_QUICK_EXIT
2533 - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
2534 + extern "C" void quick_exit(int) _GTHROW _GLIBCXX_NORETURN;
2541 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2542 - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
2543 + extern "C" void (_Exit)(int) _GTHROW _GLIBCXX_NORETURN;
2545 #if !_GLIBCXX_USE_C99_DYNAMIC
2547 @@ -228,11 +228,11 @@
2550 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2551 - extern "C" long long int (atoll)(const char *) throw ();
2552 + extern "C" long long int (atoll)(const char *) _GTHROW;
2553 extern "C" long long int
2554 - (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
2555 + (strtoll)(const char * __restrict, char ** __restrict, int) _GTHROW;
2556 extern "C" unsigned long long int
2557 - (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
2558 + (strtoull)(const char * __restrict, char ** __restrict, int) _GTHROW;
2560 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2562 --- libstdc++-v3/include/c_std/cwchar.orig
2563 +++ libstdc++-v3/include/c_std/cwchar
2564 @@ -238,16 +238,16 @@
2566 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2567 extern "C" long double
2568 - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
2569 + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) _GTHROW;
2571 #if !_GLIBCXX_USE_C99_DYNAMIC
2574 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2575 extern "C" long long int
2576 - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2577 + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2578 extern "C" unsigned long long int
2579 - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2580 + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2582 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2586 [FILE:1612:patches/patch-diff-gcc-testsuite]
2587 --- gcc/testsuite/gcc.dg/format/ext-1.c.orig
2588 +++ gcc/testsuite/gcc.dg/format/ext-1.c
2593 -foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
2594 +foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
2595 unsigned long long int ull, int i, unsigned int u, double d,
2596 char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
2598 --- gcc/testsuite/gcc.dg/format/ext-2.c.orig
2599 +++ gcc/testsuite/gcc.dg/format/ext-2.c
2604 -foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
2605 +foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
2606 unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
2607 int *ip, unsigned int *up)
2609 --- gcc/testsuite/gcc.dg/format/format.h.orig
2610 +++ gcc/testsuite/gcc.dg/format/format.h
2614 /* %q formats want a "quad"; GCC considers this to be a long long. */
2615 -typedef llong quad_t;
2616 -typedef ullong u_quad_t;
2617 +typedef llong quad2_t;
2618 +typedef ullong u_quad2_t;
2620 __extension__ typedef __INTMAX_TYPE__ intmax_t;
2621 __extension__ typedef __UINTMAX_TYPE__ uintmax_t;
2622 --- gcc/testsuite/gcc.dg/pch/pch.exp.orig
2623 +++ gcc/testsuite/gcc.dg/pch/pch.exp
2625 set test "largefile.c"
2626 set testh "largefile.hs"
2627 set f [open $test w]
2628 +puts $f "/* { dg-do run { target *-*-solaris* } } */"
2629 +puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
2630 puts $f "/* { dg-timeout-factor 4.0 } */"
2632 for { set v 0 } { $v < 10000 } { incr v } {