AArch64: Deprecate -mabi=ilp32

Message ID PAWPR08MB89821F34D3B860D55F659047831C2@PAWPR08MB8982.eurprd08.prod.outlook.com
State New
Headers
Series AArch64: Deprecate -mabi=ilp32 |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed

Commit Message

Wilco Dijkstra Jan. 10, 2025, 2:05 p.m. UTC
  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.

---
  

Comments

Kyrylo Tkachov Jan. 10, 2025, 2:15 p.m. UTC | #1
Hi Wilco,

> On 10 Jan 2025, at 15:05, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
> 
> 
> 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?

I agree on that front for Linux, but I thought using it for bare-metal/embedded cases is still supported?
I haven’t tested in a while but the aarch64-none-elf newlib target used to work fine with -mabi=ilp32.
Would it make sense to deprecate it for Linux/glibc targets i.e. deprecate the aarch64*-linux-gnu_ilp32 platform instead?

Thanks,
Kyrill


> 
> 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 78d2cc4bbe4933c79153d0741bfd8d7b076952d0..02891b0a8ed75eb596df9d0dbff77ccd6a625f11 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -19315,6 +19315,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 17fe2c64c1f85ad8db8b61f040aafe5f8212e488..6722ad5281541e499d5b3916179d9a4d1b39097f 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.
> 
> +@samp{ilp32} 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;
>
  
Richard Sandiford Jan. 10, 2025, 2:16 p.m. UTC | #2
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> 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.

I suggested this on irc a while back, but unfortunately I forgot to take
a complete log, so I don't have a record of the important bits of the
conversation.  The outcome was that the Apple ecosystem does have an
ILP32 ABI, so that might become relevant when Iain's Darwin work is
merged.  I therefore think we should keep ILP32 for now.

IMO ILP32 is supported for aarch64-elf (and aarch64_be-elf).  But I
agree it can be considered unsupported for GNU/Linux.  Unfortunately,
as far as code maintenance goes, deprecating it for one subtarget is
probably worse than not deprecating it at all.  That means that we'll
occasionally have to deal with bug reports about ILP32 support in
GNU-only code.

For those reasons, I think we should keep ILP32 for now.

Richard

>
> ---
>
> diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
> index 78d2cc4bbe4933c79153d0741bfd8d7b076952d0..02891b0a8ed75eb596df9d0dbff77ccd6a625f11 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -19315,6 +19315,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 17fe2c64c1f85ad8db8b61f040aafe5f8212e488..6722ad5281541e499d5b3916179d9a4d1b39097f 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.
>  
> +@samp{ilp32} 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;
  
Andreas Schwab Jan. 10, 2025, 2:20 p.m. UTC | #3
On Jan 10 2025, Wilco Dijkstra wrote:

> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 17fe2c64c1f85ad8db8b61f040aafe5f8212e488..6722ad5281541e499d5b3916179d9a4d1b39097f 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.
>  
> +@samp{ilp32} is deprecated.

Please avoid starting a sentence with a lower case letter.
  
Andrew Pinski Jan. 10, 2025, 4:51 p.m. UTC | #4
On Fri, Jan 10, 2025 at 6:06 AM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
>
> 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?

Personally I would like this deprecated even for bare-metal. Yes the
iwatch ABI is an ILP32 ABI but I don't see GCC implementing that any
time soon and I suspect it would not be hard to resurrect the code at
that point.
I have only seen use of this outside of just testing and inside
Samsung and Huawei but for the most part both of them have not done
any maintenance to support ILP32. Well Huawei did file a bug a few
months ago about how the build is broken for libatomic since the
addition of LSE128 support:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118142; Took them 9
months to notice too.

Thanks,
Andrew

>
> 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 78d2cc4bbe4933c79153d0741bfd8d7b076952d0..02891b0a8ed75eb596df9d0dbff77ccd6a625f11 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -19315,6 +19315,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 17fe2c64c1f85ad8db8b61f040aafe5f8212e488..6722ad5281541e499d5b3916179d9a4d1b39097f 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.
>
> +@samp{ilp32} 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;
>
  
Wilco Dijkstra Jan. 10, 2025, 6:30 p.m. UTC | #5
Hi Andrew,

> Personally I would like this deprecated even for bare-metal. Yes the
> iwatch ABI is an ILP32 ABI but I don't see GCC implementing that any
> time soon and I suspect it would not be hard to resurrect the code at
> that point.

My patch deprecates it in all cases currently. It will be a good warning for
people that it will go away in the future (even if we don't yet agree on when
exactly).

> I have only seen use of this outside of just testing and inside
> Samsung and Huawei but for the most part both of them have not done
> any maintenance to support ILP32. Well Huawei did file a bug a few
> months ago about how the build is broken for libatomic since the
> addition of LSE128 support:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118142; Took them 9
> months to notice too.

I agree there is no point in fixing any of this. It's never going to work without
somebody doing a full port and active maintenance. There are lots of uses of
unsigned long in libatomic - and all of those are incorrect in ILP32. And the
assembler would need argument checks etc...

Thinking it will work fine if it builds without errors is insanity.

Cheers,
Wilco
  
Iain Sandoe Jan. 10, 2025, 8:37 p.m. UTC | #6
Hi Folks,

> On 10 Jan 2025, at 18:30, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
> 
> Hi Andrew,
> 
>> Personally I would like this deprecated even for bare-metal. Yes the
>> iwatch ABI is an ILP32 ABI but I don't see GCC implementing that any
>> time soon and I suspect it would not be hard to resurrect the code at
>> that point.
> 
> My patch deprecates it in all cases currently. It will be a good warning for
> people that it will go away in the future (even if we don't yet agree on when
> exactly).

Andrew is correct (at least in so far as I am the active person supporting Darwin
on GCC). It is not likely to happen any time soon - there are higher priorities.

However, the existence of watchOS with a very wide deployment does mean
that there is at least one significant use of ILP32 in the wild.

I guess if a miracle occurs and somehow watchOS becomes relevant, I’d imagine
we’d have ABI work to do anyway - so having to restore old code would be part
of that.

cheers
Iain

> 
>> I have only seen use of this outside of just testing and inside
>> Samsung and Huawei but for the most part both of them have not done
>> any maintenance to support ILP32. Well Huawei did file a bug a few
>> months ago about how the build is broken for libatomic since the
>> addition of LSE128 support:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118142; Took them 9
>> months to notice too.
> 
> I agree there is no point in fixing any of this. It's never going to work without
> somebody doing a full port and active maintenance. There are lots of uses of
> unsigned long in libatomic - and all of those are incorrect in ILP32. And the
> assembler would need argument checks etc...
> 
> Thinking it will work fine if it builds without errors is insanity.
> 
> Cheers,
> Wilco
  
Richard Sandiford Jan. 13, 2025, 5:51 p.m. UTC | #7
Iain Sandoe <idsandoe@googlemail.com> writes:
> Hi Folks,
>
>> On 10 Jan 2025, at 18:30, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>> 
>> Hi Andrew,
>> 
>>> Personally I would like this deprecated even for bare-metal. Yes the
>>> iwatch ABI is an ILP32 ABI but I don't see GCC implementing that any
>>> time soon and I suspect it would not be hard to resurrect the code at
>>> that point.
>> 
>> My patch deprecates it in all cases currently. It will be a good warning for
>> people that it will go away in the future (even if we don't yet agree on when
>> exactly).
>
> Andrew is correct (at least in so far as I am the active person supporting Darwin
> on GCC). It is not likely to happen any time soon - there are higher priorities.
>
> However, the existence of watchOS with a very wide deployment does mean
> that there is at least one significant use of ILP32 in the wild.
>
> I guess if a miracle occurs and somehow watchOS becomes relevant, I’d imagine
> we’d have ABI work to do anyway - so having to restore old code would be part
> of that.

OK, thanks!

In that case, I'm coming round to the idea of deprecating ILP32.
I think it was already common ground that the GNU/Linux support is dead.
watchOS would use Mach objects rather than ELF.  As you say, it isn't
clear how much of the current ILP32 support would be relevant for it.
And there is no specific evidence that anyone is using the baremetal
support.  Deprecating ILP32 is probably the only way of finding out
whether there are baremetal users.

(Note that I don't think the argument about libatomic & long really
shifts the balance, since baremetal doesn't use libatomic, and I assume
watchOS wouldn't either.  PR118142 has been closed as WONTFIX, which I
agree is the right resolution whatever happens with the deprecation
decision.)

Kyrill, what do you think?

Richard
  
Wilco Dijkstra Jan. 13, 2025, 7:48 p.m. UTC | #8
Hi all,

> In that case, I'm coming round to the idea of deprecating ILP32.
> I think it was already common ground that the GNU/Linux support is dead.
> watchOS would use Mach objects rather than ELF.  As you say, it isn't
> clear how much of the current ILP32 support would be relevant for it.
> And there is no specific evidence that anyone is using the baremetal
> support.  Deprecating ILP32 is probably the only way of finding out
> whether there are baremetal users.

Yes, even just knowing there are actual users would be useful!

> (Note that I don't think the argument about libatomic & long really
> shifts the balance, since baremetal doesn't use libatomic, and I assume
> watchOS wouldn't either.  PR118142 has been closed as WONTFIX, which I
> agree is the right resolution whatever happens with the deprecation
> decision.)

Libatomic is just one example of new code that hasn't been designed for or
tested on ILP32. The underlying point is that software quickly rots if you don't
actively maintain it. When I tried building SPECINT, I got several assembler
errors like: "whilewr p15.b,w25,w28". That's likely easy to fix (like PR117711),
but someone has to take on this maintenance. And that just hasn't happened
for years...

Cheers,
Wilco
  
Kyrylo Tkachov Jan. 14, 2025, 1:29 p.m. UTC | #9
> On 13 Jan 2025, at 18:51, Richard Sandiford <Richard.Sandiford@arm.com> wrote:
> 
> Iain Sandoe <idsandoe@googlemail.com> writes:
>> Hi Folks,
>> 
>>> On 10 Jan 2025, at 18:30, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>>> 
>>> Hi Andrew,
>>> 
>>>> Personally I would like this deprecated even for bare-metal. Yes the
>>>> iwatch ABI is an ILP32 ABI but I don't see GCC implementing that any
>>>> time soon and I suspect it would not be hard to resurrect the code at
>>>> that point.
>>> 
>>> My patch deprecates it in all cases currently. It will be a good warning for
>>> people that it will go away in the future (even if we don't yet agree on when
>>> exactly).
>> 
>> Andrew is correct (at least in so far as I am the active person supporting Darwin
>> on GCC). It is not likely to happen any time soon - there are higher priorities.
>> 
>> However, the existence of watchOS with a very wide deployment does mean
>> that there is at least one significant use of ILP32 in the wild.
>> 
>> I guess if a miracle occurs and somehow watchOS becomes relevant, I’d imagine
>> we’d have ABI work to do anyway - so having to restore old code would be part
>> of that.
> 
> OK, thanks!
> 
> In that case, I'm coming round to the idea of deprecating ILP32.
> I think it was already common ground that the GNU/Linux support is dead.
> watchOS would use Mach objects rather than ELF.  As you say, it isn't
> clear how much of the current ILP32 support would be relevant for it.
> And there is no specific evidence that anyone is using the baremetal
> support.  Deprecating ILP32 is probably the only way of finding out
> whether there are baremetal users.
> 
> (Note that I don't think the argument about libatomic & long really
> shifts the balance, since baremetal doesn't use libatomic, and I assume
> watchOS wouldn't either.  PR118142 has been closed as WONTFIX, which I
> agree is the right resolution whatever happens with the deprecation
> decision.)
> 
> Kyrill, what do you think?

I don’t know of any embedded users of ILP32 but the nature of such embedded use
cases is that they are not very publicly visible so can’t know for sure.
We can’t prove a negative (that there are no more users of it) so I’m okay with
declaring it deprecated in GCC 15 to see if anyone protests.
It would need a note in the Caveats section at the top of https://gcc.gnu.org/gcc-15/changes.html 

Thanks,
Kyrill

> 
> Richard
  
Richard Sandiford Jan. 14, 2025, 2:13 p.m. UTC | #10
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> 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 78d2cc4bbe4933c79153d0741bfd8d7b076952d0..02891b0a8ed75eb596df9d0dbff77ccd6a625f11 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -19315,6 +19315,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.");

There should be no "." at the end of the message.

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

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

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

Thanks,
Richard

>  
>    /* 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 17fe2c64c1f85ad8db8b61f040aafe5f8212e488..6722ad5281541e499d5b3916179d9a4d1b39097f 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.
>  
> +@samp{ilp32} 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;
  
Wilco Dijkstra Jan. 14, 2025, 5:29 p.m. UTC | #11
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;
  
Tamar Christina Jan. 17, 2025, 11:39 a.m. UTC | #12
> -----Original Message-----
> From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
> Sent: Tuesday, January 14, 2025 5:30 PM
> To: Richard Sandiford <Richard.Sandiford@arm.com>
> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; ktkachov@nvidia.com; GCC
> Patches <gcc-patches@gcc.gnu.org>; schwab@linux-m68k.org
> Subject: Re: [PATCH] AArch64: Deprecate -mabi=ilp32
> 
> 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?

Hi,

This patch seems to break embedded builds as on -elf platforms we build ilp32 as
a default multilib variant.

That is in gcc/config.gcc 

aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*

all do:

	aarch64_multilibs="${with_multilib_list}"
	if test "$aarch64_multilibs" = "default"; then
		aarch64_multilibs="lp64,ilp32"
	fi

Which then fails the build because of -Werror.

So the question is as the discussion above has been about Linux, should the
deprecation just be on Linux or also ELF, and if ELF should we remove it from
the default multilib?

Thanks,
Tamar

> 
> 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..1dbbc9c3cf9b2afba80fa05d6b
> 37e11d5780169e 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..13afb4a0d0d87dacc63bcc46
> 1612f7ffa2afd3ad 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..276c10cd0e86ff2c74a5c09ce
> 70f7d76614978ec 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..177991cfb2289530e4ee3e36
> 33fddde5972e9e28 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..976e2db71bfafe96e3729e4d
> 4bc333874d98c084 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..c79427517d0e61417dd5c001
> 3f8db04ed91da449 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..cd21f7c06690219410a78e
> b824fd140627df3354 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..49cb6e10aa5ddbbf35a3ba3
> 31afddfb6679a8092 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..18aa4cfe7f72f6767919b1612
> 568b6164e4f3b7d 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;
>
  
Richard Sandiford Jan. 17, 2025, 12:35 p.m. UTC | #13
Tamar Christina <Tamar.Christina@arm.com> writes:
>> -----Original Message-----
>> From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>> Sent: Tuesday, January 14, 2025 5:30 PM
>> To: Richard Sandiford <Richard.Sandiford@arm.com>
>> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; ktkachov@nvidia.com; GCC
>> Patches <gcc-patches@gcc.gnu.org>; schwab@linux-m68k.org
>> Subject: Re: [PATCH] AArch64: Deprecate -mabi=ilp32
>> 
>> 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?
>
> Hi,
>
> This patch seems to break embedded builds as on -elf platforms we build ilp32 as
> a default multilib variant.
>
> That is in gcc/config.gcc 
>
> aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*
>
> all do:
>
> 	aarch64_multilibs="${with_multilib_list}"
> 	if test "$aarch64_multilibs" = "default"; then
> 		aarch64_multilibs="lp64,ilp32"
> 	fi
>
> Which then fails the build because of -Werror.
>
> So the question is as the discussion above has been about Linux, should the
> deprecation just be on Linux or also ELF, and if ELF should we remove it from
> the default multilib?

FWIW, my vote would be for removing the multilib.

Thanks,
Richard
  

Patch

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 78d2cc4bbe4933c79153d0741bfd8d7b076952d0..02891b0a8ed75eb596df9d0dbff77ccd6a625f11 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -19315,6 +19315,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 17fe2c64c1f85ad8db8b61f040aafe5f8212e488..6722ad5281541e499d5b3916179d9a4d1b39097f 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.
 
+@samp{ilp32} 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;