This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: libstdc++-v3 should not get CXX cached in <target>/config.cache
- To: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Subject: Re: libstdc++-v3 should not get CXX cached in <target>/config.cache
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Mon, 6 Nov 2000 20:38:56 -0800 (PST)
- Cc: libstdc++ at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org, java-patches at sources dot redhat dot com, Benjamin Kosnik <bkoz at redhat dot com>
- References: <orvgu46xeu.fsf@guarana.lsd.ic.unicamp.br>
- Reply-To: apbianco at cygnus dot com
Alexandre Oliva writes:
> Ben, sorry that I couldn't get to it before your vacations. Alex,
> please let me know if this, plus your changes to libstdc++.INC, help
> you build libjava.
No. It doesn't. In order for me to get libtool not confused about the
tag is to apply this patch. As for libstdc++-v3, I got a libstdc++.INC
patch that needs some more work, dixit Benjamin.
I guess this patch isn't fixing the root of the problem, I'm just
posting it to show you what happens (or doesn't ;-)
./A
2000-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* configure.in (libstdcxx_flags): Append the -Ls after the result of
switch.
(flags_for_target): Initialize.
(CXX_FOR_TARGET): Append $flags_for_target or insert appropriately
if libstdcxx_flags features a switch.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/configure.in,v
retrieving revision 1.72
diff -u -p -r1.72 configure.in
--- configure.in 2000/09/13 17:11:04 1.72
+++ configure.in 2000/11/07 00:11:10
@@ -51,7 +51,7 @@ fi
if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then
libstdcxx_version="target-libstdc++-v3"
# Don't use libstdc++-v3's flags to configure/build itself.
- libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
+ libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs `case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac`'
else
libstdcxx_version="target-libio target-libstdc++"
libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio -isystem $$r/$(TARGET_SUBDIR)/libio -L$$r/$(TARGET_SUBDIR)/libstdc++'
@@ -1335,19 +1335,28 @@ case $CHILL_FOR_TARGET in
*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
+# Store in flags_for_target whether we should add $(FLAGS_FOR_TARGET).
+case $CXX_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') flags_for_target='' ;;
+*) flags_for_target='$(FLAGS_FOR_TARGET)';;
+esac
+
if test "x${CXX_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
+ # If using libstdcxx_flags, insert flags_for_target at the right
+ # place, that is, right before the case.
+ libstdcxx_flags=`echo $libstdcxx_flags | \
+ sed 's/ \`case/ '$flags_for_target' \`case/'`
CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
elif test "$host" = "$target"; then
- CXX_FOR_TARGET='$(CXX)'
+ # I hope this is the right insertion point
+ CXX_FOR_TARGET='$(CXX) '$flags_for_target
else
CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
+ # I hope this is the right insertion point
+ CXX_FOR_TARGET="$CXX_FOR_TARGET $flags_for_target"
fi
-case $CXX_FOR_TARGET in
-*' $(FLAGS_FOR_TARGET)') ;;
-*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
-esac
qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'`
targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"