This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
generating libraries when cross compiling
- To: egcs-bugs at cygnus dot com
- Subject: generating libraries when cross compiling
- From: Herman ten Brugge <Haj dot Ten dot Brugge at net dot HCC dot nl>
- Date: Sun, 25 Oct 1998 09:30:02 +0000 (WET)
Hello,
I found a problem in the Makefile when generating code for a cross compiler.
The cross compiler I generate is for the c4x target.
When I compile the c-preprocessor the Makefile generates:
gcc -DCROSS_COMPILE -DIN_GCC -O2 -DHAVE_CONFIG_H -I. -I. -I./config -I./../include \
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/c4x/egcs-2.92.16/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/c4x/egcs-2.92.16/../../../..`echo /usr/local | sed -e 's|^/usr/local||' -e 's|/^/*|/..|g'`/include/g++-2\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/c4x/egcs-2.92.16/../../../../c4x/sys-include\" \
-DTOOL_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/c4x/egcs-2.92.16/../../../../c4x/include\" \
-c `echo ./cccp.c | sed 's,^\./,,'`
Building the gcc directory works fine. When I want to compile the libiberty
directory the newly generated compiler can not find my include files
because the directory:
"/usr/local/lib/gcc-lib/c4x/egcs-2.92.16/../../../../c4x/include"
does not exist. This directory will only exist after installing egcs.
The egcs-1.1a compile flags are:
gcc -DCROSS_COMPILE -DIN_GCC -g -DHAVE_CONFIG_H -I. -I. -I./config \
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/c4x/egcs-2.91.57/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/include/g++\" \
-DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/local/c4x/sys-include\" \
-DTOOL_INCLUDE_DIR=\"/usr/local/c4x/include\" \
-c `echo ./cccp.c | sed 's,^\./,,'`
Now the directory "/usr/local/c4x/include" can be found and the generation
works.
Why has this changed? How can I correctly generate egcs for the c4x target?
I now do a mkdir -p "/usr/local/lib/gcc-lib/c4x/egcs-2.92.16" during the
generation of egcs.
Herman.
--
-------------------------------------------------------------------------
Herman ten Brugge Email: Haj.Ten.Brugge@net.HCC.nl