From patchwork Mon Dec 26 01:20:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Cruz X-Patchwork-Id: 36515 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp698366wrt; Sun, 25 Dec 2022 17:21:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXsjSq6yHsDRnb+Wu3O0Tt6ESSDJQAcSQ7sOgIkiI+BsMyCcFK8T+Hkan4ZgtUTL/MmZRWrq X-Received: by 2002:a17:906:7b8e:b0:7c1:3f04:efa2 with SMTP id s14-20020a1709067b8e00b007c13f04efa2mr17704026ejo.29.1672017674467; Sun, 25 Dec 2022 17:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672017674; cv=none; d=google.com; s=arc-20160816; b=bkBEnRW6a/M/nqEjqwvLA2MFPTPaaTGK45rYK8Tsc2U0e/6ot0g67qX68CLdHAJIlm YUNL/NblIUAIsdk//aSZllF+zxwTwyP1gwcycxqFBJ2gyKjggOyVDR0dZBISm+Sa4O80 diyqIbGXmf1BInJjy7HGU5kSMxZKZ73BWoUdhWkx7BSOXODk59CBfb/aCwG/Sxy9j7nF ShtuJDUORoeecgbsAu2eGVrQRW3oOuvaQPCnFdG2RcWDJTnRIAd+m7kd/6LHPZwlkNee XzgkuwOt0lAG6sxGAfW6S1QDFryvvVEvzZHh8VIuG8ojLGhilRRM5GHTX3FZ9MED9Gze sEmg== 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 :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=zKdlmHmLVG9WudL6gl26ESasvgYjpj3vcMoaFmfH+pM=; b=belALfNMwe9+scowGXckoRMek2fMAK2V6ihgXR1fk01zv5FM7kYcanwFlEFzSWWTBS bprTAz1x/xUewVyGyrwn/Duv7TtSWyDB9GxS4f6x2Rw4dl+w9YLi+v4z3iehf8aDce0O T7xb7t1D0Vefalygkvo7bg01ESBf9KGsG1xCeNcsPWiRrHLWq0iNLwCOX5KQZ8JGfXYA 3TRgcUBrGCMzgnp9eRDR6ZyVTJ5HWtwthL3fvR9nyn5PZd+smFJN9OVF+WxrnJ9A89GD HDMBxw4X8DfcT2yWvEuD/ub+ZXV77rI3JU6sccdBGGTT5XgF1VwNNiPSSzRBA2jmqsAb i+YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=oQNCDnkE; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h17-20020a056402281100b0046bce131279si9176542ede.13.2022.12.25.17.21.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 17:21:14 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=oQNCDnkE; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 38F093858D39 for ; Mon, 26 Dec 2022 01:21:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38F093858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672017673; bh=zKdlmHmLVG9WudL6gl26ESasvgYjpj3vcMoaFmfH+pM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=oQNCDnkEeeD+x6s+0Nx2NNcCmmddaHw6DrRjUX6JRzWROojV+VSvazMTnKrfEJThd CrtAt8+9cOuCd3Wu0MCEliAJk1MOnmBlZnURoboJS1J3ysoxBFr1WhW8diFjGCfxzM mhrpVqcgQEAhKD0HkYqgJNqye0eeXrxSwLFi5ZXg= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 54FDB3858D32 for ; Mon, 26 Dec 2022 01:21:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 54FDB3858D32 Received: by mail-il1-x132.google.com with SMTP id d10so5060010ilc.12 for ; Sun, 25 Dec 2022 17:21:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zKdlmHmLVG9WudL6gl26ESasvgYjpj3vcMoaFmfH+pM=; b=UFmLgvC2K1Cv5KWnwCPtM35IAZrrum+EoZA8V7YSL1ygyLC6AvDiS0BvGBnj+jsG4u LqyzELcpH1RdYnF8hbIfAXpEw6K+Xldr/hXzCHZqkCMq0VMNMOg2UHtdl29nWZFQoCRs Rxa+EG5mvdbsLBYycqUffCnqo4ea0AS5h7Waa4m06MTA93zdLDiZZAo0+OD095xXW1nA 5zby3Z+6QdvGlCUIGknST5Mk9Zz74YWxGawzZVdFmKjaSFGSIrXWyB9EsVKuneciOFDz kYujQGk4JOnagcSjrjq2rV+OnORh/5bRB8oSOwJOQKKSdxALWicugF1nb70PF9Z+holA 4eqA== X-Gm-Message-State: AFqh2kogjCOLykYr1qliAoMz4dyXJkkx0plhbBTDeBOEekeKU7OgiKv9 rOC5/0EjKv+gMGByp0q/9iIYYV7CLbIL X-Received: by 2002:a92:c151:0:b0:302:f5cd:d59a with SMTP id b17-20020a92c151000000b00302f5cdd59amr11870021ilh.1.1672017660229; Sun, 25 Dec 2022 17:21:00 -0800 (PST) Received: from mars ([24.154.253.225]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b003762308fe54sm3017740jap.93.2022.12.25.17.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 17:20:59 -0800 (PST) Date: Sun, 25 Dec 2022 20:20:58 -0500 To: binutils@sourceware.org Subject: [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Flavio Cruz via Binutils From: Flavio Cruz Reply-To: Flavio Cruz Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753237604845763708?= X-GMAIL-MSGID: =?utf-8?q?1753237604845763708?= Tested by building a toolchain and compiling gnumach for x86_64 [1] [1] https://github.com/flavioc/cross-hurd/blob/master/bootstrap-kernel.sh. --- bfd/config.bfd | 5 +++++ ld/configure.tgt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/bfd/config.bfd b/bfd/config.bfd index 0bc27fdce9..d1839a586e 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -731,6 +731,11 @@ case "${targ}" in targ_selvecs=i386_elf32_vec want64=true ;; + x86_64-*-gnu*) + targ_defvec=x86_64_elf64_vec + targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec" + want64=true + ;; #endif i[3-7]86-*-lynxos*) targ_defvec=i386_elf32_vec diff --git a/ld/configure.tgt b/ld/configure.tgt index 741b246f67..dbabad5145 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -1058,6 +1058,11 @@ x86_64-*-mingw*) targ_emul=i386pep ; targ_extra_emuls=i386pe targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;; +x86_64-*-gnu*) targ_emul=elf_x86_64 + targ_extra_emuls="elf32_x86_64 elf_iamcu elf_i386" + targ_extra_libpath="elf_i386 elf32_x86_64" + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` + ;; xgate-*-*) targ_emul=xgateelf targ_extra_ofiles=ldelfgen.o ;;