From patchwork Sat May 6 11:50:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 90734 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1005314vqo; Sat, 6 May 2023 04:53:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tZGR+uGzme4Afcp9uFNiEfvoBEB8M66WplKv/jdSycYKIT+b04BwUZ48hquZq4BlHuPpf X-Received: by 2002:a17:907:720b:b0:94e:ec0f:5f70 with SMTP id dr11-20020a170907720b00b0094eec0f5f70mr4830095ejc.10.1683374015506; Sat, 06 May 2023 04:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683374015; cv=none; d=google.com; s=arc-20160816; b=fMnJ59BPWxEN2GGIXaGrDoAva6txyj4D8n/WLa2jm+/ZdtLbpuStXDVVd0GCfxD9o5 RGcvHh/cSnsrsJMCGwKqXNrqXIcsZtbS0AsBTnUNsBz4g3nq0dEIdsObwRNSgnxBdOPd fEWpH17Ebdfxzuzh/X3/i0Viu6pH27Pxf1hAGHpdecoBea7Z9cDv4FiMxvcSR7rHA4Nt zOeyAp1erhV07N4/TdRTongVSHD+n5aNA2YxyLvm7LVhYIkGjKR11cL6dYyGLxxsn1ue DMFBKr4rkoIr2ty0z15q6pZBVmF/RoQ5Lhc04kGJaZ6zkRBqTHfv1mMpVRAg74weq2LT GT4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:user-agent :organization:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=cCaUdIYa8PI5Uo9Ul1LQrCUEU0kvBdgpCPqe2/yBatU=; b=WxFwltawW4x/PUH+1WHWpzmdHX1htwO7A7+7D0nR7c4wJaCdslCISlvhRskv2dcjAM OHuLkhPMtc7yW7MKu6OuS+oEIkxKCOpt9vVr00JqnPUzXvFXVaPrbF3zVD0DCFGtjj8i uhUl43BJkalW6YzyTIeYj0WkLRTdszMa5F6RKLpd3vk2iO96VXYCye9iZ8VGaKmRyqdw 4wKcBuceEWUc3e5eC+XCyTFOZIJL3Gw11uruxABooXdq2wK0NouY51UqLzllaKhrJAVc EC7X6rKggjjZqZlLpX3SFgkXbh5vKWeruVh48vZtHi6zPceT08bbZS5apVktjBs7pP7E 7oNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=QiRUT4Jn; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r10-20020a056402034a00b0050bf820398asi5962520edw.371.2023.05.06.04.53.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 04:53:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=QiRUT4Jn; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A3313858414 for ; Sat, 6 May 2023 11:53:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A3313858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683374014; bh=cCaUdIYa8PI5Uo9Ul1LQrCUEU0kvBdgpCPqe2/yBatU=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=QiRUT4JnGHvce3U6Z50Z8QEdMjr1pCfgeQj/hvFtZkihJ7ULooUxcOmxZYTsnyzfu gtdnx66eveo3y2XKxmG7Mkwk2CzkAsJNNdGFlLgoqUIinA/5PH4qdCWmKgp8XTmZNo efx/ZlrnR9t0L/F7JqNSjcRkFJRTigWWfaRUuHSs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from fencepost.gnu.org (fencepost.gnu.org [IPv6:2001:470:142:3::e]) by sourceware.org (Postfix) with ESMTPS id 21BCF3858D28 for ; Sat, 6 May 2023 11:52:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21BCF3858D28 Received: from lfbn-bor-1-1163-184.w92-158.abo.wanadoo.fr ([92.158.138.184] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvGT3-0002bU-TN; Sat, 06 May 2023 07:52:50 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pvGQu-009Z5D-2S; Sat, 06 May 2023 13:50:36 +0200 Date: Sat, 6 May 2023 13:50:36 +0200 To: gcc-patches@gcc.gnu.org Cc: Thomas Schwinge , bug-hurd@gnu.org Subject: [PATCH] hurd: Add multilib paths for gnu-x86_64 Message-ID: <20230506115036.pvng4w6wztcimzrh@begin> Mail-Followup-To: gcc-patches@gcc.gnu.org, Thomas Schwinge , bug-hurd@gnu.org References: <20110413064931.woxgk0qnqm8swoow-nzlynne@webmail.spamcop.net> <874jrt25bb.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <874jrt25bb.fsf@euler.schwinge.homeip.net> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Samuel Thibault via Gcc-patches From: Samuel Thibault Reply-To: Samuel Thibault Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765145591985669949?= X-GMAIL-MSGID: =?utf-8?q?1765145591985669949?= We need the multilib paths in gcc to find e.g. glibc crt files on Debian. This is essentially based on t-linux64 version. gcc/ChangeLog: * gcc/config/i386/t-gnu64: New file. * gcc/config.gcc [x86_64-*-gnu*): Add i386/t-gnu64 to tmake_file. diff --git a/gcc/config.gcc b/gcc/config.gcc index 671c7e3b018..6b1939b9f09 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -5828,6 +5828,9 @@ case ${target} in visium-*-*) target_cpu_default2="TARGET_CPU_$with_cpu" ;; + x86_64-*-gnu*) + tmake_file="$tmake_file i386/t-gnu64" + ;; esac t= diff --git a/gcc/config/i386/t-gnu64 b/gcc/config/i386/t-gnu64 index e69de29bb2d..23ee6823d65 100644 --- a/gcc/config/i386/t-gnu64 +++ b/gcc/config/i386/t-gnu64 @@ -0,0 +1,38 @@ +# Copyright (C) 2002-2023 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# On Debian, Ubuntu and other derivative distributions, the 32bit libraries +# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to +# /lib and /usr/lib, while other distributions install libraries into /lib64 +# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64, +# it doesn't tell anything about the 32bit libraries on those systems. Set +# MULTILIB_OSDIRNAMES according to what is found on the target. + +# To support i386, x86-64 and x32 libraries, the directory structrue +# should be: +# +# /lib has i386 libraries. +# /lib64 has x86-64 libraries. +# /libx32 has x32 libraries. +# +comma=, +MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) +MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu) +MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu) +MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32)