From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by sourceware.org (Postfix) with ESMTPS id 89D2E3857C66 for ; Fri, 28 May 2021 03:07:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 89D2E3857C66 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=fitzsim.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=fitzsim@fitzsim.org Received: by mail-qk1-x733.google.com with SMTP id j189so2849772qkf.2 for ; Thu, 27 May 2021 20:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:references:date :message-id:user-agent:mime-version; bh=+2XPBu26DG/3a4c6bn5UME70D0CaEKC0HD1Pi0+pK4s=; b=fY1gP7iDO8jmVTvLRegQz+c41Jtkmt8PCyGhHTI42u2g17S1079mp8VardPHmDMwPm giFJT5uscSyxuJuZo3NIBJkpNxgTODNS5ooY+ICF5PSZR3U3N0I0n7J9Xyy3DvTjvpdo JWCUl5pQ4tzJ9jDkDqFckuwz1wKcloQNxqOtH6GnqSY3wyg2D/OYQ5aEsjNxkgym0/5F RXmiMeACgpkuLrWWSk9Q7y37cAGYEpS/XAZz4ZyDaFqsqw/nBt3SmUifHDQ60dEH5LZx K+FMIFp12f6947HV8ga1tNx3TPl0+2C+junfEbDOumFRa6JLV11ZlEaarKm0yWC+zoxC k+Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :references:date:message-id:user-agent:mime-version; bh=+2XPBu26DG/3a4c6bn5UME70D0CaEKC0HD1Pi0+pK4s=; b=R/AdO5J4JqnXgy+KHAiU1xogRXpkSJVv6xMRx2cSCM78EWp4kjHKoFIRAVnva7bOQr N4WIeyydj3jtUygZ5hmrr3lCXdjbXk3l1JdMN8fsp33O/DFT8aQWw0Qu7pw1FpBm1py5 UkmNG5Mrw3AoYVve3QPhvl+JiZjqjzbko9IQq0d8H754adqhSgomssXwwJQrezvQ5dzc KxMgCbB9+HR9jIexkfwmT57gkMR1SaCusQ1LLsqJyWoi1roGKLxnQvLO2qCZSXC0swoq sERgzAlQFs2BwKMx6hOU/DDmaA6Qt7zSr44mUGdaxpF660Kr+xdHuyJaDQ1lUuX51b5F GgDg== X-Gm-Message-State: AOAM530tzDDlnL6mrvCHVzjTE4BnCFT0iJAhudy3UBY41YOOw4Vre9P/ noi+F71b8/Ghthe9/C/WjcuHqC7GYcVMTA== X-Google-Smtp-Source: ABdhPJwTvwSqFYrmcwginr0Rmpqtw1pWH2QEN7INh+hiq1fTaEyUR4o2Vj/4MqZekPM3glA7tEalpQ== X-Received: by 2002:a05:620a:2291:: with SMTP id o17mr1798824qkh.150.1622171236922; Thu, 27 May 2021 20:07:16 -0700 (PDT) Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id c23sm2629351qtq.87.2021.05.27.20.05.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 May 2021 20:05:56 -0700 (PDT) From: Thomas Fitzsimmons To: Philip Herron Cc: gcc@gcc.gnu.org Subject: Re: GCC Rust git branch In-Reply-To: <5b2057ae-039c-6805-20fe-133df71c120e@embecosm.com> References: <5b2057ae-039c-6805-20fe-133df71c120e@embecosm.com> References: <5b2057ae-039c-6805-20fe-133df71c120e@embecosm.com> Date: Thu, 27 May 2021 23:05:51 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 03:07:19 -0000 --=-=-= Content-Type: text/plain Hi Philip, Philip Herron writes: > As some of you might know, I have been working on GCC Rust over on > GitHub https://github.com/Rust-GCC/gccrs. As the project is moving > forward and enforcing GCC copyright assignments for contributors, I > would like to create a branch on the GCC git repo to show the intention > to be upstream with GCC someday. I tried building GCC Rust on ppc64le. With the attached patches, "make check-rust" succeeds with: === rust Summary === # of expected passes 2368 # of expected failures 26 Thomas --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-rs6000-Override-TARGET_RUST_OS_INFO-in-linux64.h.patch >From 42099a90a23c31d1af95ceac590938d50a362cf9 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 27 May 2021 21:53:29 -0400 Subject: [PATCH 1/2] rs6000: Override TARGET_RUST_OS_INFO in linux64.h Both config/rs6000/sysv4.h and config/rs6000/linux64.h define TARGET_RUST_OS_INFO, and both are included in that order in tm.h. This change eliminates the error directive, permitting the more specific definition in linux64.h to override the prior definition in sysv4.h. gcc/ChangeLog: 2021-05-27 Thomas Fitzsimmons * config/rs6000/linux64.h: Undefine TARGET_RUST_OS_INFO before defining it. --- gcc/config/rs6000/linux64.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index fbd8cf0a693..536007ca685 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -314,9 +314,8 @@ extern int dot_symbols; } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in linux64.h (rs6000) - c++ undefines it and redefines it." -#endif +/* Override less-specific rs6000/sysv4.h definition. */ +#undef TARGET_RUST_OS_INFO #define TARGET_RUST_OS_INFO() \ do { \ GNU_USER_TARGET_RUST_OS_INFO(); \ -- 2.30.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-rs6000-Recognize-GNU-Rust-when-producing-epilogue.patch >From cd4d663c13d27a53ccabeef3d7d8cffa7a5a5365 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 27 May 2021 21:55:46 -0400 Subject: [PATCH 2/2] rs6000: Recognize GNU Rust when producing epilogue Handling the GNU Rust language when writing a function's epilogue is necessary to avoid an internal compiler error. gcc/ChangeLog: 2021-05-27 Thomas Fitzsimmons Mark Wielaard * config/rs6000/rs6000-logue.c (rs6000_output_function_epilogue): Set language type field to 0 for GNU Rust. Co-Authored-By: Mark Wielaard --- gcc/config/rs6000/rs6000-logue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c index b0ac183ceff..7da8db6d232 100644 --- a/gcc/config/rs6000/rs6000-logue.c +++ b/gcc/config/rs6000/rs6000-logue.c @@ -5262,12 +5262,13 @@ rs6000_output_function_epilogue (FILE *file) use language_string. C is 0. Fortran is 1. Ada is 3. Modula-2 is 8. C++ is 9. Java is 13. Objective-C is 14. Objective-C++ isn't assigned - a number, so for now use 9. LTO, Go, D, and JIT aren't assigned - numbers either, so for now use 0. */ + a number, so for now use 9. LTO, Go, D, Rust, and JIT aren't + assigned numbers either, so for now use 0. */ if (lang_GNU_C () || ! strcmp (language_string, "GNU GIMPLE") || ! strcmp (language_string, "GNU Go") || ! strcmp (language_string, "GNU D") + || ! strcmp (language_string, "GNU Rust") || ! strcmp (language_string, "libgccjit")) i = 0; else if (! strcmp (language_string, "GNU F77") -- 2.30.0 --=-=-=--