From patchwork Sat Oct 28 19:19:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 159285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp1364785vqb; Sat, 28 Oct 2023 12:20:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEf1aoZOjF/M0qUXSrWhtyaHk7dIGyvvvbn9bXLBBcqNQSnjma5zXsrERQycvRLs9HKkRza X-Received: by 2002:a05:622a:144b:b0:418:a0f:90e9 with SMTP id v11-20020a05622a144b00b004180a0f90e9mr7448827qtx.1.1698520827753; Sat, 28 Oct 2023 12:20:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698520827; cv=pass; d=google.com; s=arc-20160816; b=r96XVRJ6BHmXMqjL9q98cLSjzC1Fe9AoEs+5jzbYfADlMu9bzJktfCTq+67qC2JzbV O74NgGwdyRBxZI0RmjZkQph9HirCn7jt15GPYFA/U1X6/D5a/i21gd/dHAJcN47DZt3i YK7HRxgYlnEzCqrivuLM3TRJ77oQ+zZES7gwqPlMZaNgnCE1m9J0NGBmO77RwUp9iC3/ UQd+GQoqjHPnKszGPosKyw9s2RQ0CkQT3THHKns1Eyn7dqDlWFwTCU5xF4VgUHCjGa+z dWaIbG/KCg0CVdG1UkrugLivTt7wKgLWfNulopsn1N46HXuto4tM3EbveqWAn+0tUYOq OEBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:user-agent:organization :content-disposition:mime-version:mail-followup-to:message-id :subject:cc:to:from:date:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=cCaUdIYa8PI5Uo9Ul1LQrCUEU0kvBdgpCPqe2/yBatU=; fh=pzOnVYvpYgdfXppMsQPEzVURPG8LisOd71qvf1JtnTM=; b=D7vDB+U/dsXZFwl4tfvF5z9a5oyfzZHiyOcj091sBD56QPzRK0X/1pFjSvqmlaVamj 7DoBas71g2WZBtoINDxqOlSLIKikv6ilHBt62cKU2PpMpWrB15C2L3kGvb2q7zUScZvA bShuMOt1x6RfoGv67DaWikaEms7GS6+bZO4B3gOhO6KH7/wkxwP8Bw8/tjz4rVqcs9iD hteMcvzJ4sYgUzD0xz+fbPFBW8QFZZyClPE4G4ga9Op60hrzgS0dU+TU57aTnvoCL2c6 g6qF4+c1+LhpLcMmpKQTtV8M+gapj5WQ7cD+CV9b/PMRXrYeLCcGaYZaVoOSw3Wq9vUq wAEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gnu.org header.s=fencepost-gnu-org header.b=k91UWV5O; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d8-20020a05622a100800b0041816d65a98si2820542qte.421.2023.10.28.12.20.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 12:20:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gnu.org header.s=fencepost-gnu-org header.b=k91UWV5O; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 86D4E38618C8 for ; Sat, 28 Oct 2023 19:20:27 +0000 (GMT) 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 9AF78385C6FC for ; Sat, 28 Oct 2023 19:20:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9AF78385C6FC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9AF78385C6FC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698520806; cv=none; b=oGlJG/9bizhin+d67cJnRkZuz/mXyjxUYYjE2O4nLeE3qsy7Yf35fk/uDSuGn3iTJA9agjlVGyJETY38o78ByljP7wdDwdTmugnzBUJ6v+fSl74dfqIAMD8wTa/yXyXWwSkRLNm6KG00JFnvsSSxvkcgSImHnFy99EW+0673gFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698520806; c=relaxed/simple; bh=iGtrmRt1jLH2rcP4x1VGJMWv6BxHNCGxcl9rOBitv90=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=IWRTeo2Bbx7Pns7AvKsw+DN1aMZ6/kcSUmsV9107mb/puBK2lPsIST3+s+qYFdrejQ/Tu0NsVRoGYYFD6GC9P5h2XVpSkcJnkbTJleAiyJgTWGbEiV+y/KvtHvwMqp0MYQw2sR9PwzUdbKnq3373qHPSu8FXg2JRPYoNA3+1aGg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Subject:To:From:Date:in-reply-to: references; bh=cCaUdIYa8PI5Uo9Ul1LQrCUEU0kvBdgpCPqe2/yBatU=; b=k91UWV5OA03TS3 PGcteIc+9S889JA1zA+Ad6j9e28OqXbFPzLews3n8ZBGFaUvLBXtD40SiDbuocojtePq2A2Z1jZUR tzXnDtH0NSuKNYp+wrUEfEhl+Ay1syh6mGB8KjUq628C4mhpbAYuvz5PR2Om+PB5IP4YeabciTxgj JUuGNNpmTZwXU1f8Sk75cfYkPHPihDme7vAy+od+OQVUtBo14P/xWa/Rx5G7qnS2yh/to0FnFQM96 9A4dgdxUJdORpmwQFfZgyN/rehHhYXrhD7E3WXsg0zjKyBggerTuXKof6OtfqVCj3KU0w8eYzDNAs UtVhuAWz3GxakKeW26Uw==; Date: Sat, 28 Oct 2023 21:19:59 +0200 From: Samuel Thibault To: gcc-patches@gcc.gnu.org, Thomas Schwinge Cc: bug-hurd@gnu.org Subject: [PATCH,resend] hurd: Add multilib paths for gnu-x86_64 Message-ID: <20231028191959.wqxrjpps6z5ij3nz@begin> Mail-Followup-To: gcc-patches@gcc.gnu.org, Thomas Schwinge , bug-hurd@gnu.org MIME-Version: 1.0 Content-Disposition: inline Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-8.4 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 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781028175608552844 X-GMAIL-MSGID: 1781028175608552844 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)