From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 88B53386FC37 for ; Thu, 3 Jun 2021 20:56:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 88B53386FC37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pj1-x1030.google.com with SMTP id g6-20020a17090adac6b029015d1a9a6f1aso3996417pjx.1 for ; Thu, 03 Jun 2021 13:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QTyuij28LM+kbIyidNJS+H+VnCsiIlVxwCyq5T42oDI=; b=mYsl2FiSGX8TGAwCzzI7lZgGtYOmY55pRsnbnd6B74POvoav9GVo/jThKHKze63dh1 D+ve2u1j/kdXXk1dXIPwQwM5qV2sn2w5CC1fBP+TnSrjr9MgZ7FaJoNqOgT+cKg6Lq2o X4jgzOMPqSJC7MnY357WmZ2UtxSwGz5TIfiY0vM2EfZUc/hUyfi5Uhen+J2537MP5ANV 8V4tfpmrTgNzTArWEGekqJf2bMHgrnmqb7Skl16a7h2DoSHpUSKXWjb1/SnWpmvpx3ka /l8Vaal3eXB3J14OWNPc/kP2laQNpBNa+GdvFVijzqHrNM7fPPSqEUwn9hZQmWhGn+BV 5AYQ== 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:date:message-id:mime-version :content-transfer-encoding; bh=QTyuij28LM+kbIyidNJS+H+VnCsiIlVxwCyq5T42oDI=; b=iPNruOhy8eme563CeMPPBvFEzAAoLWdb9FQ269M0f+WDoTNqkNtVtegwv4DIzrufzc D+8A4s4a5NF+SkVov3FW3ZoRs/2ex9/v+w0OKeU7BUNOFPXTFvTc+Xnx70EoH0Nh0pHm /E6UI6P1fGX6oBnVSdCSJ5yBfYiEOjJivRcJNHU8+Gpzgzu0vT3Rgip+uleN6agyGm3T adbK8oFh8LIkDjPI9ChhzPbMTApK6Q09cYmGLp/cqe7rmk6rItg/0Rf9Dp+l6Y0rXcP5 hVCWp+g2jzOLKz9/YQ6oVF2/p7mKBVXGn51IvvkrApIyN+4DZJMWACiJ55sJ9L+jC0Cw 6JIA== X-Gm-Message-State: AOAM5320UdKtbEovjEuHISL5MV4+s3Rup2CP+4DaRh9Z3Nwrtt4YBnIi 2NSMlQ4vNVml89dWdcFe5Ok1NHPIDFz2GQ== X-Google-Smtp-Source: ABdhPJy4zuG4HBgTRlIv3aeZZR9xF+QHQVt89IoyC6Qms785Tc6InDCXcoQNZaFzU/2AmxZdVaPK/Q== X-Received: by 2002:a17:902:988d:b029:ef:68aa:d775 with SMTP id s13-20020a170902988db02900ef68aad775mr900144plp.57.1622753761267; Thu, 03 Jun 2021 13:56:01 -0700 (PDT) Received: from rohan.hsd1.ca.comcast.net ([2601:646:c180:b150:68a2:4157:8346:c54e]) by smtp.gmail.com with ESMTPSA id s21sm16882pgi.29.2021.06.03.13.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 13:56:00 -0700 (PDT) From: Jim Wilson To: gcc-patches@gcc.gnu.org Subject: [PATCH] RISC-V: Enable riscv attributes by default for all riscv targets. Date: Thu, 3 Jun 2021 13:55:40 -0700 Message-Id: <20210603205540.328093-1-jimw@sifive.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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-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-List-Received-Date: Thu, 03 Jun 2021 20:56:05 -0000 These were only enabled for embedded elf originally because that was the safe option, and linux had no obvious use for them. But now that we have new extensions coming like V that affect process state and ABIs, the attributes are expected to be useful for linux, and may be required by the psABI. clang already emits them for all riscv targets. Tested with a patched open embedded build and boot, and a native toolchain build. Committed. Jim gcc/ * config.gcc (riscv*-*-*): If --with-riscv-attribute not used, turn TARGET_RISCV_ATTRIBUTES on for all riscv targets. --- gcc/config.gcc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 92fad8e20ca..6833a6c13d9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4605,14 +4605,7 @@ case "${target}" in tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" ;; ""|default) - case "${target}" in - riscv*-*-elf*) - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" - ;; - *) - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" - ;; - esac + tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" ;; *) echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2 -- 2.25.1