Hi Richard,

>> +  if (TARGET_ILP32)
>> +    warning (OPT_Wdeprecated, "%<-mabi=ilp32%> is deprecated.");
>
> There should be no "." at the end of the message.

Right, fixed in v2 below.

> Otherwise it looks good to me, although like Kyrill says, it'll also
> need a release note.

I've added one, see 
https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673575.html

> Please give others 24 hours to comment.  Otherwise the patch is OK
> with that change.

Sure.

> (I saw Andreas's comment about starting sentences with a lowercase
> letter, but IMO that's ok for program text.)

I changed it to "The @samp{ilp32} model is deprecated." (using "option" felt 
wrong here).

Cheers,
Wilco


v2: Update after review

ILP32 was originally intended to make porting to AArch64 easier.  Support was
never merged in the Linux kernel or GLIBC, so it has been unsupported for many
years.  There isn't a benefit in keeping unsupported features forever, so
deprecate it now (and it could be removed in a future release).

Passes regress & bootstrap, OK for commit?

gcc:
        * config/aarch64/aarch64.cc (aarch64_override_options): Add warning.
        * doc/invoke.texi: Document -mabi=ilp32 as deprecated.

gcc/testsuite:
        * gcc.target/aarch64/inline-mem-set-pr112804.c: Add -Wno-deprecated.    
        * gcc.target/aarch64/pr100518.c: Likewise.
        * gcc.target/aarch64/pr113114.c: Likewise.
        * gcc.target/aarch64/pr80295.c: Likewise.
        * gcc.target/aarch64/pr94201.c: Likewise.
        * gcc.target/aarch64/pr94577.c: Likewise.
        * gcc.target/aarch64/sve/pr108603.c: Likewise.

---

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 
ad31e9d255c05dda00c7c2b4755ccec33ae2c83d..1dbbc9c3cf9b2afba80fa05d6b37e11d5780169e
 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -19356,6 +19356,8 @@ aarch64_override_options (void)
   if (TARGET_ILP32)
     error ("assembler does not support %<-mabi=ilp32%>");
 #endif
+  if (TARGET_ILP32)
+    warning (OPT_Wdeprecated, "%<-mabi=ilp32%> is deprecated");
 
   /* Convert -msve-vector-bits to a VG count.  */
   aarch64_sve_vg = aarch64_convert_sve_vector_bits (aarch64_sve_vector_bits);
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 
dd0d2b41a1a9ada3a10280b4188d5bf3a0a873e6..13afb4a0d0d87dacc63bcc461612f7ffa2afd3ad
 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -21472,6 +21472,8 @@ The default depends on the specific target 
configuration.  Note that
 the LP64 and ILP32 ABIs are not link-compatible; you must compile your
 entire program with the same ABI, and link with a compatible set of libraries.
 
+The @samp{ilp32} model is deprecated.
+
 @opindex mbig-endian
 @item -mbig-endian
 Generate big-endian code.  This is the default when GCC is configured for an
diff --git a/gcc/testsuite/gcc.target/aarch64/inline-mem-set-pr112804.c 
b/gcc/testsuite/gcc.target/aarch64/inline-mem-set-pr112804.c
index 
fe8414559864db4a8584fd3f5a7145b5e3d1f322..276c10cd0e86ff2c74a5c09ce70f7d76614978ec
 100644
--- a/gcc/testsuite/gcc.target/aarch64/inline-mem-set-pr112804.c
+++ b/gcc/testsuite/gcc.target/aarch64/inline-mem-set-pr112804.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-finline-stringops -mabi=ilp32 -ftrivial-auto-var-init=zero" 
} */
+/* { dg-options "-finline-stringops -mabi=ilp32 -Wno-deprecated 
-ftrivial-auto-var-init=zero" } */
 
 short m(unsigned k) {
   const unsigned short *n[65];
diff --git a/gcc/testsuite/gcc.target/aarch64/pr100518.c 
b/gcc/testsuite/gcc.target/aarch64/pr100518.c
index 
5ca599f5d2e0e1603456b2eaf2e98866871faad1..177991cfb2289530e4ee3e3633fddde5972e9e28
 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr100518.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr100518.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mabi=ilp32 -mstrict-align -O2" } */
+/* { dg-options "-mabi=ilp32 -Wno-deprecated -mstrict-align -O2" } */
 
 int unsigned_range_min, unsigned_range_max, a11___trans_tmp_1;
 
diff --git a/gcc/testsuite/gcc.target/aarch64/pr113114.c 
b/gcc/testsuite/gcc.target/aarch64/pr113114.c
index 
5b0383c24359ad95c7d333a6f18b98e50383f71b..976e2db71bfafe96e3729e4d4bc333874d98c084
 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr113114.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr113114.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mabi=ilp32 -O -mearly-ldp-fusion -mlate-ldp-fusion" } */
+/* { dg-options "-mabi=ilp32 -Wno-deprecated -O -mearly-ldp-fusion 
-mlate-ldp-fusion" } */
 void foo_n(double *a) {
   int i = 1;
   for (; i < (int)foo_n; i++)
diff --git a/gcc/testsuite/gcc.target/aarch64/pr80295.c 
b/gcc/testsuite/gcc.target/aarch64/pr80295.c
index 
b3866d8d6a9e5688f0eedb2fd7504547c412afa2..c79427517d0e61417dd5c0013f8db04ed91da449
 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr80295.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr80295.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mabi=ilp32" } */
+/* { dg-options "-mabi=ilp32 -Wno-deprecated" } */
 
 void f (void *b) 
 { 
diff --git a/gcc/testsuite/gcc.target/aarch64/pr94201.c 
b/gcc/testsuite/gcc.target/aarch64/pr94201.c
index 
3b9b79059e02b21c652726abb86d124274b6547c..cd21f7c06690219410a78eb824fd140627df3354
 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr94201.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr94201.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mcmodel=tiny -mabi=ilp32 -fPIC" } */
+/* { dg-options "-mcmodel=tiny -mabi=ilp32 -Wno-deprecated -fPIC" } */
 /* { dg-require-effective-target fpic } */
 
 extern int bar (void *);
diff --git a/gcc/testsuite/gcc.target/aarch64/pr94577.c 
b/gcc/testsuite/gcc.target/aarch64/pr94577.c
index 
d51799fb0bb67999ed1374e2d65a2b0d353b310a..49cb6e10aa5ddbbf35a3ba331afddfb6679a8092
 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr94577.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr94577.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mcmodel=large -mabi=ilp32 -fno-pie" } */
+/* { dg-options "-mcmodel=large -mabi=ilp32 -Wno-deprecated -fno-pie" } */
 
 void
 foo ()
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr108603.c 
b/gcc/testsuite/gcc.target/aarch64/sve/pr108603.c
index 
a2aea9f0b12bfa9a491e32577140e28f89c3392d..18aa4cfe7f72f6767919b1612568b6164e4f3b7d
 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pr108603.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr108603.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mabi=ilp32 -fdata-sections" } */
+/* { dg-options "-O2 -mabi=ilp32 -Wno-deprecated -fdata-sections" } */
 
 int a[128];
 long long *p;


Reply via email to