This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ and $PREFIX/include
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Anthony Green <green at redhat dot com>, Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: "David O'Brien" <obrien at FreeBSD dot org>, Benjamin Kosnik <bkoz at redhat dot com>, gcc at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Mon, 01 Sep 2003 08:09:03 -0500
- Subject: Re: GCJ and $PREFIX/include
- Reply-to: gnustuff at thisiscool dot com
>>>> It's not just that. Cross compilers (rightly) don't look in
>>>> $PREFIX/include, so you can't properly build CNI code with a cross g++.
For whatever it's worth, this problem seems even worse with a crossed-native
gcc too and affects things like JNI in Java. Here are my post-build "cleanup"
scripts for my cross compiler (build=host, host!=target) and crossed-native compiler
(build!=host, host=target) builds. I'm sorry I didn't follow through on this enough to
report this or submit a real patch.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
export MINGW32_TARGET_NAME=i686-pc-mingw32
Cross Compiler
# Fix up directories
mv -f $XGCC_DIR/include/*.h $XGCC_DIR/$MINGW32_TARGET_NAME/include
for pkgdir in gcj gnu java javax
do
rm -Rf $XGCC_DIR/$MINGW32_TARGET_NAME/include/$pkgdir 2>/dev/null
mv $XGCC_DIR/include/$pkgdir $XGCC_DIR/$MINGW32_TARGET_NAME/include
done
Crossed-Native Compiler
mv -f $WINGCC_DIR/lib/lib* $WINGCC_DIR/$MINGW32_TARGET_NAME/lib
mv -f $WINGCC_DIR/include/*.h $WINGCC_DIR/$MINGW32_TARGET_NAME/include
for pkgdir in gcj gnu java javax
do
rm -Rf $WINGCC_DIR/$MINGW32_TARGET_NAME/include/$pkgdir 2>/dev/null
mv $WINGCC_DIR/include/$pkgdir $WINGCC_DIR/$MINGW32_TARGET_NAME/include
done