Frank Heckenbach wrote:
As I wrote some weeks ago, I'd like to drop the gcc-3.1.1 support since 3.2.1 seems to work at least as well (and much better on some systems).
Dropping gcc-3.1.1 currently just means removing the diff file, but it makes it easier to maintain whenever there are changes in the diff (and I suppose there'll be some when the debug info problems will be fixed).
So, that's your last chance to raise any objections.
"Objection" would be a too big word, but I do use "gcc-3.1.1.diff".
I use it to build gpc with a Apple gcc (apart from the build with FSF gcc-3.2.1).
There are two reasons to do so:
(1) find out how stable it is, as compared to the build with mainline gcc-3.2.1 (2) being able to use Apple specific gcc compiler options for development on Mac OS X
The latest Apple gcc available on the web in source code is "gcc3-1151", a gcc 3.1 variant.
Manually applying "gcc-3.1.1.diff" works, except for the patch to system.h, as Apple has changed:
#define GCCBUGURL "URL:http://www.gnu.org/software/gcc/bugs.html"
into
/* APPLE LOCAL report bugs to Apple 2001-09-14 sts */ #define GCCBUGURL "URL:http://developer.apple.com/bugreporter"
and gpc tries to patch it also. Of course, this can be fixed easily.
The build progresses very nicely, but ends with (what appears to be) the linking of gpc1:
gcc -DIN_GCC -no-cpp-precomp -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -Wtraditional -pedantic -Wno-long-long -I. -I. -I/Users/adriaan/gpc3-1151/gcc -I/Users/adriaan/gpc3-1151/gcc/. -I/Users/adriaan/gpc3-1151/gcc/config -I/Users/adriaan/gpc3-1151/gcc/../include -DGPC -I/Users/adriaan/gpc3-1151/gcc/p -o gpc1 p/gpc-common.o p/gpc-decl.o p/gpc-lex.o p/gpc-typeck.o p/lang.o p/module.o p/objects.o p/parse.o p/rtscall.o p/types.o p/util.o p/convert.o p/dbxout.o p/dwarf2out.o p/expr.o p/fold-const.o p/function.o p/integrate.o p/optabs.o p/stor-layout.o p/toplev.o p/tree.o p/diagnostic.o attribs.o main.o libbackend.a ../libiberty/libiberty.a ./intl/libintl.a ../libiberty/libiberty.a ld: warning multiple definitions of symbol _mkstemps ../libiberty/libiberty.a(mkstemps.o) definition of _mkstemps in section (__TEXT,__text) /usr/bin/../lib/gcc-lib/powerpc-apple-darwin6.0/3.1/../../../ libSystem.dylib(mktemp.So) definition of _mkstemps ld: warning multiple definitions of symbol _asprintf ../libiberty/libiberty.a(asprintf.o) definition of _asprintf in section (__TEXT,__text) /usr/bin/../lib/gcc-lib/powerpc-apple-darwin6.0/3.1/../../../ libSystem.dylib(asprintf.So) definition of _asprintf ld: Undefined symbols: _c_language _pfe_freeze_thaw_ptr _pfe_freeze_thaw_ptr_fp _pfe_freeze_thaw_rtx _pfe_freeze_thaw_tree_push _pfe_operation _pfe_realloc _pfe_savestring _pfe_free _pfe_s_malloc _pfe_check_struct_size _pfe_freeze_thaw_language_function _pfe_freeze_thaw_rtvec _pfe_s_calloc _pfe_s_realloc _finish_gen_indexing _flag_debug_gen_index _flag_gen_index _flag_gen_index_header _flag_gen_index_original _flush_index_buffer _gen_indexing_footer _gen_indexing_header _gen_indexing_info _init_gen_indexing _pfe_check_compiler _pfe_close_pfe_file _pfe_compiler_state_ptr _pfe_decode_dbgpfe_options _pfe_dump_compiler_state _pfe_file _pfe_init _pfe_load_compiler_state _pfe_macro_validation _pfe_open_pfe_file _pfe_predefined_global_names _pfe_term _pfe_is_frozen _constant_string_class_name _flag_next_runtime _pfe_freeze_ptr _pfe_thaw_ptr _pfe_real_ptr _lang_build_type_variant _build_cfstring_ascii make[1]: *** [gpc1] Error 1 make: *** [all-gcc] Error 2
So, apparently, some routines and/or compiler defines are missing.
Currently, I am investigating this further. I found "_pfe..." routines in an Apple specific subdirectory "pfe" in the gcc directory. Consequently, I try to understand make files and build rules, so that I can add routines and compiler defines to the gpc link. Of course, any hints are welcome.
Regards,
Adriaan van Os