Waldek Hebisch wrote:
Adriaan van Os wrote:
This results in:
<snip> > <tree_list 0x44018080 > purpose <integer_cst 0x44018060 type <enumeral_type 0x434e28c0 Ioselectevents> constant > invariant tree_5 1> value <integer_cst 0x44018060 1>>
That looks fine. I think I have identified the problem: get_set_constructor_bytes is missing the prototype. The following patch (will force full rebuild, for quick test one can add the prototype just to lang.c) should fix the problem:
--- gcc-4.1.0/gcc/tree.h.pp 2006-04-12 02:49:20.204667824 +0200 +++ gcc-4.1.0/gcc/tree.h 2006-04-12 02:49:23.218209696 +0200 @@ -3781,6 +3781,7 @@ extern unsigned crc32_string (unsigned, const char *); extern void clean_symbol_name (char *); extern tree get_file_function_name_long (const char *); +extern tree get_set_constructor_bytes (tree, unsigned char *, int); extern tree get_callee_fndecl (tree); extern void change_decl_assembler_name (tree, tree); extern int type_num_arguments (tree);
Thanks, the patch gets me a step further
../.././xgpc -B../.././ -c -I. -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -O2 --unit-path=/Users/adriaan/gpc/gpc-20060325/gcc-41/gcc-4.1.0/gcc/p/rts --automake -DRTS_RELEASE_STRING="'`cat /Users/adriaan/gpc/gpc-20060325/gcc-41/gcc-4.1.0/gcc/p/rts/rts-version`'" -DGCC_VERSION="''" "/Users/adriaan/gpc/gpc-20060325/gcc-41/gcc-4.1.0/gcc/p/rts/gpc.pas" /Users/adriaan/gpc/gpc-20060325/gcc-41/gcc-4.1.0/gcc/p/rts/gpc.pas:78: #error Trying to compile gpc.pas with a non-matching GPC version is likely to cause problems. In case you are building the RTS separately from GPC, make sure you install a current GPC version previously. If you are building GPC now and this message appears, something is wrong -- if you are overriding the GCC_FOR_TARGET or GPC_FOR_TARGET make variables, this might be the problem. If you are cross-building GPC, build and install a current GPC cross-compiler first, sorry. If that's not the case, please report it as a bug. If you are not building GPC or the RTS currently, you might have installed things in the wrong place, so the compiler and RTS versions do not match. make[3]: *** [gpc.o] Error 1 make[2]: *** [pascal.rts] Error 2 make[1]: *** [all-gcc] Error 2 make: *** [all] Error 2
This is solved by changing the version number in gcc/p/rts/gpc.pas at line 78.
Next problem is an error message
unknown spec-function `version-compare'
while compiling p/utils/binobj.pas with xgpc. The missing spec function is used in darwin.h in gcc-4.1. The problem is solved by the included patch. The diffs adds `version-compare' and (for completeness) also `replace-outfile' as spec-functions to gpc.c (both were added later to gcc.c).
Great, the compiler now builds !
[g5:gpc-20060325/gcc-41/build] adriaan% gpc -v Using built-in specs. Configured with: ../gcc-4.1.0/configure --enable-languages=c,pascal --enable-threads=posix --target=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --build=powerpc-apple-darwin8 --prefix=/Developer/Pascal/gpc410d1 Thread model: posix gpc version 20060325, based on gcc-4.1.0
One new feature that I noticed is that 64-bit gcc (multi)libs are automatically built. I will run the testsuite and report the results.
Regards,
Adriaan van Os