diff mbox series

[v2] RISC-V: Add deprecation warning to LP64E abi

Message ID 20240731003209.344379-1-patrick@rivosinc.com
State New
Headers show
Series [v2] RISC-V: Add deprecation warning to LP64E abi | expand

Commit Message

Patrick O'Neill July 31, 2024, 12:32 a.m. UTC
gcc/ChangeLog:

	PR 116152
	* config/riscv/riscv.cc (riscv_option_override): Add deprecation
	warning.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/predef-9.c: Add check for warning.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
v2 ChangeLog:
Shorten message and split into warning and note.
---
 gcc/config/riscv/riscv.cc                 | 7 +++++++
 gcc/testsuite/gcc.target/riscv/predef-9.c | 2 ++
 2 files changed, 9 insertions(+)

--
2.34.1

Comments

Jeff Law Aug. 5, 2024, 2:21 p.m. UTC | #1
On 7/30/24 6:32 PM, Patrick O'Neill wrote:
> gcc/ChangeLog:
> 
> 	PR 116152
> 	* config/riscv/riscv.cc (riscv_option_override): Add deprecation
> 	warning.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/riscv/predef-9.c: Add check for warning.
OK
jeff
Patrick O'Neill Aug. 5, 2024, 10:37 p.m. UTC | #2
On 8/5/24 07:21, Jeff Law wrote:
>
>
> On 7/30/24 6:32 PM, Patrick O'Neill wrote:
>> gcc/ChangeLog:
>>
>>     PR 116152
>>     * config/riscv/riscv.cc (riscv_option_override): Add deprecation
>>     warning.
>>
>> gcc/testsuite/ChangeLog:
>>
>>     * gcc.target/riscv/predef-9.c: Add check for warning.
> OK
> jeff

Rebased and committed. Sent committed patch to the lists for the archiver.

Patrick
diff mbox series

Patch

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 8ece7859945..b0526529980 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -9818,6 +9818,13 @@  riscv_option_override (void)
 	error ("rv64e requires lp64e ABI");
     }

+  if (riscv_abi == ABI_LP64E)
+    {
+      if (warning (OPT_Wdeprecated, "LP64E ABI is marked for deprecation in GCC"))
+	inform (UNKNOWN_LOCATION, "If you need LP64E please notify the GCC "
+		"project via https://gcc.gnu.org/PR116152");
+    }
+
   /* Zfinx require abi ilp32, ilp32e, lp64 or lp64e.  */
   if (TARGET_ZFINX
       && riscv_abi != ABI_ILP32 && riscv_abi != ABI_LP64
diff --git a/gcc/testsuite/gcc.target/riscv/predef-9.c b/gcc/testsuite/gcc.target/riscv/predef-9.c
index cc3abc9a741..0d9488529ea 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-9.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-9.c
@@ -1,5 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-march=rv64em -mabi=lp64e -mno-div -mcmodel=medlow" } */
+/* { dg-warning "LP64E ABI is marked for deprecation in GCC" "" { target *-*-* } 0 } */
+/* { dg-note "If you need LP64E please notify the GCC project via https://gcc.gnu.org/PR116152" "" { target *-*-* } 0 } */

 int main () {
 #if !defined(__riscv)