head 1.2; access; symbols perseant-exfatfs-base-20250801:1.2 perseant-exfatfs-base-20240630:1.2 cjep_sun2x:1.2.0.44 cjep_sun2x-base:1.2 cjep_staticlib_x-base1:1.2 cjep_staticlib_x:1.2.0.42 cjep_staticlib_x-base:1.2 phil-wifi-20200421:1.2 phil-wifi-20200411:1.2 phil-wifi-20200406:1.2 pgoyette-compat-merge-20190127:1.2 pgoyette-compat-20190127:1.2 pgoyette-compat-20190118:1.2 pgoyette-compat-1226:1.2 pgoyette-compat-1126:1.2 pgoyette-compat-1020:1.2 pgoyette-compat-0930:1.2 pgoyette-compat-0906:1.2 pgoyette-compat-0728:1.2 pgoyette-compat-0625:1.2 pgoyette-compat-0521:1.2 pgoyette-compat-0502:1.2 pgoyette-compat-0422:1.2 pgoyette-compat-0415:1.2 pgoyette-compat-0407:1.2 pgoyette-compat-0330:1.2 pgoyette-compat-0322:1.2 pgoyette-compat-0315:1.2 pgoyette-compat:1.2.0.40 pgoyette-compat-base:1.2 perseant-stdc-iso10646:1.2.0.38 perseant-stdc-iso10646-base:1.2 prg-localcount2-base3:1.2 prg-localcount2-base2:1.2 prg-localcount2-base1:1.2 prg-localcount2:1.2.0.36 prg-localcount2-base:1.2 pgoyette-localcount-20170426:1.2 bouyer-socketcan-base1:1.2 pgoyette-localcount-20170320:1.2 bouyer-socketcan:1.2.0.34 bouyer-socketcan-base:1.2 pgoyette-localcount-20170107:1.2 pgoyette-localcount-20161104:1.2 localcount-20160914:1.2 pgoyette-localcount-20160806:1.2 pgoyette-localcount-20160726:1.2 pgoyette-localcount:1.2.0.32 pgoyette-localcount-base:1.2 netbsd-5-2-3-RELEASE:1.2 netbsd-5-1-5-RELEASE:1.2 yamt-pagecache-base9:1.2 yamt-pagecache-tag8:1.2 tls-earlyentropy:1.2.0.28 tls-earlyentropy-base:1.2 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2 riastradh-drm2-base3:1.2 netbsd-5-2-2-RELEASE:1.2 netbsd-5-1-4-RELEASE:1.2 netbsd-5-2-1-RELEASE:1.2 netbsd-5-1-3-RELEASE:1.2 agc-symver:1.2.0.30 agc-symver-base:1.2 tls-maxphys-base:1.2 yamt-pagecache-base8:1.2 netbsd-5-2:1.2.0.26 yamt-pagecache-base7:1.2 netbsd-5-2-RELEASE:1.2 netbsd-5-2-RC1:1.2 yamt-pagecache-base6:1.2 yamt-pagecache-base5:1.2 yamt-pagecache-base4:1.2 netbsd-5-1-2-RELEASE:1.2 netbsd-5-1-1-RELEASE:1.2 yamt-pagecache-base3:1.2 yamt-pagecache-base2:1.2 yamt-pagecache:1.2.0.24 yamt-pagecache-base:1.2 bouyer-quota2-nbase:1.2 bouyer-quota2:1.2.0.22 bouyer-quota2-base:1.2 matt-nb5-pq3:1.2.0.20 matt-nb5-pq3-base:1.2 netbsd-5-1:1.2.0.18 netbsd-5-1-RELEASE:1.2 netbsd-5-1-RC4:1.2 netbsd-5-1-RC3:1.2 netbsd-5-1-RC2:1.2 netbsd-5-1-RC1:1.2 netbsd-5-0-2-RELEASE:1.2 netbsd-5-0-1-RELEASE:1.2 jym-xensuspend-nbase:1.2 netbsd-5-0:1.2.0.16 netbsd-5-0-RELEASE:1.2 netbsd-5-0-RC4:1.2 netbsd-5-0-RC3:1.2 netbsd-5-0-RC2:1.2 jym-xensuspend:1.2.0.14 jym-xensuspend-base:1.2 netbsd-5-0-RC1:1.2 netbsd-5:1.2.0.12 netbsd-5-base:1.2 mjf-devfs2:1.2.0.10 mjf-devfs2-base:1.2 yamt-pf42-base4:1.2 yamt-pf42-base3:1.2 hpcarm-cleanup-nbase:1.2 yamt-pf42-base2:1.2 yamt-pf42:1.2.0.8 yamt-pf42-base:1.2 keiichi-mipv6:1.2.0.6 keiichi-mipv6-base:1.2 cube-autoconf:1.2.0.4 cube-autoconf-base:1.2 hpcarm-cleanup:1.2.0.2 hpcarm-cleanup-base:1.2 netbsd-1-6-PATCH002-RELEASE:1.1.1.1 netbsd-1-6-PATCH002:1.1.1.1 netbsd-1-6-PATCH002-RC4:1.1.1.1 netbsd-1-6-PATCH002-RC3:1.1.1.1 netbsd-1-6-PATCH002-RC2:1.1.1.1 netbsd-1-6-PATCH002-RC1:1.1.1.1 netbsd-1-6-PATCH001:1.1.1.1 netbsd-1-6-PATCH001-RELEASE:1.1.1.1 netbsd-1-6-PATCH001-RC3:1.1.1.1 netbsd-1-6-PATCH001-RC2:1.1.1.1 netbsd-1-6-PATCH001-RC1:1.1.1.1 netbsd-1-6-RELEASE:1.1.1.1 netbsd-1-6-RC3:1.1.1.1 netbsd-1-6-RC2:1.1.1.1 netbsd-1-6-RC1:1.1.1.1 netbsd-1-6:1.1.1.1.0.10 netbsd-1-6-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH002:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-5-BETA2:1.1.1.1 netbsd-1-5-BETA:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 netbsd-1-5-ALPHA2:1.1.1.1 netbsd-1-5:1.1.1.1.0.8 netbsd-1-5-base:1.1.1.1 netbsd-1-4-PATCH002:1.1.1.1 wrstuden-devbsize-19991221:1.1.1.1 wrstuden-devbsize:1.1.1.1.0.6 wrstuden-devbsize-base:1.1.1.1 comdex-fall-1999:1.1.1.1.0.4 comdex-fall-1999-base:1.1.1.1 netbsd-1-4-PATCH001:1.1.1.1 netbsd-1-4-RELEASE:1.1.1.1 egcs-1-1-2:1.1.1.1 netbsd-1-4:1.1.1.1.0.2 netbsd-1-4-base:1.1.1.1 egcs-1-1-1:1.1.1.1 egcs-1-1-1-prerelease-2:1.1.1.1 egcs-1-1-19981014:1.1.1.1 egcs-1-1b:1.1.1.1 egcs-1-1-19980824:1.1.1.1 egcs-1-1-19980816:1.1.1.1 CYGNUS:1.1.1; locks; strict; comment @# @; 1.2 date 2002.09.16.16.40.25; author thorpej; state dead; branches; next 1.1; 1.1 date 98.08.16.17.36.01; author tv; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 98.08.16.17.36.01; author tv; state Exp; branches; next ; desc @@ 1.2 log @Remove the old egcs compiler. @ text @The following patches are needed in order to build GNAT with EGCS. These patches were tested with egcs-980308 and gnat-3.10p on a mips-sgi-irix6.3 system. The gnat build succeeded as per the instructions in the gnat README.BUILD file for building one library, except that CFLAGS="-O -g" and GNATLIBCFLAGS="-O -g" were substituted for the recommended "-O2" so that the build could be debugged. There was no attempt to run the resulting build against any testsuite or validation suite. -- Developers Notes: Every use of sizetype in the Ada front end should be checked to see if perhaps it should be using bitsizetype instead. The change to maybe_pad_type is just a hack to work around this problem, and may not be desirable in the long term. There are many places in the Ada front end where it calls operand_equal_p to see if two type sizes are the same. operand_equal_p fails if the two arguments have different TYPE_MODEs. sizetype and bitsizetype can have different TYPE_MODEs. Thus this code can fail if one type size is based on sizetype, and the other is based on bitsizetype. The change to maybe_pad_type fixes one very critical place where this happens. There may be others. -- Mon Mar 16 11:00:25 1998 Jim Wilson * a-gtran3.c (maybe_pad_type): Convert both size and orig_size to sizetype if they have differing modes. * a-misc.c (gnat_tree_code_type): Change from string to char array. (init_lex): Delete realloc calls for tree_code_* globals. Adjust bcopy call for gnat_tree_code_type change. * a-tree.def: Adjust for tree_code_* type changes. * a-misc.c (init_lex): Rename to init_parse. diff -c ada/a-gtran3.c /home/brolley/comp/egcs/tmp/ada/a-gtran3.c *** ada/a-gtran3.c Mon Mar 30 16:29:04 1998 --- /home/brolley/comp/egcs/tmp/ada/a-gtran3.c Thu Apr 2 17:16:15 1998 *************** *** 3329,3334 **** --- 3329,3341 ---- isn't changing. Likewise, clear the alignment if it isn't being changed. Then return if we aren't doing anything. */ + if (size != 0 + && TYPE_MODE (TREE_TYPE (size)) != TYPE_MODE (TREE_TYPE (orig_size))) + { + size = convert (sizetype, size); + orig_size = convert (sizetype, orig_size); + } + if (size != 0 && (operand_equal_p (size, orig_size, 0) || (TREE_CODE (orig_size) == INTEGER_CST diff -c ada/a-misc.c /home/brolley/comp/egcs/tmp/ada/a-misc.c *** ada/a-misc.c Mon Mar 30 16:29:05 1998 --- /home/brolley/comp/egcs/tmp/ada/a-misc.c Thu Apr 2 17:36:19 1998 *************** *** 70,77 **** #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, ! char *gnat_tree_code_type[] = { ! "x", #include "a-tree.def" }; #undef DEFTREECODE --- 70,77 ---- #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, ! char gnat_tree_code_type[] = { ! 'x', #include "a-tree.def" }; #undef DEFTREECODE *************** *** 254,259 **** --- 254,268 ---- print_lang_statistics () {} + void + lang_print_xnode (file, node, indent) + FILE *file; + tree node; + int indent; + { + } + + /* integrate_decl_tree calls this function, but since we don't use the DECL_LANG_SPECIFIC field, this is a no-op. */ *************** *** 603,622 **** it, but it's where g++ does it. */ void ! init_lex () { lang_expand_expr = gnat_expand_expr; - tree_code_type - = (char **) realloc (tree_code_type, - sizeof (char *) * LAST_GNAT_TREE_CODE); - tree_code_length - = (int *) realloc (tree_code_length, - sizeof (int) * LAST_GNAT_TREE_CODE); - tree_code_name - = (char **) realloc (tree_code_name, - sizeof (char *) * LAST_GNAT_TREE_CODE); - bcopy ((char *) gnat_tree_code_type, (char *) (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE), ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) --- 612,622 ---- it, but it's where g++ does it. */ void ! init_parse (filename) ! char *filename; { lang_expand_expr = gnat_expand_expr; bcopy ((char *) gnat_tree_code_type, (char *) (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE), ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) *************** *** 629,636 **** bcopy ((char *) gnat_tree_code_name, (char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE), ! ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) ! * sizeof (char *))); } /* Sets some debug flags for the parsed. It does nothing here. */ --- 629,640 ---- bcopy ((char *) gnat_tree_code_name, (char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE), ! LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE); ! } ! ! void ! finish_parse () ! { } /* Sets some debug flags for the parsed. It does nothing here. */ diff -c ada/a-tree.def /home/brolley/comp/egcs/tmp/ada/a-tree.def *** ada/a-tree.def Mon Mar 30 16:29:09 1998 --- /home/brolley/comp/egcs/tmp/ada/a-tree.def Thu Apr 2 17:20:38 1998 *************** *** 31,69 **** The only field used if TREE_COMPLEXITY, which contains the GNAT node number. */ ! DEFTREECODE (TRANSFORM_EXPR, "transform_expr", "e", 0) /* Perform an unchecked conversion between the input and the output. if TREE_ADDRESSABLE is set, it means this is in an LHS; in that case, we can only use techniques, such as pointer punning, that leave the expression a "name". */ ! DEFTREECODE (UNCHECKED_CONVERT_EXPR, "unchecked_convert_expr", "1", 1) /* A type that is an unconstrained array itself. This node is never passed to GCC. TREE_TYPE is the type of the fat pointer and TYPE_OBJECT_RECORD_TYPE is the type of a record containing the template and data. */ ! DEFTREECODE (UNCONSTRAINED_ARRAY_TYPE, "unconstrained_array_type", "t", 0) /* A reference to an unconstrained array. This node only exists as an intermediate node during the translation of a GNAT tree to a GCC tree; it is never passed to GCC. The only field used is operand 0, which is the fat pointer object. */ ! DEFTREECODE (UNCONSTRAINED_ARRAY_REF, "unconstrained_array_ref", "r", 1) /* An expression that returns an RTL suitable for its type. Operand 0 is an expression to be evaluated for side effects only. */ ! DEFTREECODE (NULL_EXPR, "null_expr", "e", 1) /* An expression that emits a USE for its single operand. */ ! DEFTREECODE (USE_EXPR, "use_expr", "e", 1) /* An expression that is treated as a conversion while generating code, but is used to prevent infinite recursion when conversions of biased types are involved. */ ! DEFTREECODE (GNAT_NOP_EXPR, "gnat_nop_expr", "1", 1) --- 31,69 ---- The only field used if TREE_COMPLEXITY, which contains the GNAT node number. */ ! DEFTREECODE (TRANSFORM_EXPR, "transform_expr", 'e', 0) /* Perform an unchecked conversion between the input and the output. if TREE_ADDRESSABLE is set, it means this is in an LHS; in that case, we can only use techniques, such as pointer punning, that leave the expression a "name". */ ! DEFTREECODE (UNCHECKED_CONVERT_EXPR, "unchecked_convert_expr", '1', 1) /* A type that is an unconstrained array itself. This node is never passed to GCC. TREE_TYPE is the type of the fat pointer and TYPE_OBJECT_RECORD_TYPE is the type of a record containing the template and data. */ ! DEFTREECODE (UNCONSTRAINED_ARRAY_TYPE, "unconstrained_array_type", 't', 0) /* A reference to an unconstrained array. This node only exists as an intermediate node during the translation of a GNAT tree to a GCC tree; it is never passed to GCC. The only field used is operand 0, which is the fat pointer object. */ ! DEFTREECODE (UNCONSTRAINED_ARRAY_REF, "unconstrained_array_ref", 'r', 1) /* An expression that returns an RTL suitable for its type. Operand 0 is an expression to be evaluated for side effects only. */ ! DEFTREECODE (NULL_EXPR, "null_expr", 'e', 1) /* An expression that emits a USE for its single operand. */ ! DEFTREECODE (USE_EXPR, "use_expr", 'e', 1) /* An expression that is treated as a conversion while generating code, but is used to prevent infinite recursion when conversions of biased types are involved. */ ! DEFTREECODE (GNAT_NOP_EXPR, "gnat_nop_expr", '1', 1) This patch from Fred Fish to GNAT may make building simpler. We haven't tested it. > I put a very short blurb in the faq. GNAT is complicated enough that > we should probably write a whole page on how to build/install it. You may want to use some or all of these patches: * Make-lang.in (gnattools): Depends upon GCC_PARTS. (ada.start.encap): Depends upon gnattools. (ada.rest.encap): Depends upon gnatlib. * Makefile.in (../stamp-gnatlib1): Since we are still in the rts subdir when the rule runs, we need to touch ../../stamp-gnatlib1. (../stamp-gnatlib1): Don't unconditionally remove the rts directory, create it if one does not exist. (gnatlib): Remove superflous leading blank char at *-*-pe line. * a-init.c: Define NULL if not yet defined. Index: Make-lang.in =================================================================== RCS file: /cvsroot/gg/egcs/gcc/ada/Make-lang.in,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** Make-lang.in 1997/10/17 06:19:09 1.1.1.1 --- Make-lang.in 1998/03/17 14:26:14 1.3 *************** *** 100,106 **** # use host-gcc # getopt*.o has to be built before CC=../xgcc ! gnattools: getopt.o getopt1.o force $(MAKE) $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS)\ CC="../xgcc -B../" GNATBIND="../gnatbind" \ gnatf gnatlink gnatkr gnatmake gnatcmd gnatprep \ --- 100,107 ---- # use host-gcc # getopt*.o has to be built before CC=../xgcc ! # GCC_PARTS has to be built before CC=../xgcc ! gnattools: getopt.o getopt1.o $(GCC_PARTS) force $(MAKE) $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS)\ CC="../xgcc -B../" GNATBIND="../gnatbind" \ gnatf gnatlink gnatkr gnatmake gnatcmd gnatprep \ *************** *** 163,170 **** -if [ -f gnatls$(exeext) ] ; then\ mv gnatls$(exeext) gnatls-cross$(exeext); fi ! ada.start.encap: ! ada.rest.encap: ada.info: ada.dvi: --- 164,171 ---- -if [ -f gnatls$(exeext) ] ; then\ mv gnatls$(exeext) gnatls-cross$(exeext); fi ! ada.start.encap: gnattools ! ada.rest.encap: gnatlib ada.info: ada.dvi: Index: Makefile.in =================================================================== RCS file: /cvsroot/gg/egcs/gcc/ada/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.5 diff -c -r1.1.1.1 -r1.5 *** Makefile.in 1997/10/17 06:19:09 1.1.1.1 --- Makefile.in 1998/02/19 14:16:34 1.5 *************** *** 798,806 **** # 3. copy 3xyyy.ad[sb] -->-- i-yyy.ad[sb] ../stamp-gnatlib1: Makefile ../stamp-gnatlib2 ! rm -rf rts ! mkdir rts ! chmod u+w rts (\ case $(target) in \ sparc-sun-sunos4*) letter=u ;;\ --- 800,806 ---- # 3. copy 3xyyy.ad[sb] -->-- i-yyy.ad[sb] ../stamp-gnatlib1: Makefile ../stamp-gnatlib2 ! if [ -d rts ]; then true; else mkdir rts; chmod u+w rts; fi (\ case $(target) in \ sparc-sun-sunos4*) letter=u ;;\ *************** *** 888,894 **** done;; \ esac ; \ rm -f ../stamp-gnatlib ; \ ! touch ../stamp-gnatlib1) gnatlib-common: ../stamp-gnatlib1 (subdir=`cd $(srcdir); pwd`; \ --- 888,894 ---- done;; \ esac ; \ rm -f ../stamp-gnatlib ; \ ! touch ../../stamp-gnatlib1) gnatlib-common: ../stamp-gnatlib1 (subdir=`cd $(srcdir); pwd`; \ *************** *** 923,929 **** mips-sni-* |\ *-*-cygwin32* |\ *-*-mingw32* |\ ! *-*-pe |\ *) \ \ $(MAKE) CC="../../xgcc -B../../" \ --- 923,929 ---- mips-sni-* |\ *-*-cygwin32* |\ *-*-mingw32* |\ ! *-*-pe |\ *) \ \ $(MAKE) CC="../../xgcc -B../../" \ Index: a-init.c =================================================================== RCS file: /cvsroot/gg/egcs/gcc/ada/a-init.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** a-init.c 1997/10/17 06:19:10 1.1.1.1 --- a-init.c 1998/01/04 23:11:42 1.2 *************** *** 516,521 **** --- 516,525 ---- __gnat_raise (exception); } + #ifndef NULL + #define NULL 0 + #endif + static void __gnat_install_handler () { Wed Jun 24 15:06:09 1998 Dave Brolley * a-misc.c (lang_decode_option): New interface. * a-misc.h (lang_decode_option): New interface. *** /home/brolley/tmp/a-misc.c Wed Jun 24 15:01:22 1998 --- ada/a-misc.c Wed Jun 24 15:02:42 1998 *************** init_gnat_args () *** 162,170 **** it returns 0. */ int ! lang_decode_option (p) ! char *p; { extern int save_argc; extern char **save_argv; --- 162,172 ---- it returns 0. */ int ! lang_decode_option (argc, argv) ! int argc; ! char **argv; { + char *p = argv[0]; extern int save_argc; extern char **save_argv; *** /home/brolley/tmp/a-misc.h Wed Jun 24 15:01:22 1998 --- ada/a-misc.h Wed Jun 24 15:03:20 1998 *************** enum gnat_tree_code { *** 63,69 **** option decoding phase of GCC calls this routine on the flags that it cannot decode. This routine returns 1 if it is successful, otherwise it returns 0. */ ! extern int lang_decode_option PROTO((char *)); /* Perform all the initialization steps that are language-specific. */ extern void lang_init PROTO((void)); --- 63,69 ---- option decoding phase of GCC calls this routine on the flags that it cannot decode. This routine returns 1 if it is successful, otherwise it returns 0. */ ! extern int lang_decode_option PROTO((int, char **)); /* Perform all the initialization steps that are language-specific. */ extern void lang_init PROTO((void)); @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import egcs-1.1 gcc, 19980816 snapshot @ text @@