From patchwork Thu Jun 28 11:25:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 167858 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F3CD2B7008 for ; Thu, 28 Jun 2012 21:26:29 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1341487590; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:CC:Subject:In-Reply-To:References:User-Agent: Date:Message-ID:MIME-Version:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=+GqX4KHuItOCPMokL31d9WrFC+E=; b=vCXJ/AcqMLEZQOj3a5a60pftakPkwRTgKsbHfFDlReXJeGELDxoegra9iiJS7l VUG1fR164BuPJQ7E3g8IG9rfoXo42QewiUPrJZI5K7GyVLf3wi0o+oeIAi95+Oxf /X67eRnb/03KqkeSL46L6Rerswdqn4RC2l1A0KwVpMKqg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:CC:Subject:In-Reply-To:References:User-Agent:Date:Message-ID:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=T2upg8W7P0amzjv10sZTSuJFfNctKhZMhPZARsi5xL6DbRXnKIxK2I03i6UzLl zJq9W5N/YwuFdwm3zHx8DEyUfc7z4LImxDnk2ciZBbj9zBke07Kyk5/qZDUw8JOw AJ+iB8qwjR+3ZEbcwo/G/2HuymFL3WA6uB3tfqCAgucqU=; Received: (qmail 3350 invoked by alias); 28 Jun 2012 11:26:25 -0000 Received: (qmail 3341 invoked by uid 22791); 28 Jun 2012 11:26:24 -0000 X-SWARE-Spam-Status: No, hits=-8.0 required=5.0 tests=AWL, BAYES_00, KHOP_PGP_SIGNED, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jun 2012 11:26:11 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SkCrR-0000AL-Ch from Thomas_Schwinge@mentor.com ; Thu, 28 Jun 2012 04:26:09 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 28 Jun 2012 04:26:08 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Thu, 28 Jun 2012 12:26:07 +0100 From: Thomas Schwinge To: Matthias Klose CC: , Paolo Bonzini , "Joseph S. Myers" Subject: Re: [patch] support for multiarch systems In-Reply-To: <4FEC350F.7070309@ubuntu.com> References: <4E501045.40102@ubuntu.com> <4FE85BE3.2080008@ubuntu.com> <4FE88F8E.5030100@ubuntu.com> <87zk7n7o17.fsf@schwinge.name> <4FEC350F.7070309@ubuntu.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 28 Jun 2012 13:25:45 +0200 Message-ID: <87txxv7k5i.fsf@schwinge.name> MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi! On Thu, 28 Jun 2012 12:42:23 +0200, Matthias Klose wrote: > On 28.06.2012 12:01, Thomas Schwinge wrote: > > On Mon, 25 Jun 2012 18:19:26 +0200, Matthias Klose > > wrote: > >> On 25.06.2012 15:56, Joseph S. Myers wrote: > >>> On Mon, 25 Jun 2012, Matthias Klose wrote: > >>> > >>>> Please find attached the patch updated for trunk 20120625, x86 only, > >>>> tested on x86-linux-gnu, KFreeBSD and the Hurd. > > > >> 2012-06-25 Matthias Klose > >> > >> * doc/invoke.texi: Document -print-multiarch. * doc/install.texi: > >> Document --enable-multiarch. * doc/fragments.texi: Document > >> MULTILIB_OSDIRNAMES, MULTIARCH_DIRNAME. * configure.ac: Add > >> --enable-multiarch option. * configure.in: Regenerate. * Makefile.in > >> (s-mlib): Pass MULTIARCH_DIRNAME to genmultilib. enable_multiarch, > >> with_float: New macros. if_multiarch: New macro, define in terms of > >> enable_multiarch. * genmultilib: Add new argument for the multiarch > >> name. * gcc.c (multiarch_dir): Define. (for_each_path): Search for > >> multiarch suffixes. (driver_handle_option): Handle multiarch option. > >> (do_spec_1): Pass -imultiarch if defined. (main): Print multiarch. > >> (set_multilib_dir): Separate multilib and multiarch names from > >> multilib_select. (print_multilib_info): Ignore multiarch names in > >> multilib_select. * incpath.c (add_standard_paths): Search the multiarch > >> include dirs. * cppdeault.h (default_include): Document multiarch in > >> multilib member. * cppdefault.c: [LOCAL_INCLUDE_DIR, > >> STANDARD_INCLUDE_DIR] Add an include directory for multiarch > >> directories. * common.opt: New options --print-multiarch and -imultilib. > >> * config.gcc: Add tmake fragments to tmake_file ( i386/t-kfreebsd for > >> i[34567]86-*-kfreebsd*-gnu and x86_64-*-kfreebsd*-gnu, i386/t-gnu for > >> i[34567]86-*-gnu*). * config/i386/t-kfreebsd: Add multiarch names in > >> MULTILIB_OSDIRNAMES, define MULTIARCH_DIRNAME. * config/i386/t-linux64: > >> Likewise. * config/i386/t-linux: Define MULTIARCH_DIRNAME. * > >> config/i386/t-gnu: Likewise. > > > > As I said before, »config/i386/t-{gnu,kfreebsd,linux}« are new files. > > Instead of repeating: my comments from > > > > > > > as well as the follow-up still hold. > > Like > > * config/i386/t-gnu: New, define MULTIARCH_DIRNAME. > > ? I'd use: * config/i386/t-gnu: New file. * config/i386/t-kfreebsd: Likewise. * config/i386/t-linux: Likewise. Plus the following instead of your changes: gcc/ * config.gcc (tmake_file): Include i386/t-linux. (tmake_file): Include i386/t-kfreebsd. (tmake_file): Include i386/t-gnu. Otherwise, I can't imagine how that would work. Grüße, Thomas diff --git a/gcc/config.gcc b/gcc/config.gcc index 7ec184c..39c70f2 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3481,9 +3481,14 @@ case ${target} in i[34567]86-*-darwin* | x86_64-*-darwin*) ;; - i[34567]86-*-linux* | x86_64-*-linux* | \ - i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \ - i[34567]86-*-gnu*) + i[34567]86-*-linux* | x86_64-*-linux*) + tmake_file="$tmake_file i386/t-linux" + ;; + i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu) + tmake_file="$tmake_file i386/t-kfreebsd" + ;; + i[34567]86-*-gnu*) + tmake_file="$tmake_file i386/t-gnu" ;; i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*) ;;