This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
"alberico@libero.it" <alberico@libero.it> wrote:
> I tried to compile gcc-3.2 under linux for sh-elf target.
> binutils 2.13 OK
> bootstrap gcc OK
> newlib 1.10.0 OK
> when building the final compiler,
> the following will happen:
>
> In file included from ../../../../gcc-3.2/libstdc++-
> v3/libsupc++/eh_alloc.cc:33:
> /home/alberico/shtools/build-gcc/sh-elf/libstdc++-
> v3/include/cstdlib:86: `div_t ' not declared
> /home/alberico/shtools/build-gcc/sh-elf/libstdc++-
> v3/include/cstdlib:87: `
> ldiv_t' not declared
The 'cstdlib' should have in its beginning:
--------------- clip -----------------------
#ifndef _CPP_CSTDLIB
#define _CPP_CSTDLIB 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <cstddef>
#include <stdlib.h>
--------------- clip -----------------------
and the 'stdlib.h' in the newlib-headers declares
the 'div_t' and 'ldiv_t' :
--------------- clip -----------------------
typedef struct
{
int quot; /* quotient */
int rem; /* remainder */
} div_t;
typedef struct
{
long quot; /* quotient */
long rem; /* remainder */
} ldiv_t;
--------------- clip -----------------------
> If someone can help.
Please check which 'stdlib.h' your 'cstdlib' now
includes. There should be nothing with this name
in your build GCC directories, the one in the
possible 'newlib/libc/include'-subdir should though
be the same right one you got into your
$prefix/$target/include during the newlib-installation.
Any possible 'fixed' <stdlib.h> should not exist
in the '$build/gcc/include', ie. in your :
/home/alberico/shtools/build-gcc/gcc/include
If there is, you used some 'forbidden' option like
'--with-headers=' in order to get the newlib headers
'fixed' for GCC, although they should not be fixed.
Anyway the commands:
$ cd /home/alberico/shtools/build-gcc
$ find . -name stdlib.h
should easily show where you have any possible faulty
'stdlib.h' now...
Cheers, Kai
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |