This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ping] Re: [patch v2] support for multiarch systems
- From: Ian Lance Taylor <iant at google dot com>
- To: Matthias Klose <doko at ubuntu dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Joseph S. Myers" <joseph at codesourcery dot com>, Paolo Bonzini <bonzini at gnu dot org>, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Tue, 7 Aug 2012 07:07:40 -0700
- Subject: Re: [ping] Re: [patch v2] support for multiarch systems
- References: <4E501045.40102@ubuntu.com> <4FF9D5F7.6090505@ubuntu.com> <5020EE69.4020102@ubuntu.com>
On Tue, Aug 7, 2012 at 3:31 AM, Matthias Klose <doko@ubuntu.com> wrote:
> ping?
>
> On 08.07.2012 20:48, Matthias Klose wrote:
>> Please find attached v2 of the patch updated for trunk 20120706, x86 only, tested on
>> x86-linux-gnu, KFreeBSD and the Hurd.
> +[case "${withval}" in
> +yes|no|auto-detect) enable_multiarch=$withval;;
> +*) AC_MSG_ERROR(bad value ${withval} given for --enable-multiarch option) ;;
Please just use "auto", not "auto-detect", as in libgcc/configure.ac.
> +# needed for setting the multiarch name on ARM
> +AC_SUBST(with_float)
This seems like it should be in a different patch.
> +with_float = @with_float@
Likewise.
+ifeq ($(enable_multiarch),yes)
+ if_multiarch = $(1)
+else ifeq ($(enable_multiarch),auto-detect)
+ if_multiarch = $(if $(wildcard $(shell echo
$(SYSTEM_HEADER_DIR))/../../usr/lib/*/crti.o),$(1))
+else
+ if_multiarch =
+endif
This is nicely tricky but I don't understand why you are doing this in
such a confusing way. Why not simply set the names in config.gcc?
What information do you have at make time that you don't have at
configure time?
The auto case is not general. When cross-compiling without --sysroot,
or when using --native-system-header-dir, the test won't work.
Without --sysroot there may not be much that you can do to auto-detect
multiarch. And with --sysroot, there should be no need to use
SYSTEM_HEADER_DIR at all; just look in the sysroot.
> +@item --enable-multiarch
> +Specify wether to enable or disable multiarch support. The default is
> +to detect for glibc start files in a multiarch location, and enable it
> +if the files are found.
This is quite obscure for anybody who does not already know what multiarch is.
I'm sorry, I have to repeat my extreme annoyance that this scheme
breaks all earlier GCC releases.
Ian