GCJ and $PREFIX/include
Mohan Embar
gnustuff@thisiscool.com
Mon Sep 1 13:09:00 GMT 2003
>>>> 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
More information about the Java
mailing list