This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Support --enable-build-with-cxx at top level
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Paolo Bonzini <bonzini at gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Jun 2009 21:01:33 +0200
- Subject: Re: PATCH RFA: Support --enable-build-with-cxx at top level
- References: <m3eitdxd48.fsf@pepe.airs.com> <4A3F3986.4050400@gnu.org> <m31vpcf6u9.fsf@google.com>
Hello Ian,
can you also address these in your planned followup?
* Ian Lance Taylor wrote on Mon, Jun 22, 2009 at 08:42:38PM CEST:
> --- gcc/doc/install.texi (revision 148809)
> +++ gcc/doc/install.texi (working copy)
> +@item --with-boot-libs=@var{libs}
> +This option may be used to set libraris to be used when linking stage 2
libraries
> +and later when bootstrapping GCC. The default is the argument to
> +@option{--with-host-libstdcxx}, if specified.
> --- gcc/configure.ac (revision 148809)
> +++ gcc/configure.ac (working copy)
> @@ -3721,6 +3735,13 @@ esac],
> AC_SUBST(GGC)
> echo "Using $GGC for garbage collection."
>
> +# Libraries to use on the host. This will normally be set by the top
> +# level Makefile. Here we simply capture the value for our Makefile.
> +if ! test -n "${HOST_LIBS+set}"; then
! command
is not portable sh in practice, but
if test !
is; but I guess
if test -z
should be the clearest choice here, even if GCC otherwise requires a
shell that understands the construct you used.
> + HOST_LIBS=
> +fi
> +AC_SUBST(HOST_LIBS)
> --- configure.ac (revision 148809)
> +++ configure.ac (working copy)
> @@ -1422,10 +1428,59 @@ case $with_host_libstdcxx in
> ;;
> esac
>
> +# Linker flags to use for stage1 or when not boostrapping.
> +AC_ARG_WITH(stage1-ldflags,
> +[ --with-stage1-ldflags=FLAGS Linker flags for stage1],
> +[if test $withval = no -o $withval = yes; then
Not quoting $withval here is dangerous. If it happens to be empty,
because the FLAGS part was passed empty, then test sees 5 arguments
and barfs. The most conservative quoting is something like
x"$withval"
as some old test programs (or shells) do the wrong thing when the
arguments start with a hyphen. Several instances.
> + stage1_ldflags=
> + else
> + stage1_ldflags=$withval
> + fi],
> +[stage1_ldflags=])
> +AC_SUBST(stage1_ldflags)
Cheers,
Ralf