From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22398 invoked by alias); 7 Jul 2011 13:22:22 -0000 Received: (qmail 22386 invoked by uid 22791); 7 Jul 2011 13:22:21 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Jul 2011 13:22:02 +0000 Received: by wyg30 with SMTP id 30so773426wyg.20 for ; Thu, 07 Jul 2011 06:22:01 -0700 (PDT) Received: by 10.227.13.146 with SMTP id c18mr743156wba.5.1310044921110; Thu, 07 Jul 2011 06:22:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.155.72 with HTTP; Thu, 7 Jul 2011 06:21:41 -0700 (PDT) In-Reply-To: References: <20110605195441.GA1225@intel.com> <20110705143920.GA25294@intel.com> From: Paolo Bonzini Date: Thu, 07 Jul 2011 13:27:00 -0000 Message-ID: Subject: Re: PATCH [1/n] X32: Add initial -x32 support To: "H.J. Lu" Cc: Richard Guenther , DJ Delorie , Alexandre Oliva , Ralf Wildenhues , neroden@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00478.txt.bz2 Did you even _think_ of looking at the sh configury, and do something vaguely similar for x86? You should not duplicate t-linux64 at all. Instead, in config.gcc set m64/m32 as the default value for with_multilib_list on i386 biarch and x86_64. Pass $with_multilib_list to t-linux64 using TM_MULTILIB_CONFIG. Then, do something like comma=, MULTILIB_OPTIONS = $(subst $(comma),/,@TM_MULTILIB_CONFIG@) MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) MULTILIB_OSDIRNAMES = 64=../lib64 MULTILIB_OSDIRNAMES += 32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) MULTILIB_OSDIRNAMES += x32=../libx32 in config/t-linux64. (Each on one line, apologies for any wrapping) The option will be used as --with-multilib-list=m64,m32,mx32 (allowing the user to omit some of the variants, too). Paolo