* gcc 3.2 limits.h from crtstuff.c
@ 2002-09-02 15:11 David Meggy
2002-09-03 1:43 ` Rupert Wood
0 siblings, 1 reply; 5+ messages in thread
From: David Meggy @ 2002-09-02 15:11 UTC (permalink / raw)
To: gcc-help
Hi, I'm trying to cross compile a native compiler. I think there is
something wrong with the way it finds includes. My neccessary
information and errors are below. When the #include <limits.h> is made
from tsystem.h, gcc should first try ${my cross env}/include/limits.h
right? Well it using the one from ./include/limits.h. So now that this
one is calling #include_next <limits.h>, gcc can't find anymore
limits.h. According to my inserted #warnings ${my cross
env}/include/limits.h is never called.
If someone could help, it would be greatly appreciated.
Dave
My build environment consists of gcc 3.2 configured as follows
./configure --target=arm-linux --host=i386-pc-linux-gnu \
--enable-target-optspace --prefix=${my cross env} \
--enable-languages=c --disable-multilib --disable-threads \
--with-gnu-ld --disable-nls --disable-shared
and the compiler I'm trying to build was configured like this
{gcc_source_path}/configure --target=arm-linux --host=arm-linux \
--build=i386-pc-linux-gnu --prefix=${my cross runtime env} \
--enable-languages=c --disable-multilib \
--disable-threads --disable-shared
I get the following error
make[3]: Leaving directory
`/home/david/working/arm-native/arm-linux-gcc/gcc/intl'
arm-linux-gcc -O2 -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I.
-I/home/david/working/arm-native/gcc-3.2/gcc
-I/home/david/working/arm-native/gcc-3.2/gcc/.
-I/home/david/working/arm-native/gcc-3.2/gcc/config
-I/home/david/working/arm-native/gcc-3.2/gcc/../include -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions \
-c /home/david/working/arm-native/gcc-3.2/gcc/crtstuff.c -DCRT_BEGIN
\
-o crtbegin.o
In file included from
/home/david/working/arm-native/gcc-3.2/gcc/tsystem.h:84,
from
/home/david/working/arm-native/gcc-3.2/gcc/crtstuff.c:62:
include/limits.h:3:2: warning: #warning "DAVE:********I'm here"
In file included from include/limits.h:11,
from
/home/david/working/arm-native/gcc-3.2/gcc/tsystem.h:84,
from
/home/david/working/arm-native/gcc-3.2/gcc/crtstuff.c:62:
/home/david/techsol/arm-cross-v0.9/lib/gcc-lib/arm-linux/3.2/include/syslimits.h:7:25: no include path in which to find limits.h
make[2]: *** [crtbegin.o] Error 1
I put in the #warning into the file {build_dir}/gcc/include/limits.h so
I could tell which limits.h it was using.
--
~~~~~~~~~~~~~~~~~~~~~~~~
David Meggy
Engineering
Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
www.techsol.ca
eMail: dmeggy@techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 3.2 limits.h from crtstuff.c
2002-09-02 15:11 gcc 3.2 limits.h from crtstuff.c David Meggy
@ 2002-09-03 1:43 ` Rupert Wood
2002-09-03 8:07 ` David Meggy
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rupert Wood @ 2002-09-03 1:43 UTC (permalink / raw)
To: David Meggy; +Cc: gcc-help
Dave Meggy wrote:
> I think there is something wrong with the way it finds includes.
I'm not on my usual system so I can't verify this, but from memory:
> According to my inserted #warnings ${my cross env}/include/limits.h
> is never called.
I've had disagreements in the past about where things should live, but I
think the headers should be in
$(my cross env)/arm-linux/sys-include
and libraries
$(my cross env)/arm-linux/lib
These are the paths used by GCC's configure's --with-headers and
--with-libs. Kai on the crossgcc list will tell you that the headers
should actually go in
$(my cross env)/arm-linux/include
but I think he's wrong :-)
> and the compiler I'm trying to build was configured like this
> {gcc_source_path}/configure --target=arm-linux --host=arm-linux \
> --build=i386-pc-linux-gnu --prefix=${my cross runtime env} \
> --enable-languages=c --disable-multilib \
> --disable-threads --disable-shared
Since you're neither specifying --with-headers or --with-libs (which is
fine if they're already in place) you need to specify --without-newlib.
Hope that helps,
Rup.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 3.2 limits.h from crtstuff.c
2002-09-03 1:43 ` Rupert Wood
@ 2002-09-03 8:07 ` David Meggy
2002-09-03 8:53 ` David Meggy
2002-09-03 9:17 ` David Meggy
2 siblings, 0 replies; 5+ messages in thread
From: David Meggy @ 2002-09-03 8:07 UTC (permalink / raw)
To: Rupert Wood; +Cc: gcc-help
Ok, I tried just making a soft links for
$(my cross env)/arm-linux/sys-include to $(my cross env)/include
$(my cross env)arm-linux/include to $(my cross env)/include
$(my cross env)arm-linux/lib to $(my cross env)/lib
Which had exactly the same error. Also when I try to add
--with-headers, gcc gives me the following message
*** --with-headers is only supported when cross compiling
Note: I'm trying to make a native compiler, using a cross compiler.
Dave
On Tue, 2002-09-03 at 01:43, Rupert Wood wrote:
> I've had disagreements in the past about where things should live, but I
> think the headers should be in
>
> $(my cross env)/arm-linux/sys-include
>
> and libraries
>
> $(my cross env)/arm-linux/lib
>
> These are the paths used by GCC's configure's --with-headers and
> --with-libs. Kai on the crossgcc list will tell you that the headers
> should actually go in
>
> $(my cross env)/arm-linux/include
>
> but I think he's wrong :-)
>
> > and the compiler I'm trying to build was configured like this
> > {gcc_source_path}/configure --target=arm-linux --host=arm-linux \
> > --build=i386-pc-linux-gnu --prefix=${my cross runtime env} \
> > --enable-languages=c --disable-multilib \
> > --disable-threads --disable-shared
>
> Since you're neither specifying --with-headers or --with-libs (which is
> fine if they're already in place) you need to specify --without-newlib.
>
> Hope that helps,
> Rup.
>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~
David Meggy
Engineering
Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
www.techsol.ca
eMail: dmeggy@techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 3.2 limits.h from crtstuff.c
2002-09-03 1:43 ` Rupert Wood
2002-09-03 8:07 ` David Meggy
@ 2002-09-03 8:53 ` David Meggy
2002-09-03 9:17 ` David Meggy
2 siblings, 0 replies; 5+ messages in thread
From: David Meggy @ 2002-09-03 8:53 UTC (permalink / raw)
To: Rupert Wood; +Cc: gcc-help
I'm pretty sure there is something wrong with isystem, #include_next.
According to the gcc manual
-isystem dir
Search dir for header files, after all directories specified by -I
but before the standard system directories. Mark it as a system
directory, so that it gets the same special treatment as is applied to
the standard system directories.
Which is correct so #include_next should get the C-lib version. Which I
know it finds normally because the following program works.
#include <limits.h>
int main() { return 0; }
and when I enter a #warning statement inside the c-lib limits.h it finds
it. eg.
~/tmp$ arm-linux-gcc Dave.c
In file included from Dave.c:1:
/home/david/techsol/arm-cross-v0.9/include/limits.h:22:2: warning:
#warning Dave:C-lib limits.h
Dave
On Tue, 2002-09-03 at 01:43, Rupert Wood wrote:
> Dave Meggy wrote:
>
> > I think there is something wrong with the way it finds includes.
>
> I'm not on my usual system so I can't verify this, but from memory:
>
> > According to my inserted #warnings ${my cross env}/include/limits.h
> > is never called.
>
> I've had disagreements in the past about where things should live, but I
> think the headers should be in
>
> $(my cross env)/arm-linux/sys-include
>
> and libraries
>
> $(my cross env)/arm-linux/lib
>
> These are the paths used by GCC's configure's --with-headers and
> --with-libs. Kai on the crossgcc list will tell you that the headers
> should actually go in
>
> $(my cross env)/arm-linux/include
>
> but I think he's wrong :-)
>
> > and the compiler I'm trying to build was configured like this
> > {gcc_source_path}/configure --target=arm-linux --host=arm-linux \
> > --build=i386-pc-linux-gnu --prefix=${my cross runtime env} \
> > --enable-languages=c --disable-multilib \
> > --disable-threads --disable-shared
>
> Since you're neither specifying --with-headers or --with-libs (which is
> fine if they're already in place) you need to specify --without-newlib.
>
> Hope that helps,
> Rup.
>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~
David Meggy
Engineering
Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
www.techsol.ca
eMail: dmeggy@techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 3.2 limits.h from crtstuff.c
2002-09-03 1:43 ` Rupert Wood
2002-09-03 8:07 ` David Meggy
2002-09-03 8:53 ` David Meggy
@ 2002-09-03 9:17 ` David Meggy
2 siblings, 0 replies; 5+ messages in thread
From: David Meggy @ 2002-09-03 9:17 UTC (permalink / raw)
To: Rupert Wood; +Cc: gcc-help
This was from compiling "arm-linux-gcc -v -isystem . test.c -c"
I guess the soft links screwed it up.
Dave
GNU C version 3.2 (arm-linux)
compiled by GNU C version 2.95.4 20011002 (Debian prerelease).
ignoring duplicate directory
"/home/david/techsol/arm-cross-v0.9/arm-linux/sys-include"
ignoring duplicate directory
"/home/david/techsol/arm-cross-v0.9/arm-linux/include"
#include "..." search starts here:
#include <...> search starts here:
.
/home/david/techsol/arm-cross-v0.9/include
/home/david/techsol/arm-cross-v0.9/lib/gcc-lib/arm-linux/3.2/include
End of search list.
On Tue, 2002-09-03 at 01:43, Rupert Wood wrote:
> Dave Meggy wrote:
>
> > I think there is something wrong with the way it finds includes.
>
> I'm not on my usual system so I can't verify this, but from memory:
>
> > According to my inserted #warnings ${my cross env}/include/limits.h
> > is never called.
>
> I've had disagreements in the past about where things should live, but I
> think the headers should be in
>
> $(my cross env)/arm-linux/sys-include
>
> and libraries
>
> $(my cross env)/arm-linux/lib
>
> These are the paths used by GCC's configure's --with-headers and
> --with-libs. Kai on the crossgcc list will tell you that the headers
> should actually go in
>
> $(my cross env)/arm-linux/include
>
> but I think he's wrong :-)
>
> > and the compiler I'm trying to build was configured like this
> > {gcc_source_path}/configure --target=arm-linux --host=arm-linux \
> > --build=i386-pc-linux-gnu --prefix=${my cross runtime env} \
> > --enable-languages=c --disable-multilib \
> > --disable-threads --disable-shared
>
> Since you're neither specifying --with-headers or --with-libs (which is
> fine if they're already in place) you need to specify --without-newlib.
>
> Hope that helps,
> Rup.
>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~
David Meggy
Engineering
Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
www.techsol.ca
eMail: dmeggy@techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-09-03 16:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-02 15:11 gcc 3.2 limits.h from crtstuff.c David Meggy
2002-09-03 1:43 ` Rupert Wood
2002-09-03 8:07 ` David Meggy
2002-09-03 8:53 ` David Meggy
2002-09-03 9:17 ` David Meggy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).