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.3.0
14 SITES[iconv]= GNU/libiconv
16 SITES[mpfr]= http://www.mpfr.org/mpfr-3.1.4/
17 DISTFILE[1]= gcc-9.3.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 BUILD_DEPENDS= Zstandard:static:standard
34 USES= gmake libtool perl:build
38 CC= {{BSPREFIX}}/bin/{{TGTSYS}}-gcc
39 CPP= {{BSPREFIX}}/bin/{{TGTSYS}}-cpp
40 CXX= {{BSPREFIX}}/bin/{{TGTSYS}}-c++
43 CONFIGURE_OUTSOURCE= yes
44 CONFIGURE_ARGS= --enable-languages="c,c++,ada"
45 --prefix={{LOCALBASE}}/toolchain/gcc9
47 --enable-threads=posix
48 --enable-checking=release
52 --disable-libsanitizer
56 --with-pkgversion="Ravenports"
58 CONFIGURE_ENV= build_configargs="CPPFLAGS=\"{{CPPFLAGS}}\""
59 host_configargs="CPPFLAGS=\"{{CPPFLAGS}}\""
61 INSTALL_TARGET= install-strip
62 PLIST_SUB= TGTSYS={{TGTSYS}}
64 [FARM64_R11].DESCRIPTION= Build native compiler for FreeBSD/ARM64 Release 11
65 [FARM64_R11].BUILD_DEPENDS_ON= gnatcross:single:FARM64_R11
66 [FARM64_R11].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
67 --host=aarch64-raven-freebsd11.3
68 --target=aarch64-raven-freebsd11.3
69 --disable-libstdcxx-pch
70 [FARM64_R11].MAKEFILE_ON= TGTSYS=aarch64-raven-freebsd11.3
71 BSPREFIX={{LOCALBASE}}/FreeBSD11_ARM64
72 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
74 [SOL10].DESCRIPTION= Build native compiler for Solaris 10
75 [SOL10].BROKEN_ON= Doesn't get pass configure
76 [SOL10].BUILD_DEPENDS_ON= gnatcross:single:SOL10
77 [SOL10].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
78 --host=x86_64-raven-solaris2.10
79 --target=x86_64-raven-solaris2.10
80 --disable-libstdcxx-pch
84 --with-ld={{LOCALBASE}}/toolchain/bin/ld
85 --with-as={{LOCALBASE}}/toolchain/bin/as
86 [SOL10].MAKEFILE_ON= TGTSYS=x86_64-raven-solaris2.10
87 BSPREFIX={{LOCALBASE}}/Solaris10_AMD64
88 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
89 [SOL10].MAKE_ENV_ON= ac_cv_header_sys_sysctl_h=no
90 ac_cv_header_alloca_h=no
91 ac_cv_header_stdio_ext_h=no
92 ac_cv_header_malloc_h=no
93 ac_cv_func_clearerr_unlocked=no
94 ac_cv_func_feof_unlocked=no
95 ac_cv_func_ferror_unlocked=no
96 ac_cv_func_fileno_unlocked=no
97 ac_cv_func_asprintf=no
98 ac_cv_func_vasprintf=no
100 ac_cv_func_strnlen=no
101 ac_cv_func_madvise=no
103 [FI386_R12].DESCRIPTION= Build native compiler for FreeBSD/I386 Release 12
104 [FI386_R12].BUILD_DEPENDS_ON= gnatcross:single:FI386_R12
105 [FI386_R12].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
106 --host=i386-raven-freebsd12.2
107 --target=i386-raven-freebsd12.2
108 --disable-libstdcxx-pch
109 [FI386_R12].MAKEFILE_ON= TGTSYS=i386-raven-freebsd12.2
110 BSPREFIX={{LOCALBASE}}/FreeBSD12_I386
111 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
113 [DISABLE].DESCRIPTION= Disable building of native compiler (default)
114 [DISABLE].BROKEN_ON= Native compiler building disabled (set option!)
116 [FAMD64_R12].DESCRIPTION= Build native compiler for FreeBSD/AMD64 Release 12
117 [FAMD64_R12].BUILD_DEPENDS_ON= gnatcross:single:FAMD64_R12
118 [FAMD64_R12].CONFIGURE_ARGS_ON= --build={{CONFIGURE_TARGET}}
119 --host=x86_64-raven-freebsd12.2
120 --target=x86_64-raven-freebsd12.2
121 --disable-libstdcxx-pch
122 [FAMD64_R12].MAKEFILE_ON= TGTSYS=x86_64-raven-freebsd12.2
123 BSPREFIX={{LOCALBASE}}/FreeBSD12_AMD64
124 PREPEND_PATH={{BSPREFIX}}/{{TGTSYS}}/bin:{{BSPREFIX}}/bin
127 # Update LINK_SPEC to add gcc-aux lib runpath in every binary
128 @${ECHO} "Configuring LINK_SPEC runpath"
129 ${REINPLACE_CMD} -e 's;\@PREFIX\@;${PREFIX:H};' \
130 -e 's;\@GCCAUX\@;${NAMEBASE};' \
131 -e 's;\@LOCALBASE\@;${LOCALBASE};g' \
132 ${WRKSRC}/gcc/gcc.c \
133 ${WRKSRC}/gcc/config/darwin.h \
134 ${WRKSRC}/gcc/config/dragonfly.h \
135 ${WRKSRC}/gcc/config/sol2.h \
136 ${WRKSRC}/gcc/config/i386/freebsd64.h \
137 ${WRKSRC}/gcc/config/i386/freebsd.h \
138 ${WRKSRC}/gcc/config/i386/gnu-user64.h \
139 ${WRKSRC}/gcc/config/aarch64/aarch64-freebsd.h \
140 ${WRKSRC}/gcc/ada/gnatls.adb
141 # fix FreeBSD spec error
142 ${REINPLACE_CMD} -e 's|static:crtbeginT.o%s;||' \
143 ${WRKSRC}/gcc/config/freebsd-spec.h
146 # package bootstrap compiler with zstd, then relocate files to avoid packaging them
147 ${MKDIR} ${WRKDIR}/bootstrap_compiler
148 (cd ${STAGEDIR}${PREFIX}/toolchain/gcc9 \
149 && ${CP} -a bin ${WRKDIR}/bootstrap_compiler \
150 && ${CP} -a lib ${WRKDIR}/bootstrap_compiler \
151 && ${CP} -a include ${WRKDIR}/bootstrap_compiler \
152 && ${CP} -a libexec ${WRKDIR}/bootstrap_compiler)
153 ${ECHO_CMD} "Relocate directories to: ${PREFIX}/toolchain/gcc9" \
154 >> ${WRKDIR}/bootstrap_compiler/README
155 ${RM} ${WRKDIR}/bootstrap_compiler/bin/${TGTSYS}*
156 ${MV} ${STAGEDIR} ${STAGEDIR}.old
157 ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/${NAMEBASE}
158 (cd ${WRKDIR} && ${TAR} -cf \
159 ${STAGEDIR}${LOCALBASE}/share/${NAMEBASE}/${TGTSYS}-gcc.tar \
161 (cd ${STAGEDIR}${LOCALBASE}/share/${NAMEBASE} && \
162 zstd -7 --no-progress --rm ${TGTSYS}-gcc.tar)
164 post-patch-FI386_R12-ON:
165 # work around malloc detection issue
166 ${REINPLACE_CMD} -e 's/#undef HAVE_ALIGNED_ALLOC/#define HAVE_ALIGNED_ALLOC 1/' \
167 ${WRKSRC}/libstdc++-v3/config.h.in
170 cp ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/gcc ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/cc
171 cp ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/g++ ${STAGEDIR}${PREFIX}/toolchain/gcc9/bin/CC
172 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.3.0/adalib/libgnarl.so
173 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.3.0/adalib/libgnat.so
175 post-install-FARM64_R11-ON:
176 ${RM} -r ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.3.0/include-fixed
179 ${MKDIR} ${WRKSRC}/libiconv
180 ${MV} ${WRKDIR}/gmp-* ${WRKSRC}/gmp
181 ${MV} ${WRKDIR}/mpc-* ${WRKSRC}/mpc
182 ${MV} ${WRKDIR}/mpfr-* ${WRKSRC}/mpfr
183 ${MV} ${WRKDIR}/libiconv-* ${WRKSRC}/libiconv
185 post-patch-FARM64_R11-ON:
186 # work around malloc detection issue
187 ${REINPLACE_CMD} -e 's/#undef HAVE_ALIGNED_ALLOC/#define HAVE_ALIGNED_ALLOC 1/' \
188 ${WRKSRC}/libstdc++-v3/config.h.in
190 post-install-FI386_R12-ON:
191 ${RM} -r ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.3.0/include-fixed
193 post-install-FAMD64_R12-ON:
194 ${RM} -r ${STAGEDIR}${PREFIX}/toolchain/gcc9/lib/gcc/${TGTSYS}/9.3.0/include-fixed
196 post-patch-FAMD64_R12-ON:
197 # work around malloc detection issue
198 ${REINPLACE_CMD} -e 's/#undef HAVE_ALIGNED_ALLOC/#define HAVE_ALIGNED_ALLOC 1/' \
199 ${WRKSRC}/libstdc++-v3/config.h.in
200 ${REINPLACE_CMD} -e '/<malloc.h>/d' ${WRKSRC}/libiberty/hashtab.c
202 [FILE:141:descriptions/desc.single]
203 This package contains a native compiler bootstrapped by a gnatcross
204 cross-compiler. The target system is determined by the set port option.
208 71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1 70533868 gcc-9.3.0.tar.xz
209 761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5 1122152 mpfr-3.1.4.tar.xz
210 68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989 1950316 gmp-6.1.0.tar.xz
211 617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 669925 mpc-1.0.3.tar.gz
212 ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 5264188 libiconv-1.15.tar.gz
215 [FILE:49:manifests/plist.single]
216 share/gnatcross-bootstrap/%%TGTSYS%%-gcc.tar.zst
219 [FILE:43251:patches/patch-diff-ada]
220 --- gcc/ada/Makefile.rtl.orig
221 +++ gcc/ada/Makefile.rtl
222 @@ -1377,6 +1377,7 @@
223 s-linux.ads<libgnarl/s-linux__android.ads \
224 s-osinte.adb<libgnarl/s-osinte__android.adb \
225 s-osinte.ads<libgnarl/s-osinte__android.ads \
226 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
227 s-osprim.adb<libgnat/s-osprim__posix.adb \
228 s-taprop.adb<libgnarl/s-taprop__posix.adb \
229 s-taspri.ads<libgnarl/s-taspri__posix.ads \
230 @@ -1470,6 +1471,7 @@
231 s-osinte.adb<libgnarl/s-osinte__solaris.adb \
232 s-osinte.ads<libgnarl/s-osinte__solaris.ads \
233 s-osprim.adb<libgnat/s-osprim__solaris.adb \
234 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
235 s-taprop.adb<libgnarl/s-taprop__solaris.adb \
236 s-tasinf.adb<libgnarl/s-tasinf__solaris.adb \
237 s-tasinf.ads<libgnarl/s-tasinf__solaris.ads \
238 @@ -1502,6 +1504,8 @@
239 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
242 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
243 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
244 THREADSLIB = -lposix4 -lthread
245 MISCLIB = -lposix4 -lnsl -lsocket
247 @@ -1641,6 +1645,38 @@
248 LIBRARY_VERSION := $(LIB_VERSION)
252 +ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
253 + LIBGNAT_TARGET_PAIRS = \
254 + a-intnam.ads<libgnarl/a-intnam__linux.ads \
255 + s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
256 + s-intman.adb<libgnarl/s-intman__posix.adb \
257 + s-linux.ads<libgnarl/s-linux__android.ads \
258 + s-osinte.adb<libgnarl/s-osinte__android.adb \
259 + s-osinte.ads<libgnarl/s-osinte__android.ads \
260 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
261 + s-osprim.adb<libgnat/s-osprim__posix.adb \
262 + s-taprop.adb<libgnarl/s-taprop__posix.adb \
263 + s-taspri.ads<libgnarl/s-taspri__posix.ads \
264 + s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
265 + $(ATOMICS_TARGET_PAIRS) \
266 + $(ATOMICS_BUILTINS_TARGET_PAIRS) \
267 + system.ads<libgnat/system-linux-x86.ads
269 + TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
271 + EXTRA_LIBGNAT_OBJS=
272 + EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
273 + EXTRA_GNATRTL_NONTASKING_OBJS=
278 + GNATLIB_SHARED = gnatlib-shared-dual
279 + LIBRARY_VERSION := $(LIB_VERSION)
284 ifeq ($(strip $(filter-out %aarch64 freebsd%,$(target_cpu) $(target_os))),)
285 LIBGNAT_TARGET_PAIRS = \
286 @@ -1650,7 +1686,9 @@
287 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
288 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
289 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
290 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
291 s-osprim.adb<libgnat/s-osprim__posix.adb \
292 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
293 s-taprop.adb<libgnarl/s-taprop__posix.adb \
294 s-taspri.ads<libgnarl/s-taspri__posix.ads \
295 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
296 @@ -1660,6 +1698,9 @@
298 GNATLIB_SHARED = gnatlib-shared-dual
300 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
301 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
304 THREADSLIB= -lpthread
306 @@ -1676,7 +1717,9 @@
307 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
308 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
309 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
310 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
311 s-osprim.adb<libgnat/s-osprim__posix.adb \
312 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
313 s-taprop.adb<libgnarl/s-taprop__posix.adb \
314 s-taspri.ads<libgnarl/s-taspri__posix.ads \
315 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
316 @@ -1687,6 +1730,8 @@
318 GNATLIB_SHARED = gnatlib-shared-dual
320 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
321 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
322 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
323 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
325 @@ -1706,7 +1751,9 @@
326 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
327 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
328 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
329 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
330 s-osprim.adb<libgnat/s-osprim__posix.adb \
331 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
332 s-taprop.adb<libgnarl/s-taprop__posix.adb \
333 s-taspri.ads<libgnarl/s-taspri__posix.ads \
334 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
335 @@ -1717,6 +1764,8 @@
337 GNATLIB_SHARED = gnatlib-shared-dual
339 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
340 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
341 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
342 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
344 @@ -1736,17 +1785,23 @@
345 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
346 s-osinte.adb<libgnarl/s-osinte__dragonfly.adb \
347 s-osinte.ads<libgnarl/s-osinte__dragonfly.ads \
348 + g-socthi.adb<libgnat/g-socthi__bsd.adb \
349 s-osprim.adb<libgnat/s-osprim__posix.adb \
350 + s-trasym.adb<libgnat/s-trasym__bsd.adb \
351 s-taprop.adb<libgnarl/s-taprop__posix.adb \
352 s-taspri.ads<libgnarl/s-taspri__posix.ads \
353 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
354 + $(TRASYM_DWARF_UNIX_PAIRS) \
355 $(ATOMICS_TARGET_PAIRS) \
356 $(X86_64_TARGET_PAIRS) \
357 system.ads<libgnat/system-dragonfly-x86_64.ads
359 GNATLIB_SHARED = gnatlib-shared-dual
361 - EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
362 + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
363 + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
364 + EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
365 + EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
368 THREADSLIB= -lpthread
369 --- gcc/ada/adaint.c.orig
371 @@ -1190,6 +1190,47 @@
375 +#elif defined (__ANDROID__)
378 + * ext2 /ext3/ext4/fat16/fat32 have no path limits
379 + * /data/local/tmp normally requires rooted devices, if it even exists
380 + * /sdcard is the standard location for external storage. Nativeactivity
381 + * manifest needs to authorize its use, otherwise it might not have the
382 + * proper permissions.
386 + char *datadir = getenv ("ANDROID_DATA");
388 + if (datadir == NULL)
389 + strncpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX", L_tmpnam);
391 + snprintf (tmp_filename, L_tmpnam, "%s/local/tmp/gnat-XXXXXX", datadir);
393 + testfd = mkstemp (tmp_filename);
400 + char *sdcard = getenv ("EXTERNAL_STORAGE");
402 + if (sdcard == NULL)
403 + strncpy (tmp_filename, "/sdcard/gnat-XXXXXX", L_tmpnam);
405 + snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", sdcard);
407 + testfd = mkstemp (tmp_filename);
414 + tmpnam (tmp_filename);
416 #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
417 || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
418 || defined (__DragonFly__) || defined (__QNX__)
419 --- gcc/ada/cio.c.orig
423 /* Don't use macros on GNU/Linux since they cause incompatible changes between
426 +#if defined __linux__ && !defined __ANDROID__
430 --- gcc/ada/cstreams.c.orig
431 +++ gcc/ada/cstreams.c
437 +#if defined __linux__ && !defined __ANDROID__
438 /* Don't use macros on GNU/Linux since they cause incompatible changes between
441 --- gcc/ada/gnatchop.adb.orig
442 +++ gcc/ada/gnatchop.adb
444 Config_File_Name : constant String_Access := new String'("gnat.adc");
445 -- The name of the file holding the GNAT configuration pragmas
447 - Gcc : String_Access := new String'("gcc");
448 + Gcc : String_Access := new String'("ada");
449 -- May be modified by switch --GCC=
451 Gcc_Set : Boolean := False;
452 --- gcc/ada/gnatlink.adb.orig
453 +++ gcc/ada/gnatlink.adb
455 -- This table collects the arguments to be passed to compile the binder
458 - Gcc : String_Access := Program_Name ("gcc", "gnatlink");
459 + Gcc : String_Access := Program_Name ("ada", "gnatlink");
461 Read_Mode : constant String := "r" & ASCII.NUL;
463 --- gcc/ada/gnatls.adb.orig
464 +++ gcc/ada/gnatls.adb
467 with Fname; use Fname;
468 with Gnatvsn; use Gnatvsn;
469 -with Make_Util; use Make_Util;
470 with Namet; use Namet;
472 with Osint; use Osint;
473 @@ -1285,31 +1284,10 @@
474 -- The path name(s) of directories where project files may reside.
477 - Prefix : String_Ptr;
478 - Runtime : String_Ptr;
480 - procedure Add_Target (Suffix : String);
481 - -- Add :<prefix>/<target>/Suffix to the project path
483 FD : File_Descriptor;
490 - procedure Add_Target (Suffix : String) is
491 - Extra_Sep : constant String :=
492 - (if Target_Name (Target_Name'Last) = '/' then
495 - (1 => Directory_Separator));
496 - -- Note: Target_Name has a trailing / when it comes from Sdefault
499 - Add_Str_To_Name_Buffer
500 - (Path_Separator & Prefix.all & Target_Name & Extra_Sep & Suffix);
502 + pragma Unreferenced (Runtime_Name);
504 -- Start of processing for Initialize_Default_Project_Path
506 @@ -1493,81 +1471,15 @@
507 -- Set the initial value of Current_Project_Path
509 if Add_Default_Dir then
510 - if Sdefault.Search_Dir_Prefix = null then
514 - Prefix := new String'(Executable_Prefix_Path);
517 - Prefix := new String'(Sdefault.Search_Dir_Prefix.all
518 - & ".." & Dir_Separator
519 - & ".." & Dir_Separator
520 - & ".." & Dir_Separator
521 - & ".." & Dir_Separator);
524 - if Prefix.all /= "" then
525 - if Target_Name /= "" then
527 - if Runtime_Name /= "" then
528 - if Base_Name (Runtime_Name) = Runtime_Name then
530 - -- $prefix/$target/$runtime/lib/gnat
533 - (Runtime_Name & Directory_Separator &
534 - "lib" & Directory_Separator & "gnat");
536 - -- $prefix/$target/$runtime/share/gpr
539 - (Runtime_Name & Directory_Separator &
540 - "share" & Directory_Separator & "gpr");
544 - new String'(Normalize_Pathname (Runtime_Name));
546 - -- $runtime_dir/lib/gnat
548 - Add_Str_To_Name_Buffer
549 - (Path_Separator & Runtime.all & Directory_Separator &
550 - "lib" & Directory_Separator & "gnat");
552 - -- $runtime_dir/share/gpr
554 - Add_Str_To_Name_Buffer
555 - (Path_Separator & Runtime.all & Directory_Separator &
556 - "share" & Directory_Separator & "gpr");
560 - -- $prefix/$target/lib/gnat
563 - ("lib" & Directory_Separator & "gnat");
565 - -- $prefix/$target/share/gpr
568 - ("share" & Directory_Separator & "gpr");
571 - -- $prefix/share/gpr
573 - Add_Str_To_Name_Buffer
574 - (Path_Separator & Prefix.all & "share"
575 - & Directory_Separator & "gpr");
577 - -- $prefix/lib/gnat
579 - Add_Str_To_Name_Buffer
580 - (Path_Separator & Prefix.all & "lib"
581 - & Directory_Separator & "gnat");
583 + -- /raven/share/gpr
584 + Add_Str_To_Name_Buffer (Path_Separator &
585 + "@LOCALBASE@/share/gpr");
588 + Add_Str_To_Name_Buffer (Path_Separator &
589 + "@LOCALBASE@/lib/gnat");
594 Self := new String'(Name_Buffer (1 .. Name_Len));
595 --- gcc/ada/make.adb.orig
598 -- Compiler, Binder & Linker Data and Subprograms --
599 ----------------------------------------------------
601 - Gcc : String_Access := Program_Name ("gcc", "gnatmake");
602 + Gcc : String_Access := Program_Name ("ada", "gnatmake");
603 Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
604 Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
605 -- Default compiler, binder, linker programs
606 --- gcc/ada/terminals.c.orig
607 +++ gcc/ada/terminals.c
609 /* First all usupported platforms. Add stubs for exported routines. */
611 #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \
612 - || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__)
613 + || defined (__PikeOS__) || defined(__DJGPP__)
616 __gnat_new_tty (void)
617 @@ -1099,7 +1099,7 @@
618 || defined (__OpenBSD__) \
619 || defined (__NetBSD__) \
620 || defined (__DragonFly__)
625 /* Include every system header we need */
626 @@ -1115,21 +1115,25 @@
627 #include <sys/types.h>
628 #include <sys/wait.h>
630 -#if defined (__sun__)
632 # include <sys/stropts.h>
634 -#if defined (BSD) || defined (__sun__)
635 +#if defined (FREEBSD) || defined (sun)
636 # include <sys/signal.h>
638 #if defined (__hpux__)
639 # include <sys/stropts.h>
643 +#define CDISABLE _PC_VDISABLE
645 #define CDISABLE _POSIX_VDISABLE
648 /* On HP-UX and Sun system, there is a bzero function but with a different
649 signature. Use memset instead */
650 -#if defined (__hpux__) || defined (__sun__) || defined (_AIX)
651 +#if defined (__hpux__) || defined (sun) || defined (_AIX)
652 # define bzero(s,n) memset (s,0,n)
655 @@ -1147,11 +1151,11 @@
658 /* Configurable part */
659 -#if defined (__APPLE__) || defined (BSD)
660 +#if defined (__APPLE__) || defined (FREEBSD)
662 -#elif defined (__linux__)
663 +#elif defined (linux)
665 -#elif defined (__sun__)
667 #define USE_CLONE_DEVICE "/dev/ptmx"
669 #define USE_CLONE_DEVICE "/dev/ptc"
670 @@ -1437,7 +1441,7 @@
671 desc->slave_fd = open (desc->slave_name, O_RDWR, 0);
674 -#if defined (__sun__) || defined (__hpux__)
675 +#if defined (sun) || defined (__hpux__)
676 /* On systems such as Solaris we are using stream. We need to push the right
677 "modules" in order to get the expected terminal behaviors. Otherwise
678 functionalities such as termios are not available. */
680 +++ gcc/ada/traceback_symbolic.c
683 + Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
684 + Ada for Linux Team (ALT)
685 + Heavily modified by John Marino <http://www.dragonlace.net>
687 + Permission is hereby granted, free of charge, to any person obtaining a
688 + copy of this software and associated documentation files (the
689 + "Software"), to deal in the Software without restriction, including
690 + without limitation the rights to use, copy, modify, merge, publish,
691 + distribute, distribute with modifications, sublicense, and/or sell
692 + copies of the Software, and to permit persons to whom the Software is
693 + furnished to do so, subject to the following conditions:
695 + The above copyright notice and this permission notice shall be included
696 + in all copies or substantial portions of the Software.
698 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
699 + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
700 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
701 + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
702 + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
703 + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
704 + THE USE OR OTHER DEALINGS IN THE SOFTWARE.
706 + Except as contained in this notice, the name(s) of the above copyright
707 + holders shall not be used in advertising or otherwise to promote the
708 + sale, use or other dealings in this Software without prior written
716 + * Running addr2line doesn't make sense for cross-compiled objects.
717 + * Create a dummy function to satisfy g-trasym.o
721 +convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
722 + void *addrs ATTRIBUTE_UNUSED,
723 + int n_addr ATTRIBUTE_UNUSED,
724 + void *buf ATTRIBUTE_UNUSED,
725 + int *len ATTRIBUTE_UNUSED)
734 + * use the external program /usr/bin/addr2line to convert addresses
735 + * into file names and line numbers
738 +#include <sys/types.h>
744 +#define CLOSE_SENDPIPE close(sendpipe[0]); close(sendpipe[1])
745 +#define CLOSE_READPIPE close(readpipe[0]); close(readpipe[1])
746 +#define DUP2CLOSE(oldfd, newfd) dup2(oldfd, newfd); close(oldfd);
747 +#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
749 +#define MAX_LINE 1024
750 +#define PARENT_READ readpipe[0]
751 +#define CHILD_WRITE readpipe[1]
752 +#define CHILD_READ sendpipe[0]
753 +#define PARENT_WRITE sendpipe[1]
755 +#if defined (__sun__)
756 +#define ADDR2LINE_PROG "/usr/gnu/bin/addr2line"
758 +#define ADDR2LINE_PROG "/usr/bin/addr2line"
762 +convert_addresses (const char *file_name,
768 + int max_len = *len;
771 + struct sigaction act, oact;
773 + int sendpipe[2] = {-1,-1}, /* parent -> child */
774 + readpipe[2] = {-1,-1}; /* parent <- child */
777 + act.sa_handler = SIG_IGN;
778 + sigemptyset(&act.sa_mask);
780 + if (sigaction(SIGPIPE,&act,&oact) < 0)
783 + if (pipe(sendpipe) < 0) { RESTSIG; return; }
784 + if (pipe(readpipe) < 0) { CLOSE_SENDPIPE; RESTSIG; return; }
785 + if ((childpid = fork()) < 0) {
792 + if (childpid == 0) { /* child process */
793 + close(PARENT_WRITE);
794 + close(PARENT_READ);
795 + if ((CHILD_READ != STDIN_FILENO) && (CHILD_WRITE != STDOUT_FILENO)) {
796 + if ((CHILD_READ == STDOUT_FILENO) && (CHILD_WRITE == STDIN_FILENO)) {
797 + const int temp_fd = dup(CHILD_WRITE);
798 + close (CHILD_WRITE);
799 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
800 + DUP2CLOSE (temp_fd, STDOUT_FILENO);
802 + else if ((CHILD_READ == STDIN_FILENO) && (CHILD_WRITE > 1)) {
803 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
805 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDOUT_FILENO)) {
806 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
808 + else if ((CHILD_READ > 1) && (CHILD_WRITE == STDIN_FILENO)) {
809 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
810 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
813 + /* CHILD_READ >= 1 and CHILD_WRITE > 1 */
814 + DUP2CLOSE (CHILD_READ, STDIN_FILENO);
815 + DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
818 + /* As pointed out by Florian Weimer to JP, it is a security threat to call
819 + the script with a user defined environment and using the path. That
820 + would be Trojans pleasure. Therefore the absolute path to addr2line
821 + and an empty environment is used. That should be safe.
823 + char *const argv[] = { "addr2line",
829 + char *const envp[] = { NULL };
830 + if (execve(ADDR2LINE_PROG, argv, envp) < 0) {
831 + close (CHILD_WRITE);
832 + close (CHILD_READ);
838 + /* Below this line is parent process */
841 + char line[MAX_LINE + 1];
844 + long *trace_address = addrs;
846 + close(CHILD_WRITE);
849 + for(i=0; i < n_addr; i++) {
850 + snprintf(hex,sizeof(hex),"%#lx\n",*trace_address);
851 + write(PARENT_WRITE,hex,strlen(hex));
852 + n = read(PARENT_READ,line,MAX_LINE);
857 + /* We have approx. 16 additional chars for "%#lx in " clause.
858 + We use this info to prevent a buffer overrun. */
859 + if (n + 16 + (*len) > max_len)
862 + p = strchr(line,'\n');
866 + *len += snprintf(s, (max_len - (*len)), "%#lx in %s at %s",
867 + *trace_address, line, p+1);
870 + *len += snprintf(s, (max_len - (*len)), "%#lx at %s",
871 + *trace_address, line);
875 + trace_address += 1;
877 + close (PARENT_WRITE);
878 + close (PARENT_READ);
884 +++ gcc/ada/libgnat/g-socthi__bsd.adb
886 +------------------------------------------------------------------------------
888 +-- GNAT COMPILER COMPONENTS --
890 +-- G N A T . S O C K E T S . T H I N --
894 +-- Copyright (C) 2001-2018, AdaCore --
896 +-- GNAT is free software; you can redistribute it and/or modify it under --
897 +-- terms of the GNU General Public License as published by the Free Soft- --
898 +-- ware Foundation; either version 3, or (at your option) any later ver- --
899 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
900 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
901 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
903 +-- As a special exception under Section 7 of GPL version 3, you are granted --
904 +-- additional permissions described in the GCC Runtime Library Exception, --
905 +-- version 3.1, as published by the Free Software Foundation. --
907 +-- You should have received a copy of the GNU General Public License and --
908 +-- a copy of the GCC Runtime Library Exception along with this program; --
909 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
910 +-- <http://www.gnu.org/licenses/>. --
912 +-- GNAT was originally developed by the GNAT team at New York University. --
913 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
915 +------------------------------------------------------------------------------
917 +-- This package provides a target dependent thin interface to the sockets
918 +-- layer for use by the GNAT.Sockets package (g-socket.ads). This package
919 +-- should not be directly with'ed by an applications program.
921 +-- This is the *BSD version which uses fcntl rather than ioctl
922 +-- The constant SCON.Thread_Blocking_IO is always true (for all platforms, not
923 +-- just *BSD), so this binding is significantly simpler than the standard
926 +with GNAT.OS_Lib; use GNAT.OS_Lib;
928 +with Interfaces.C; use Interfaces.C;
930 +package body GNAT.Sockets.Thin is
932 + function Syscall_Accept
934 + Addr : System.Address;
935 + Addrlen : not null access C.int) return C.int;
936 + pragma Import (C, Syscall_Accept, "accept");
937 + -- The accept() function accepts a connection on a socket. An incoming
938 + -- connection is acknowledged and associated with an immediately created
939 + -- socket. The original socket is returned to the listening state.
941 + function Syscall_Connect
943 + Name : System.Address;
944 + Namelen : C.int) return C.int;
945 + pragma Import (C, Syscall_Connect, "connect");
946 + -- The connect() system call initiates a connection on a socket. If the
947 + -- parameter S is of type SOCK_DGRAM then connect() permanently specifies
948 + -- the peer to which datagrams are to be sent. If S is type SOCK_STREAM
949 + -- then connect() attempts to make a connection with another socket, which
950 + -- is identified by the parameter Name.
952 + function Syscall_Recv
954 + Msg : System.Address;
956 + Flags : C.int) return C.int;
957 + pragma Import (C, Syscall_Recv, "recv");
958 + -- The recv() function receives a message from a socket. The call can be
959 + -- used on a connection mode socket or a bound, connectionless socket. If
960 + -- no messages are available at the socket, the recv() call waits for a
961 + -- message to arrive unless the socket is non-blocking. If a socket is
962 + -- non-blocking, the call returns a -1 and ERRNO is set to EWOULDBLOCK.
964 + function Syscall_Recvfrom
966 + Msg : System.Address;
969 + From : System.Address;
970 + Fromlen : not null access C.int) return C.int;
971 + pragma Import (C, Syscall_Recvfrom, "recvfrom");
972 + -- The recvfrom() system call receives a message from a socket and captures
973 + -- the address from which the data was sent. It can be used to receive
974 + -- data on an unconnected socket as well. If no messages are available,
975 + -- the call waits for a message to arrive on blocking sockets. For
976 + -- non-blocking sockets without messages, -1 is returned and ERRNO is set
977 + -- to EAGAIN or EWOULDBLOCK.
979 + function Syscall_Recvmsg
981 + Msg : System.Address;
982 + Flags : C.int) return System.CRTL.ssize_t;
983 + pragma Import (C, Syscall_Recvmsg, "recvmsg");
984 + -- The recvmsg call receives a message from a socket, and can be used to
985 + -- receive data on an unconnected socket as well. If no messages are
986 + -- available, the call waits for a message to arrive on blocking sockets.
987 + -- For non-blocking sockets without messages, -1 is returned and ERRNO is
988 + -- set to EAGAIN or EWOULDBLOCK.
990 + function Syscall_Sendmsg
992 + Msg : System.Address;
993 + Flags : C.int) return System.CRTL.ssize_t;
994 + pragma Import (C, Syscall_Sendmsg, "sendmsg");
995 + -- The sendmsg() function sends a message to a socket, and can be used with
996 + -- unconnected sockets as well (the msg is ignored in this case). The
997 + -- function returns the number of bytes sent when successful, otherwise it
998 + -- returns -1 and ERRNO is set (many possible values).
1000 + function Syscall_Sendto
1002 + Msg : System.Address;
1005 + To : System.Address;
1006 + Tolen : C.int) return C.int;
1007 + pragma Import (C, Syscall_Sendto, "sendto");
1008 + -- The sendto() function only works for connected sockets and it initiates
1009 + -- the transmission of a message. A successful call returns the numbers of
1010 + -- bytes sent, and a failure returns a -1 and ERRNO is set.
1012 + function Syscall_Socket
1015 + Protocol : C.int) return C.int;
1016 + pragma Import (C, Syscall_Socket, "socket");
1017 + -- The socket() function is used to create an unbound socket and returns a
1018 + -- file descriptor that can be used with other socket functions. Upon
1019 + -- failure, a -1 is returned and ERRNO is set.
1021 + procedure Disable_SIGPIPE (S : C.int);
1022 + pragma Import (C, Disable_SIGPIPE, "__gnat_disable_sigpipe");
1024 + procedure Disable_All_SIGPIPEs;
1025 + pragma Import (C, Disable_All_SIGPIPEs, "__gnat_disable_all_sigpipes");
1026 + -- Sets the process to ignore all SIGPIPE signals on platforms that
1027 + -- don't support Disable_SIGPIPE for particular streams.
1032 + Val : C.int) return C.int;
1033 + pragma Import (C, C_Fcntl, "fcntl");
1034 + -- The ioctl of 64-bit DragonFlyBSD, OpenBSD, and NetBSD does not support
1035 + -- setting a socket in non-blocking mode. fcntl must be used instead.
1043 + Addr : System.Address;
1044 + Addrlen : not null access C.int) return C.int
1046 + R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
1049 + Disable_SIGPIPE (R);
1057 + function C_Connect
1059 + Name : System.Address;
1060 + Namelen : C.int) return C.int
1063 + return Syscall_Connect (S, Name, Namelen);
1066 + ------------------
1067 + -- Socket_Ioctl --
1068 + ------------------
1070 + function Socket_Ioctl
1072 + Req : SOSC.IOCTL_Req_T;
1073 + Arg : access C.int) return C.int
1076 + if Req = SOSC.FIONBIO then
1079 + flags : constant Unsigned_32 :=
1080 + Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
1081 + nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.O_NDELAY);
1082 + enabled : constant Boolean := Arg.all = 1;
1083 + newval : C.int := C.int (flags);
1086 + newval := C.int (flags or nonblock);
1087 + elsif (flags and nonblock) > 0 then
1088 + newval := C.int (flags - nonblock);
1090 + return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
1094 + return C_Ioctl (S, Req, Arg);
1103 + Msg : System.Address;
1105 + Flags : C.int) return C.int
1108 + return Syscall_Recv (S, Msg, Len, Flags);
1115 + function C_Recvfrom
1117 + Msg : System.Address;
1120 + From : System.Address;
1121 + Fromlen : not null access C.int) return C.int
1124 + return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
1131 + function C_Recvmsg
1133 + Msg : System.Address;
1134 + Flags : C.int) return System.CRTL.ssize_t
1137 + return Syscall_Recvmsg (S, Msg, Flags);
1144 + function C_Sendmsg
1146 + Msg : System.Address;
1147 + Flags : C.int) return System.CRTL.ssize_t
1150 + return Syscall_Sendmsg (S, Msg, Flags);
1159 + Msg : System.Address;
1162 + To : System.Address;
1163 + Tolen : C.int) return C.int
1166 + return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
1176 + Protocol : C.int) return C.int
1178 + R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
1180 + Disable_SIGPIPE (R);
1188 + procedure Finalize is
1193 + -------------------------
1194 + -- Host_Error_Messages --
1195 + -------------------------
1197 + package body Host_Error_Messages is separate;
1203 + procedure Initialize is
1205 + Disable_All_SIGPIPEs;
1208 + --------------------
1209 + -- Signalling_Fds --
1210 + --------------------
1212 + package body Signalling_Fds is
1214 + -- In this default implementation, we use a C version of these
1215 + -- subprograms provided by socket.c.
1217 + function C_Create (Fds : not null access Fd_Pair) return C.int;
1218 + function C_Read (Rsig : C.int) return C.int;
1219 + function C_Write (Wsig : C.int) return C.int;
1220 + procedure C_Close (Sig : C.int);
1222 + pragma Import (C, C_Create, "__gnat_create_signalling_fds");
1223 + pragma Import (C, C_Read, "__gnat_read_signalling_fd");
1224 + pragma Import (C, C_Write, "__gnat_write_signalling_fd");
1225 + pragma Import (C, C_Close, "__gnat_close_signalling_fd");
1228 + (Fds : not null access Fd_Pair) return C.int renames C_Create;
1229 + function Read (Rsig : C.int) return C.int renames C_Read;
1230 + function Write (Wsig : C.int) return C.int renames C_Write;
1231 + procedure Close (Sig : C.int) renames C_Close;
1233 + end Signalling_Fds;
1235 + --------------------------
1236 + -- Socket_Error_Message --
1237 + --------------------------
1239 + function Socket_Error_Message (Errno : Integer) return String is separate;
1241 +end GNAT.Sockets.Thin;
1243 +++ gcc/ada/libgnat/s-trasym__bsd.adb
1245 +------------------------------------------------------------------------------
1247 +-- GNAT RUN-TIME COMPONENTS --
1249 +-- S Y S T E M . T R A C E B A C K . S Y M B O L I C --
1253 +-- Copyright (C) 1999-2018, AdaCore --
1255 +-- GNAT is free software; you can redistribute it and/or modify it under --
1256 +-- terms of the GNU General Public License as published by the Free Soft- --
1257 +-- ware Foundation; either version 3, or (at your option) any later ver- --
1258 +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
1259 +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
1260 +-- or FITNESS FOR A PARTICULAR PURPOSE. --
1262 +-- As a special exception under Section 7 of GPL version 3, you are granted --
1263 +-- additional permissions described in the GCC Runtime Library Exception, --
1264 +-- version 3.1, as published by the Free Software Foundation. --
1266 +-- You should have received a copy of the GNU General Public License and --
1267 +-- a copy of the GCC Runtime Library Exception along with this program; --
1268 +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
1269 +-- <http://www.gnu.org/licenses/>. --
1271 +-- GNAT was originally developed by the GNAT team at New York University. --
1272 +-- Extensive contributions were provided by Ada Core Technologies Inc. --
1274 +------------------------------------------------------------------------------
1276 +-- Run-time symbolic traceback support
1277 +-- This file is based on the work by Juergen Pfiefer which is still used
1278 +-- today to provide symbolic traceback support for gnu/kFreeBSD.
1279 +-- Incorporated in GNAT-AUX by John Marino <http://www.dragonlace.net>
1281 +pragma Polling (Off);
1282 +-- We must turn polling off for this unit, because otherwise we can get
1283 +-- elaboration circularities when polling is turned on.
1285 +with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
1286 +with System.Soft_Links;
1288 +package body System.Traceback.Symbolic is
1290 + -- Note that Suppress_Hex is ignored in this version of this package.
1292 + package TSL renames System.Soft_Links;
1294 + -- To perform the raw addresses to symbolic form translation we rely on a
1295 + -- libaddr2line symbolizer which examines debug info from a provided
1296 + -- executable file name, and an absolute path is needed to ensure the file
1297 + -- is always found. This is "__gnat_locate_exec_on_path (gnat_argv [0])"
1298 + -- for our executable file, a fairly heavy operation so we cache the
1301 + Exename : System.Address;
1302 + -- Pointer to the name of the executable file to be used on all
1303 + -- invocations of the libaddr2line symbolization service.
1305 + Exename_Resolved : Boolean := False;
1306 + -- Flag to indicate whether we have performed the executable file name
1307 + -- resolution already. Relying on a not null Exename for this purpose
1308 + -- would be potentially inefficient as this is what we will get if the
1309 + -- resolution attempt fails.
1311 + ------------------------
1312 + -- Symbolic_Traceback --
1313 + ------------------------
1315 + function Symbolic_Traceback
1316 + (Traceback : System.Traceback_Entries.Tracebacks_Array) return String
1318 + procedure convert_addresses
1319 + (filename : System.Address;
1320 + addrs : System.Address;
1321 + n_addrs : Integer;
1322 + buf : System.Address;
1323 + len : System.Address);
1324 + pragma Import (C, convert_addresses, "convert_addresses");
1325 + -- This is the procedure version of the Ada-aware addr2line. It places
1326 + -- in BUF a string representing the symbolic translation of the N_ADDRS
1327 + -- raw addresses provided in ADDRS, looked up in debug information from
1328 + -- FILENAME. LEN points to an integer which contains the size of the
1329 + -- BUF buffer at input and the result length at output.
1331 + -- Note that this procedure is *not* thread-safe.
1333 + type Argv_Array is array (0 .. 0) of System.Address;
1334 + gnat_argv : access Argv_Array;
1335 + pragma Import (C, gnat_argv, "gnat_argv");
1337 + function locate_exec_on_path
1338 + (c_exename : System.Address) return System.Address;
1339 + pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
1341 + B_Size : constant Integer := 256 * Traceback'Length;
1342 + Len : Integer := B_Size;
1343 + Res : String (1 .. B_Size);
1346 + if Traceback'Length = 0 then
1350 + -- If our input set of raw addresses is not empty, resort to the
1351 + -- libaddr2line service to symbolize it all.
1353 + -- Compute, cache and provide the absolute path to our executable file
1354 + -- name as the binary file where the relevant debug information is to be
1355 + -- found. If the executable file name resolution fails, we have no
1356 + -- sensible basis to invoke the symbolizer at all.
1358 + -- Protect all this against concurrent accesses explicitly, as the
1359 + -- underlying services are potentially thread unsafe.
1361 + TSL.Lock_Task.all;
1363 + if not Exename_Resolved then
1364 + Exename := locate_exec_on_path (gnat_argv (0));
1365 + Exename_Resolved := True;
1368 + if Exename /= System.Null_Address then
1369 + Len := Res'Length;
1371 + (Exename, Traceback'Address, Traceback'Length,
1372 + Res (1)'Address, Len'Address);
1375 + TSL.Unlock_Task.all;
1377 + -- Return what the addr2line symbolizer has produced if we have called
1378 + -- it (the executable name resolution succeeded), or an empty string
1381 + if Exename /= System.Null_Address then
1382 + return Res (1 .. Len);
1386 + end Symbolic_Traceback;
1388 + -- "No_Hex" is ignored in this version, because otherwise we have nothing
1389 + -- at all to print.
1391 + function Symbolic_Traceback_No_Hex
1392 + (Traceback : System.Traceback_Entries.Tracebacks_Array) return String is
1394 + return Symbolic_Traceback (Traceback);
1395 + end Symbolic_Traceback_No_Hex;
1397 + function Symbolic_Traceback
1398 + (E : Ada.Exceptions.Exception_Occurrence) return String
1401 + return Symbolic_Traceback (Tracebacks (E));
1402 + end Symbolic_Traceback;
1404 + function Symbolic_Traceback_No_Hex
1405 + (E : Ada.Exceptions.Exception_Occurrence) return String is
1407 + return Symbolic_Traceback (E);
1408 + end Symbolic_Traceback_No_Hex;
1410 + ------------------
1411 + -- Enable_Cache --
1412 + ------------------
1414 + procedure Enable_Cache (Include_Modules : Boolean := False) is
1419 +end System.Traceback.Symbolic;
1420 --- gcc/ada/gcc-interface/Make-lang.in.orig
1421 +++ gcc/ada/gcc-interface/Make-lang.in
1425 # Language-independent object files.
1426 -ADA_BACKEND = $(BACKEND) attribs.o
1427 +ADA_BACKEND = $(BACKEND2) attribs.o
1429 # List of target dependent sources, overridden below as necessary
1431 --- gcc/ada/init.c.orig
1433 @@ -2643,8 +2643,15 @@
1435 mcontext_t *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
1437 +#if defined (__i386__)
1438 + unsigned long *pc = (unsigned long *)mcontext->gregs[REG_EIP];
1439 + /* The pattern is "orl $0x0,(%esp)" for a probe in 32-bit mode. */
1440 + if (signo == SIGSEGV && pc && *pc == 0x00240c83)
1441 + mcontext->gregs[REG_ESP] += 4096 + 4 * sizeof (unsigned long);
1442 +#elif defined (__ARMEL__)
1443 /* ARM Bump has to be an even number because of odd/even architecture. */
1444 - ((mcontext_t *) mcontext)->arm_pc += 2;
1445 + mcontext->arm_pc += 2;
1450 --- gcc/ada/libgnat/g-socthi.ads.orig
1451 +++ gcc/ada/libgnat/g-socthi.ads
1454 package C renames Interfaces.C;
1456 - use type System.CRTL.ssize_t;
1458 function Socket_Errno return Integer renames GNAT.OS_Lib.Errno;
1459 -- Returns last socket error number
1463 [FILE:19397:patches/patch-diff-ada-testsuite]
1464 --- gcc/testsuite/ada/acats/run_acats.sh.orig
1465 +++ gcc/testsuite/ada/acats/run_acats.sh
1470 -# Provide which replacement.
1472 -# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
1473 -# ksh93 and bash have it.
1474 -# type output format differs between ksh88 and ksh93, so avoid it if
1475 -# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
1476 -# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
1479 - path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
1480 - path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
1481 - path=`whence $* 2>/dev/null` && { echo $path; return 0; }
1485 # Set up environment to use the Ada compiler from the object tree
1487 --- gcc/testsuite/ada/acats/run_all.sh.orig
1488 +++ gcc/testsuite/ada/acats/run_all.sh
1491 # End of customization section.
1493 -# Perform arithmetic evaluation on the ARGs, and store the result in the
1494 -# global $as_val. Take advantage of shells that can avoid forks. The arguments
1495 -# must be portable across $(()) and expr.
1496 -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
1497 - eval 'as_fn_arith ()
1504 - as_val=`expr "$@" || test $? -eq 1`
1510 printf "$@" >> $dir/acats.sum
1512 echo "$@" >> $dir/acats.log
1516 + printf "%04d %7s" $1 $2
1525 if [ "$dir" = "$testdir" ]; then
1527 gnatls -v >> $dir/acats.log
1530 -if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
1531 - dir_support=$dir/../acats/support
1534 - mv $dir/tests $dir/tests.$$ 2> /dev/null
1535 - rm -rf $dir/tests.$$ &
1538 - cp -pr $dir/../acats/tests $dir/
1540 - dir_support=$dir/support
1542 display " === acats support ==="
1543 display_noeol "Generating support files..."
1552 display " === acats tests ==="
1554 if [ $# -eq 0 ]; then
1555 @@ -228,14 +206,20 @@
1564 for chapter in $chapters; do
1565 - # Used to generate support once and finish after that.
1566 - [ "$chapter" = "NONE" ] && continue
1567 + if [ -d $dir/tests/$chapter ]; then
1568 + cd $dir/tests/$chapter
1569 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
1570 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
1571 + > $dir/tests/$chapter/${chapter}.lst
1572 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1573 + countdown=`expr $countdown + $countn`
1577 +for chapter in $chapters; do
1578 display Running chapter $chapter ...
1580 if [ ! -d $dir/tests/$chapter ]; then
1581 @@ -244,45 +228,11 @@
1585 - cd $dir/tests/$chapter
1586 - ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
1587 - cut -c1-7 | sort | uniq | comm -23 - $dir_support/norun.lst \
1588 - > $dir/tests/$chapter/${chapter}.lst
1589 countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1590 - as_fn_arith $glob_countn + $countn
1591 - glob_countn=$as_val
1592 + glob_countn=`expr $glob_countn + $countn`
1594 for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
1596 - # If running multiple run_all.sh jobs in parallel, decide
1597 - # if we should run this test in the current instance.
1598 - if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ]; then
1600 - # Ugh, some tests have inter-test dependencies, those
1601 - # tests have to be scheduled on the same parallel instance
1602 - # as previous test.
1603 - ce2108f | ce2108h | ce3112d) ;;
1604 - # All others can be hopefully scheduled freely.
1606 - as_fn_arith $par_countm + 1
1607 - par_countm=$as_val
1608 - [ $par_countm -eq 10 ] && par_countm=0
1609 - if [ $par_countm -eq 1 ]; then
1610 - as_fn_arith $par_count + 1
1612 - if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
1619 - if [ -z "$par_last" ]; then
1620 - as_fn_arith $glob_countn - 1
1621 - glob_countn=$as_val
1626 + counti=`expr $counti + 1`
1627 extraflags="-gnat95"
1628 grep $i $testdir/overflow.lst > /dev/null 2>&1
1629 if [ $? -eq 0 ]; then
1630 @@ -300,10 +250,13 @@
1631 if [ $? -eq 0 ]; then
1632 extraflags="$extraflags -fstack-check"
1634 + inform $countdown $i
1635 + countdown=`expr $countdown - 1`
1636 test=$dir/tests/$chapter/$i
1637 mkdir $test && cd $test >> $dir/acats.log 2>&1
1639 if [ $? -ne 0 ]; then
1642 failed="${failed}${i} "
1644 @@ -321,19 +274,22 @@
1645 echo "BUILD $main" >> $dir/acats.log
1648 - cxb30*) EXTERNAL_OBJECTS="$dir_support/cxb30040.o $dir_support/cxb30060.o $dir_support/cxb30130.o $dir_support/cxb30131.o";;
1649 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
1650 ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
1651 ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
1652 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
1654 if [ "$main" = "" ]; then
1657 failed="${failed}${i} "
1662 - target_gnatmake $extraflags -I$dir_support $main >> $dir/acats.log 2>&1
1663 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
1664 if [ $? -ne 0 ]; then
1667 failed="${failed}${i} "
1670 target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
1671 cd $dir/tests/$chapter/$i
1672 cat ${i}.log >> $dir/acats.log
1674 egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
1675 if [ $? -ne 0 ]; then
1676 grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
1677 @@ -357,15 +314,12 @@
1678 failed="${failed}${i} "
1680 log "UNSUPPORTED: $i"
1681 - as_fn_arith $glob_countn - 1
1682 - glob_countn=$as_val
1683 - as_fn_arith $glob_countu + 1
1684 - glob_countu=$as_val
1685 + glob_countn=`expr $glob_countn - 1`
1686 + glob_countu=`expr $glob_countu + 1`
1690 - as_fn_arith $glob_countok + 1
1691 - glob_countok=$as_val
1692 + glob_countok=`expr $glob_countok + 1`
1697 +++ gcc/testsuite/ada/acats/run_remote.sh
1700 +# Run ACATS with the GNU Ada compiler
1702 +# The following functions are to be customized if you run in cross
1703 +# environment or want to change compilation flags. Note that for
1704 +# tests requiring checks not turned on by default, this script
1705 +# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
1707 +# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
1708 +# gnatflags="-gnatN"
1711 +gnatflags="-gnatws"
1712 +tabtarget="/data/local/testsuite"
1713 +STRIP="@REMOTE_TARGET@-strip"
1716 + # Run on rooted tablet (port 22 vs port 2222)
1718 + $STRIP_FOR_TARGET $*
1719 + /usr/bin/scp -qp $* root@tablet:$tabtarget/
1720 + /usr/bin/ssh -q tablet $tabtarget/$BN
1724 + /usr/bin/ssh -q tablet "$1"
1727 +# End of customization section.
1731 + printf "$@" >> $dir/acats.sum
1732 + printf "$@" >> $dir/acats.log
1737 + echo "$@" >> $dir/acats.sum
1738 + echo "$@" >> $dir/acats.log
1742 + echo "$@" >> $dir/acats.sum
1743 + echo "$@" >> $dir/acats.log
1747 + printf "%04d %7s" $1 $2
1754 +dir=`${PWDCMD-pwd}`
1756 +if [ "$testdir" = "" ]; then
1757 + echo You must use make check or make check-ada
1761 +if [ "$dir" = "$testdir" ]; then
1762 + echo "error: srcdir must be different than objdir, exiting."
1766 +target_gnatmake () {
1767 + echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
1768 + gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
1776 + rm -f "$binmain" *.o *.ali > /dev/null 2>&1
1780 + ls ${i}?.adb > ${i}.lst 2> /dev/null
1781 + ls ${i}*m.adb >> ${i}.lst 2> /dev/null
1782 + ls ${i}.adb >> ${i}.lst 2> /dev/null
1783 + main=`tail -1 ${i}.lst`
1787 + local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'`
1791 +EXTERNAL_OBJECTS=""
1792 +# Global variable to communicate external objects to link with.
1794 +rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst
1796 +display "Test Run By $USER on `date`"
1798 +display " === acats configuration ==="
1800 +target=`$GCC -dumpmachine`
1802 +display target gcc is $GCC
1803 +display `$GCC -v 2>&1`
1804 +display host=`gcc -dumpmachine`
1805 +display target=$target
1806 +display `type gnatmake-cross`
1807 +gnatls-cross -v >> $dir/acats.log
1810 +# Let's be tidy and clear off the remote device first
1811 +target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *"
1813 +display " === acats support ==="
1814 +display_noeol "Generating support files..."
1816 +rm -rf $dir/support
1817 +mkdir -p $dir/support
1820 +cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
1822 +# Find out the size in bit of an address on the target
1823 +target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
1824 +target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
1825 +target_bit=`cat $dir/support/impbit.out`
1826 +echo target_bit="$target_bit" >> $dir/acats.log
1828 +# Find out a suitable asm statement
1829 +# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
1831 + ia64*-*-* | s390*-*-*)
1832 + target_insn="nop 0"
1835 + target_insn="swym 0"
1841 +echo target_insn="$target_insn" >> $dir/acats.log
1843 +sed -e "s,ACATS4GNATDIR,$dir,g" \
1844 + < $testdir/support/impdef.a > $dir/support/impdef.a
1845 +sed -e "s,ACATS4GNATDIR,$dir,g" \
1846 + -e "s,ACATS4GNATBIT,$target_bit,g" \
1847 + -e "s,ACATS4GNATINSN,$target_insn,g" \
1848 + < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
1849 +sed -e "s,ACATS4GNATDIR,$dir,g" \
1850 + < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
1852 +cp $testdir/tests/cd/*.c $dir/support
1853 +cp $testdir/tests/cxb/*.c $dir/support
1854 +grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst
1857 +mv $dir/tests $dir/tests.$$ 2> /dev/null
1858 +rm -rf $dir/tests.$$ &
1861 +cp -pr $testdir/tests $dir/
1863 +for i in $dir/support/*.ada $dir/support/*.a; do
1864 + host_gnatchop $i >> $dir/acats.log 2>&1
1867 +# These tools are used to preprocess some ACATS sources
1868 +# they need to be compiled native on the host.
1870 +host_gnatmake -q -gnatws macrosub.adb
1871 +if [ $? -ne 0 ]; then
1872 + display "**** Failed to compile macrosub"
1875 +./macrosub > macrosub.out 2>&1
1878 +host_gnatmake -q -gnatws widechr.adb
1879 +if [ $? -ne 0 ]; then
1880 + display "**** Failed to compile widechr"
1883 +./widechr > widechr.out 2>&1
1885 +rm -f $dir/support/macrosub
1886 +rm -f $dir/support/widechr
1887 +rm -f $dir/support/*.ali
1888 +rm -f $dir/support/*.o
1892 +# From here, all compilations will be made by the target compiler
1894 +display_noeol "Compiling support files..."
1897 +if [ $? -ne 0 ]; then
1898 + display "**** Failed to compile C code"
1902 +host_gnatchop *.adt >> $dir/acats.log 2>&1
1904 +target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
1905 +target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
1909 +display " === acats tests ==="
1911 +if [ $# -eq 0 ]; then
1912 + chapters=`cd $dir/tests; echo [a-z]*`
1922 +for chapter in $chapters; do
1923 + if [ -d $dir/tests/$chapter ]; then
1924 + cd $dir/tests/$chapter
1925 + ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
1926 + cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
1927 + > $dir/tests/$chapter/${chapter}.lst
1928 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1929 + countdown=`expr $countdown + $countn`
1933 +cat > $dir/execute.sh << EOF
1935 + printf "left: %04d" \$1
1942 + local total=\$(echo \$testlist | awk '{print NF}')
1944 + echo "Executing \$total tests on remote device"
1946 + for x in \$testlist; do
1947 + timeout -t 30 ./\${x} > logs/\${x}.log 2>&1
1948 + countx=\$(expr \$countx + 1)
1949 + if [ \$countx -eq 25 ]; then
1950 + total=\$(expr \$total - 25)
1957 + tar -czf remote.logs.tar.gz logs
1962 +display "All tests are being cross-compiled without execution first."
1964 +for chapter in $chapters; do
1965 + if [ ! -d $dir/tests/$chapter ]; then
1969 + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
1970 + glob_countn=`expr $glob_countn + $countn`
1972 + for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
1973 + counti=`expr $counti + 1`
1974 + extraflags="-gnat95"
1975 + grep $i $testdir/overflow.lst > /dev/null 2>&1
1976 + if [ $? -eq 0 ]; then
1977 + extraflags="$extraflags -gnato"
1979 + grep $i $testdir/elabd.lst > /dev/null 2>&1
1980 + if [ $? -eq 0 ]; then
1981 + extraflags="$extraflags -gnatE"
1983 + grep $i $testdir/floatstore.lst > /dev/null 2>&1
1984 + if [ $? -eq 0 ]; then
1985 + extraflags="$extraflags -ffloat-store"
1987 + grep $i $testdir/stackcheck.lst > /dev/null 2>&1
1988 + if [ $? -eq 0 ]; then
1989 + extraflags="$extraflags -fstack-check"
1991 + inform $countdown $i
1992 + countdown=`expr $countdown - 1`
1993 + test=$dir/tests/$chapter/$i
1994 + mkdir $test && cd $test >> $dir/acats.log 2>&1
1996 + if [ $? -ne 0 ]; then
1998 + display "FAIL: $i"
1999 + failed="${failed}${i} "
2004 + host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
2006 + if [ -z "$main" ]; then
2010 + binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
2011 + echo "BUILD $main" >> $dir/acats.log
2012 + EXTERNAL_OBJECTS=""
2014 + cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
2015 + ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
2016 + ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
2017 + cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
2019 + if [ "$main" = "" ]; then
2021 + display "FAIL: $i"
2022 + failed="${failed}${i} "
2027 + target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
2028 + if [ $? -ne 0 ]; then
2030 + display "FAIL: $i"
2031 + failed="${failed}${i} "
2035 + echo $chapter/$i/$binmain >> $dir/transfer.lst
2036 + echo "$binmain \\" >> $dir/execute.sh
2041 +echo '"' >> $dir/execute.sh
2042 +echo "cycle" >> $dir/execute.sh
2045 +display "Transfer files to remote device: root@tablet:$tabtarget/"
2047 +cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \
2048 + target_cmd "tar -C $tabtarget -xzf -"
2050 +tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -"
2051 +target_cmd "cd $tabtarget; sh execute.sh"
2052 +rm -rf $dir/logs $dir/remote.logs.tar.gz
2053 +/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/
2054 +tar -xzf $dir/remote.logs.tar.gz
2056 +countdown=`wc -l < $dir/transfer.lst`
2057 +glob_countn=${countdown}
2058 +for i in `cat $dir/transfer.lst`; do
2060 + if [ "$section" != "$savedsect" ]; then
2061 + display Running chapter $section ...
2063 + savedsect=$section
2065 + #inform $countdown $TN
2066 + countdown=`expr $countdown - 1`
2067 + proglog="$dir/logs/${prog}.log"
2068 + echo "RUN $prog" >> $dir/acats.log
2069 + if [ ! -f $proglog ]; then
2070 + echo "LOG NOT FOUND!" >> $proglog
2073 + cat $proglog >> $dir/acats.log
2075 + egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1
2076 + if [ $? -ne 0 ]; then
2077 + grep 'tasking not implemented' $proglog > /dev/null 2>&1
2079 + if [ $? -ne 0 ]; then
2080 + display "FAIL: ${TN}"
2081 + failed="${failed}${TN} "
2083 + log "UNSUPPORTED: ${TN}"
2084 + glob_countn=`expr $glob_countn - 1`
2085 + glob_countu=`expr $glob_countu + 1`
2089 + glob_countok=`expr $glob_countok + 1`
2091 + cd $dir/tests/$section/$TN
2096 +display " === acats Summary ==="
2097 +display "# of expected passes $glob_countok"
2098 +display "# of unexpected failures `expr $glob_countn - $glob_countok`"
2100 +if [ $glob_countu -ne 0 ]; then
2101 + display "# of unsupported tests $glob_countu"
2104 +if [ $glob_countok -ne $glob_countn ]; then
2105 + display "*** FAILURES: $failed"
2108 +display "$0 completed at `date`"
2111 --- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
2112 +++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
2115 +-- { dg-do run { xfail *-*-openbsd* } }
2116 -- { dg-options "-O2" }
2118 -- This is an optimization test and its failure is only a missed optimization.
2119 --- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
2120 +++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
2122 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
2124 -with Unchecked_Conversion;
2126 -procedure Unchecked_Convert5 is
2128 - subtype c_1 is string(1..1);
2130 - function int2c1 is -- { dg-warning "different sizes" }
2131 - new unchecked_conversion (source => integer, target => c_1);
2137 - c1 := int2c1(16#12#);
2139 - if c1 (1) /= ASCII.Nul then
2140 - raise Program_Error;
2144 --- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
2145 +++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
2147 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
2149 -with Unchecked_Conversion;
2151 -procedure Unchecked_Convert6 is
2153 - subtype c_5 is string(1..5);
2155 - function int2c5 is -- { dg-warning "different sizes" }
2156 - new unchecked_conversion (source => integer, target => c_5);
2162 - c5 := int2c5(16#12#);
2164 - if c5 (4) /= ASCII.DC2 then
2165 - raise Program_Error;
2171 [FILE:6122:patches/patch-diff-core]
2172 --- gcc/config/darwin.h.orig
2173 +++ gcc/config/darwin.h
2175 multiple times on a command line with different arguments each time,
2176 so put a * after their names so all of them get passed. */
2178 - "%{static}%{!static:-dynamic} \
2179 + "%{static}%{!static:-dynamic -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2180 %:remove-outfile(-ldl) \
2181 %:remove-outfile(-lm) \
2182 %:remove-outfile(-lpthread) \
2183 --- gcc/config/dragonfly.h.orig
2184 +++ gcc/config/dragonfly.h
2187 %{static:-Bstatic} \
2189 - %{!static:--hash-style=gnu} \
2190 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2191 %{symbolic:-Bsymbolic}"
2194 #define LINK_SPEC DFBSD_LINK_SPEC
2196 -#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
2197 +#define DFBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.2"
2200 /* Use --as-needed -lgcc_s for eh support. */
2201 --- gcc/config/sol2.h.orig
2202 +++ gcc/config/sol2.h
2204 %{static:-dn -Bstatic} \
2205 %{shared:-G -dy %{!mimpure-text:-z text}} " \
2206 LINK_LIBGCC_MAPFILE_SPEC LINK_CLEARCAP_SPEC " \
2207 + %{!static:-R/lib/amd64:@PREFIX@/@GCCAUX@/lib/amd64:@LOCALBASE@/lib} \
2208 %{symbolic:-Bsymbolic -G -dy -z text} \
2211 --- gcc/config/aarch64/aarch64-freebsd.h.orig
2212 +++ gcc/config/aarch64/aarch64-freebsd.h
2214 %{shared:-Bshareable %{h*} %{soname*}} \
2215 %{symbolic:-Bsymbolic} \
2216 %{static:-Bstatic} \
2218 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib \
2219 %{rdynamic:-export-dynamic} \
2220 %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
2221 -X" SUBTARGET_EXTRA_LINK_SPEC " \
2224 #define MCOUNT_NAME ".mcount"
2226 +/* Static stack checking is supported by means of probes. */
2227 +#define STACK_CHECK_STATIC_BUILTIN 1
2228 #endif /* GCC_AARCH64_FREEBSD_H */
2229 --- gcc/config/i386/freebsd.h.orig
2230 +++ gcc/config/i386/freebsd.h
2232 %{rdynamic:-export-dynamic} \
2233 -dynamic-linker %(fbsd_dynamic_linker) } \
2234 %{static:-Bstatic}} \
2235 + %{!static:--hash-style=gnu --enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2236 %{symbolic:-Bsymbolic}"
2238 /* A C statement to output to the stdio stream FILE an assembler
2239 --- gcc/config/i386/freebsd64.h.orig
2240 +++ gcc/config/i386/freebsd64.h
2242 %{rdynamic:-export-dynamic} \
2243 -dynamic-linker %(fbsd_dynamic_linker) } \
2244 %{static:-Bstatic}} \
2245 + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib:@LOCALBASE@/lib} \
2246 %{symbolic:-Bsymbolic}"
2247 --- gcc/Makefile.in.orig
2249 @@ -1225,7 +1225,6 @@
2257 @@ -1637,6 +1636,7 @@
2258 $(OBJS-libcommon-target) main.o c-family/cppspec.o \
2259 $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
2260 $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
2261 + insn-modes.o insn-modes-ada.o \
2262 lto-wrapper.o collect-utils.o
2264 # for anything that is shared use the cc1plus profile data, as that
2265 @@ -1652,6 +1652,11 @@
2266 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
2268 BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \
2270 + $(CPPLIB) $(LIBDECNUMBER)
2272 +BACKEND2 = libbackend.a main.o libcommon-target.a libcommon.a \
2273 + insn-modes-ada.o \
2274 $(CPPLIB) $(LIBDECNUMBER)
2276 # This is defined to "yes" if Tree checking is enabled, which roughly means
2277 @@ -2362,6 +2367,7 @@
2279 insn-modes.c: s-modes; @true
2280 insn-modes.h: s-modes-h; @true
2281 +insn-modes-ada.c: s-modes-ada; @true
2282 insn-modes-inline.h: s-modes-inline-h; @true
2283 min-insn-modes.c: s-modes-m; @true
2285 @@ -2386,6 +2392,12 @@
2286 $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
2289 +s-modes-ada: s-modes
2290 + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \
2291 + < insn-modes.c > tmp-modes-ada.c)
2292 + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c
2293 + $(STAMP) s-modes-ada
2295 insn-preds.c: s-preds; @true
2296 tm-preds.h: s-preds-h; @true
2297 tm-constrs.h: s-constrs-h; @true
2298 @@ -3617,6 +3629,9 @@
2299 ( cd $(DESTDIR)$(bindir) && \
2300 $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
2302 + if [ -f gnat1$(exeext) ] ; then \
2303 + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \
2305 if [ ! -f gcc-cross$(exeext) ] \
2306 && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
2307 rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
2308 --- gcc/config/i386/gnu-user64.h.orig
2309 +++ gcc/config/i386/gnu-user64.h
2311 %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
2312 %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
2314 + %{!static:--enable-new-dtags -rpath @PREFIX@/@GCCAUX@/lib64:@LOCALBASE@/lib} \
2320 @@ -1513,6 +1513,9 @@
2321 static const char *const standard_startfile_prefix_2
2322 = STANDARD_STARTFILE_PREFIX_2;
2324 +/* Since we hardset rpath to LOCALBASE, follow with library search path */
2325 +static const char *const standard_raven_prefix = "@LOCALBASE@/lib/";
2327 /* A relative path to be used in finding the location of tools
2328 relative to the driver. */
2329 static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
2330 @@ -4695,6 +4698,8 @@
2332 add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
2333 PREFIX_PRIORITY_LAST, 1, 0);
2334 + add_prefix (&startfile_prefixes, standard_raven_prefix, "BINUTILS",
2335 + PREFIX_PRIORITY_LAST, 0, 0);
2338 gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix));
2341 [FILE:8497:patches/patch-diff-cxx]
2342 --- libstdc++-v3/configure.host.orig
2343 +++ libstdc++-v3/configure.host
2346 os_include_dir="os/bsd/freebsd"
2349 + os_include_dir="os/bionic"
2352 os_include_dir="os/generic"
2354 --- libstdc++-v3/config/os/bionic/ctype_base.h.orig
2355 +++ libstdc++-v3/config/os/bionic/ctype_base.h
2357 // Non-standard typedefs.
2358 typedef const int* __to_type;
2361 +#define _U _CTYPE_U
2362 +#define _L _CTYPE_L
2363 +#define _D _CTYPE_D
2364 +#define _S _CTYPE_S
2365 +#define _P _CTYPE_P
2366 +#define _C _CTYPE_C
2367 +#define _X _CTYPE_X
2368 +#define _B _CTYPE_B
2369 +#define _N _CTYPE_D
2372 // NB: Offsets into ctype<char>::_M_table force a particular size
2373 // on the mask type. Because of this, we don't use an enum.
2375 --- libstdc++-v3/src/c++11/futex.cc.orig
2376 +++ libstdc++-v3/src/c++11/futex.cc
2378 #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1
2382 +#include <sys/syscall.h>
2384 #include <syscall.h>
2387 #include <sys/time.h>
2389 --- libstdc++-v3/include/bits/c++config.orig
2390 +++ libstdc++-v3/include/bits/c++config
2392 #ifndef _GLIBCXX_CXX_CONFIG_H
2393 #define _GLIBCXX_CXX_CONFIG_H 1
2398 +#define _GTHROW throw()
2401 // The major release number for the GCC release the C++ library belongs to.
2402 #define _GLIBCXX_RELEASE
2404 --- libstdc++-v3/include/c_global/cstdio.orig
2405 +++ libstdc++-v3/include/c_global/cstdio
2406 @@ -159,16 +159,16 @@
2407 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2409 (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...)
2413 (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list);
2414 extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list);
2416 (vsnprintf)(char * __restrict, std::size_t, const char * __restrict,
2417 - __gnuc_va_list) throw ();
2418 + __gnuc_va_list) _GTHROW;
2420 (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list)
2425 #if !_GLIBCXX_USE_C99_DYNAMIC
2426 --- libstdc++-v3/include/c_global/cstdlib.orig
2427 +++ libstdc++-v3/include/c_global/cstdlib
2432 - extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
2433 - extern "C" int atexit(void (*)(void)) throw ();
2434 - extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
2435 + extern "C" void abort(void) _GTHROW _GLIBCXX_NORETURN;
2436 + extern "C" int atexit(void (*)(void)) _GTHROW;
2437 + extern "C" void exit(int) _GTHROW _GLIBCXX_NORETURN;
2438 #if __cplusplus >= 201103L
2439 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
2440 - extern "C" int at_quick_exit(void (*)(void)) throw ();
2441 + extern "C" int at_quick_exit(void (*)(void)) _GTHROW;
2443 # ifdef _GLIBCXX_HAVE_QUICK_EXIT
2444 - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
2445 + extern "C" void quick_exit(int) _GTHROW _GLIBCXX_NORETURN;
2452 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2453 - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
2454 + extern "C" void (_Exit)(int) _GTHROW _GLIBCXX_NORETURN;
2456 #if !_GLIBCXX_USE_C99_DYNAMIC
2458 @@ -217,11 +217,11 @@
2461 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2462 - extern "C" long long int (atoll)(const char *) throw ();
2463 + extern "C" long long int (atoll)(const char *) _GTHROW;
2464 extern "C" long long int
2465 - (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
2466 + (strtoll)(const char * __restrict, char ** __restrict, int) _GTHROW;
2467 extern "C" unsigned long long int
2468 - (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
2469 + (strtoull)(const char * __restrict, char ** __restrict, int) _GTHROW;
2471 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2473 --- libstdc++-v3/include/c_global/cwchar.orig
2474 +++ libstdc++-v3/include/c_global/cwchar
2475 @@ -245,16 +245,16 @@
2477 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2478 extern "C" long double
2479 - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
2480 + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) _GTHROW;
2482 #if !_GLIBCXX_USE_C99_DYNAMIC
2485 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2486 extern "C" long long int
2487 - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2488 + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2489 extern "C" unsigned long long int
2490 - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2491 + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2493 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2495 --- libstdc++-v3/include/c_std/cstdio.orig
2496 +++ libstdc++-v3/include/c_std/cstdio
2497 @@ -157,16 +157,16 @@
2498 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2500 (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...)
2504 (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list);
2505 extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list);
2507 (vsnprintf)(char * __restrict, std::size_t, const char * __restrict,
2508 - __gnuc_va_list) throw ();
2509 + __gnuc_va_list) _GTHROW;
2511 (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list)
2516 #if !_GLIBCXX_USE_C99_DYNAMIC
2517 --- libstdc++-v3/include/c_std/cstdlib.orig
2518 +++ libstdc++-v3/include/c_std/cstdlib
2523 - extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
2524 - extern "C" int atexit(void (*)(void)) throw ();
2525 - extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
2526 + extern "C" void abort(void) _GTHROW _GLIBCXX_NORETURN;
2527 + extern "C" int atexit(void (*)(void)) _GTHROW;
2528 + extern "C" void exit(int) _GTHROW _GLIBCXX_NORETURN;
2529 #if __cplusplus >= 201103L
2530 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
2531 - extern "C" int at_quick_exit(void (*)(void)) throw ();
2532 + extern "C" int at_quick_exit(void (*)(void)) _GTHROW;
2534 # ifdef _GLIBCXX_HAVE_QUICK_EXIT
2535 - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
2536 + extern "C" void quick_exit(int) _GTHROW _GLIBCXX_NORETURN;
2543 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2544 - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
2545 + extern "C" void (_Exit)(int) _GTHROW _GLIBCXX_NORETURN;
2547 #if !_GLIBCXX_USE_C99_DYNAMIC
2549 @@ -228,11 +228,11 @@
2552 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2553 - extern "C" long long int (atoll)(const char *) throw ();
2554 + extern "C" long long int (atoll)(const char *) _GTHROW;
2555 extern "C" long long int
2556 - (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
2557 + (strtoll)(const char * __restrict, char ** __restrict, int) _GTHROW;
2558 extern "C" unsigned long long int
2559 - (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
2560 + (strtoull)(const char * __restrict, char ** __restrict, int) _GTHROW;
2562 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2564 --- libstdc++-v3/include/c_std/cwchar.orig
2565 +++ libstdc++-v3/include/c_std/cwchar
2566 @@ -238,16 +238,16 @@
2568 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
2569 extern "C" long double
2570 - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
2571 + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) _GTHROW;
2573 #if !_GLIBCXX_USE_C99_DYNAMIC
2576 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2577 extern "C" long long int
2578 - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2579 + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2580 extern "C" unsigned long long int
2581 - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
2582 + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) _GTHROW;
2584 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
2588 [FILE:1612:patches/patch-diff-gcc-testsuite]
2589 --- gcc/testsuite/gcc.dg/format/ext-1.c.orig
2590 +++ gcc/testsuite/gcc.dg/format/ext-1.c
2595 -foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
2596 +foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
2597 unsigned long long int ull, int i, unsigned int u, double d,
2598 char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
2600 --- gcc/testsuite/gcc.dg/format/ext-2.c.orig
2601 +++ gcc/testsuite/gcc.dg/format/ext-2.c
2606 -foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
2607 +foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
2608 unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
2609 int *ip, unsigned int *up)
2611 --- gcc/testsuite/gcc.dg/format/format.h.orig
2612 +++ gcc/testsuite/gcc.dg/format/format.h
2616 /* %q formats want a "quad"; GCC considers this to be a long long. */
2617 -typedef llong quad_t;
2618 -typedef ullong u_quad_t;
2619 +typedef llong quad2_t;
2620 +typedef ullong u_quad2_t;
2622 __extension__ typedef __INTMAX_TYPE__ intmax_t;
2623 __extension__ typedef __UINTMAX_TYPE__ uintmax_t;
2624 --- gcc/testsuite/gcc.dg/pch/pch.exp.orig
2625 +++ gcc/testsuite/gcc.dg/pch/pch.exp
2627 set test "largefile.c"
2628 set testh "largefile.hs"
2629 set f [open $test w]
2630 +puts $f "/* { dg-do run { target *-*-solaris* } } */"
2631 +puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
2632 puts $f "/* { dg-timeout-factor 4.0 } */"
2634 for { set v 0 } { $v < 10000 } { incr v } {