FreeBSD 10.0-CURRENT #6 r237134 ia64 Updating from gcc-4.6.4.20120928 to 4.6.4.20121102 cc -c -O2 -pipe -I/usr/local/include -fno-strict-aliasing -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I.././../gcc-4.6-20121102/gcc -I.././../gcc-4.6-20121102/gcc/build -I.././../gcc-4.6-20121102/gcc/../include -I.././../gcc-4.6-20121102/gcc/../libcpp/include -I/usr/local/include -I.././../gcc-4.6-20121102/gcc/../libdecnumber -I.././../gcc-4.6-20121102/gcc/../libdecnumber/dpd -I../libdecnumber -I/usr/local/include \ -o build/rtl.o .././../gcc-4.6-20121102/gcc/rtl.c In file included from .././../gcc-4.6-20121102/gcc/genflags.c:28: .././../gcc-4.6-20121102/gcc/rtl.h:1989: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20121102/gcc/rtl.h:1990: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20121102/gcc/rtl.h:1991: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20121102/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20121102/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20121102/gcc/rtl.h:1993: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20121102/gcc/rtl.h:2105: error: 'FIRST_PSEUDO_REGISTER' undeclared here (not in a function)
On the same system gcc47 updated fine to gcc-4.7.3.20121103
On the same system I can build gcc-4.8.0.20121014
forgot to add, all these builds are with a patch to unwind-ia64.h. For example, for 4.8 branch, the patch is (credit to gerald@freebsd.org): Index: libgcc/config/ia64/unwind-ia64.h =================================================================== --- libgcc/config/ia64/unwind-ia64.h +++ libgcc/config/ia64/unwind-ia64.h (working copy) @@ -49,4 +49,7 @@ extern struct unw_table_entry * _Unwind_FindTableEntry (void *pc, unw_word *segment_base, unw_word *gp, struct unw_table_entry *ent) - __attribute__ ((__visibility__ ("hidden"))); +#ifndef __FreeBSD__ + __attribute__ ((__visibility__ ("hidden"))) +#endif + ;
Same error on FreeBSD 9.1-RELEASE #0 r243826 i386 and gcc-4.6-20130125: cc -c -O2 -pipe -march=prescott -I/usr/local/include -fno-strict-aliasing -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I.././../gcc-4.6-20130125/gcc -I.././../gcc-4.6-20130125/gcc/build -I.././../gcc-4.6-20130125/gcc/../include -I.././../gcc-4.6-20130125/gcc/../libcpp/include -I/usr/local/include -I.././../gcc-4.6-20130125/gcc/../libdecnumber -I.././../gcc-4.6-20130125/gcc/../libdecnumber/dpd -I../libdecnumber -I/usr/local/include \ -o build/vec.o .././../gcc-4.6-20130125/gcc/vec.c In file included from .././../gcc-4.6-20130125/gcc/genflags.c:29: .././../gcc-4.6-20130125/gcc/rtl.h:1989: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1990: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1991: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1993: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:2105: error: 'FIRST_PSEUDO_REGISTER' undeclared here (not in a function) .././../gcc-4.6-20130125/gcc/rtl.h:2456: warning: ISO C forbids forward references to 'enum' types gmake[2]: *** [build/genflags.o] Erreur 1 gmake[2]: *** Attente des tâches non terminées.... In file included from .././../gcc-4.6-20130125/gcc/read-rtl.c:31: .././../gcc-4.6-20130125/gcc/rtl.h:1989: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1990: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1991: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1993: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:2105: error: 'FIRST_PSEUDO_REGISTER' undeclared here (not in a function) .././../gcc-4.6-20130125/gcc/rtl.h:2456: warning: ISO C forbids forward references to 'enum' types gmake[2]: *** [build/read-rtl.o] Erreur 1 In file included from .././../gcc-4.6-20130125/gcc/rtl.c:34: .././../gcc-4.6-20130125/gcc/rtl.h:1989: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1990: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1991: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1992: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:1993: warning: ISO C forbids forward references to 'enum' types .././../gcc-4.6-20130125/gcc/rtl.h:2105: error: 'FIRST_PSEUDO_REGISTER' undeclared here (not in a function) .././../gcc-4.6-20130125/gcc/rtl.h:2456: warning: ISO C forbids forward references to 'enum' types gmake[2]: *** [build/rtl.o] Erreur 1
On FreeBSD 10.0-CURRENT #5 r252055, with ports tree at r322480, I can built lang/gcc, which is now 4.6: # gcc46 --version gcc46 (FreeBSD Ports Collection) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # pkg info -xo gcc-4.6 gcc-4.6.3 lang/gcc # This is with Gerald's patch: # cat /usr/ports/lang/gcc/files/patch-unwind-ia64.h 2010-09-12 Gerald Pfeifer <gerald@pfeifer.com> PR target/45650 * config/ia64/unwind-ia64.h: Do not mark _Unwind_FindTableEntry hidden on FreeBSD. Index: gcc/config/ia64/unwind-ia64.h =================================================================== --- gcc/config/ia64/unwind-ia64.h (revision 164211) +++ gcc/config/ia64/unwind-ia64.h (working copy) @@ -40,4 +40,7 @@ extern struct unw_table_entry * _Unwind_FindTableEntry (void *pc, unsigned long *segment_base, unsigned long *gp, struct unw_table_entry *ent) - __attribute__ ((__visibility__ ("hidden"))); +#ifndef __FreeBSD__ + __attribute__ ((__visibility__ ("hidden"))) +#endif + ; # I think it was fixed due to recent binutil fixes. Since 4.7, 4.8, 4.9 all build fine on this platform, I'm no longer interested in 4.6.4. I'm therefore closing this PR.