------- Comment #13 from hp at gcc dot gnu dot org 2007-09-14 13:19 ------- Sorry, build fails for cris-elf with: libtool: compile: /home/hp/combe/cris-regobj/./gcc/xgcc -B/home/hp/combe/cris-regobj/./gcc/ -nostdinc -B/home/hp/combe/cris-rego\ bj/cris-unknown-elf/newlib/ -isystem /home/hp/combe/cris-regobj/cris-unknown-elf/newlib/targ-include -isystem /home/hp/combe/comb\ ined/newlib/libc/include -B/home/hp/combe/cris-regobj/cris-unknown-elf/libgloss/cris -L/home/hp/combe/cris-regobj/cris-unknown-el\ f/libgloss/libnosys -L/home/hp/combe/combined/libgloss/cris -B/tmp/reg-cris/cris-unknown-elf/bin/ -B/tmp/reg-cris/cris-unknown-el\ f/lib/ -isystem /tmp/reg-cris/cris-unknown-elf/include -isystem /tmp/reg-cris/cris-unknown-elf/sys-include -L/home/hp/combe/cris-\ regobj/./ld -DHAVE_CONFIG_H -I. -I/home/hp/combe/combined/libgfortran -I. -iquote/home/hp/combe/combined/libgfortran/io -I/home/h\ p/combe/combined/libgfortran/../gcc -I/home/hp/combe/combined/libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -W\ all -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -O2 -g -O2 -MT unix.lo -MD -MP -MF .d\ eps/unix.Tpo -c /home/hp/combe/combined/libgfortran/io/unix.c -o unix.o /home/hp/combe/combined/libgfortran/io/unix.c:1794: error: static declaration of 'access' follows non-static declaration /home/hp/combe/combined/newlib/libc/include/sys/unistd.h:19: error: previous declaration of 'access' was here /home/hp/combe/combined/libgfortran/io/unix.c: In function 'access': /home/hp/combe/combined/libgfortran/io/unix.c:1795: error: 'amod' undeclared (first use in this function) /home/hp/combe/combined/libgfortran/io/unix.c:1795: error: (Each undeclared identifier is reported only once /home/hp/combe/combined/libgfortran/io/unix.c:1795: error: for each function it appears in.) /home/hp/combe/combined/libgfortran/io/unix.c:1793: warning: unused parameter 'amode' make[5]: *** [unix.lo] Error 1 make[5]: Leaving directory `/home/hp/combe/cris-regobj/cris-unknown-elf/libgfortran'
Besides the obvious s/amod/amode/ typo, maybe use a different name for the internal function, and #ifndef HAVE_ACCESS ... libgfortran_access implementation #else #define libgfortran_access access #endif to avoid problems with the access prototype. I'm testing such an updated patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21185