This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: Add Go support to top level configure and Makefiles


* Ian Lance Taylor wrote on Thu, Nov 18, 2010 at 10:33:34PM CET:
> This patch adds Go support to the top level configure.ac and
> Makefile.tpl/Makefile.def.  The Go support isn't actually committed yet;
> this is just in preparation.  Since the directories are not present this
> will have no particular effect, just as if one downloaded the gcc-core
> tarball without additional language support.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu.  OK for mainline?

This patch looks straight-forward with the exception of one hunk, see
below.

Thanks,
Ralf

> 2010-11-18  Ian Lance Taylor  <iant@google.com>
> 	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
> 
> 	* configure.ac: Add target-libgo to target_libraries.  Set
> 	and substitute GOC_FOR_BUILD and GOC_FOR_TARGET.  If we are building
> 	target-libgo, build target-libffi.
> 	* Makefile.tpl (BUILD_EXPORTS): Add GOC and GOCFLAGS.
> 	(HOST_EXPORTS): Add GOC.
> 	(BASE_TARGET_EXPORTS): Add GOC.
> 	(GOC_FOR_BUILD, GOCFLAGS, GOC_FOR_TARGET): New variables.
> 	(GOCFLAGS_FOR_TARGET): New variable.
> 	(EXTRA_HOST_FLAGS): Add GOC.
> 	(EXTRA_TARGET_FLAGS): Add GOC and GOCFLAGS.
> 	* Makefile.def (target_modules): Add libgo.
> 	(flags_to_pass): Add GOC_FOR_TARGET and GOCFLAGS_FOR_TARGET.
> 	(dependencies): Add dependency from configure-target-libgo to
> 	configure-target-libffi and all-target-libstdc++-v3.  Add
> 	dependencies from all-target-libgo to all-target-libffi.
> 	(languages): Add go.
> 	* configure: Rebuild.
> 	* Makefile.in: Rebuild.

> --- configure.ac	(revision 166919)
> +++ configure.ac	(working copy)

> @@ -1990,6 +1993,14 @@ for dir in . $skipdirs $noconfigdirs ; d
>    fi
>  done
>  
> +# If target-libgo is in $target_configdirs, then put target-libffi in
> +# there too.  It may have been removed because it is currently treated
> +# as a Java target library.
> +if echo " ${target_configdirs} " | grep " target-libgo " >/dev/null 2>&1 \
> +   && test -f $srcdir/libgo/configure -a -f $srcdir/libffi/configure; then

Prefer '&& test' instead of -a.

Conceptually, this code is the wrong thing to do: it should not happen
after the $skipdirs and $noconfigdirs elimination.  That may not have
any impact on the systems that gccgo currently works on, but the code
might be ported; and the snippet may set a precedent for other code.

I think the logic could come shortly before the noconfigdirs
elimination.


Aside, I see that libgo/configure handles --disable-libffi.  Since this
option is also used at the toplevel to disable the libffi target
directories, that seems to imply that, if used, it is always an in-tree
libffi that is used.  Is that correct?

> +  target_configdirs="${target_configdirs} target-libffi"
> +fi
> +
>  # Sometimes the tools are distributed with libiberty but with no other
>  # libraries.  In that case, we don't want to build target-libiberty.
>  # Don't let libgcc imply libiberty either.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]