On Fri, Jan 10, 2025 at 6:06 AM Wilco Dijkstra <wilco.dijks...@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; >