[Bug c/31088] New: Building cross-compiler with newlib-1.15.0 and binutils-2.17 fails in libssp

rlemieu at cooptel dot qc dot ca gcc-bugzilla@gcc.gnu.org
Thu Mar 8 18:37:00 GMT 2007


The symptom is that compilation aborts as follows

gcc-4.1.2/libssp/ssp.c: In function '__guard_setup':
../../../gcc-4.1.2/libssp/ssp.c:70: warning: implicit declaration of function
'open'
../../../gcc-4.1.2/libssp/ssp.c:70: error: 'O_RDONLY' undeclared (first use in
this function)

BACKGROUND

I am compiling a cross compiler for an ARM processor and newlib.

WORKFLOW

    tar xvfz ../src/rlx_dist/newlib-1.15.0.tar.gz
    tar xvfj ../src/rlx_dist/gcc-4.1.2.tar.bz2
    tar xvfj ../src/rlx_dist/binutils-2.17.tar.bz2
    ...
    cd gcc-4.1.2-arm-elf
    ../gcc-4.1.2/configure --srcdir=../gcc-4.1.2 --target=arm-elf \
         --with-cpu=arm9 --with-newlib --disable-threads --disable-multilib \
         --disable-nls --enable-languages=c \
         --prefix=/rlxb2/arm-elf

PROBLEM

At this point gcc-4.1.2-arm-elf/arm-elf/libssp/config.h
does not define HAVE_FCNTL_H and neither many others.

Copying manuslly the header files from newlib-1.15.0/newlib/libc/include/
to $prefix/arm-elf/include AND manually editing
  gcc-4.1.2-arm-elf/arm-elf/libssp/config.h
does the trick.

Then make and make install complete without complaining.

In any case, configure produces a disfunctional 
cc-4.1.2-arm-elf/arm-elf/libssp/config.h.

For your information.


-- 
           Summary: Building cross-compiler with newlib-1.15.0 and binutils-
                    2.17 fails in libssp
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rlemieu at cooptel dot qc dot ca


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31088



More information about the Gcc-bugs mailing list