]> gcc.gnu.org Git - gcc.git/commit
rs6000: Fix up libgcc ABI when built with --with-long-double-format=ieee [PR97653]
authorJakub Jelinek <jakub@redhat.com>
Sat, 3 Apr 2021 08:05:32 +0000 (10:05 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 20 Apr 2021 09:44:15 +0000 (11:44 +0200)
commit8642b73a0f0df1f8e1e2d2102d67a76f8ed0a255
treed015bf17ea4a1d21a35ab4eaf72e11a5442787b1
parent9c2c106369e4035351eb2325a05dc2fc929a22db
rs6000: Fix up libgcc ABI when built with --with-long-double-format=ieee [PR97653]

__floatunditf and __fixtfdi and a couple of other libgcc{.a,_s.so}
entrypoints for backwards compatibility should mean IBM double double
handling (i.e. IFmode), gcc emits such calls for that format and
form IEEE long double emits *kf* instead.
When gcc is configured without --with-long-double-format=ieee ,
everything is fine, but when it is not, we need to compile those
libgcc sources with -mno-gnu-attribute -mabi=ibmlongdouble.
The following snippet in libgcc/config/rs6000/t-linux was attempting
to ensure that, and for some routines it works fine (e.g. for _powitf2).
But, due to 4 different types of bugs it doesn't work for most of those
functions, which means that in --with-long-double-format=ieee
configured gcc those *tf* entrypoints instead handle the long double
arguments as if they were KFmode.

The bugs are:
1) the first few objs properly use $(objext) as suffix, but
   several other contain a typo and use $(object) instead,
   which is a variable that isn't set to anything, so we don't
   add .o etc. extensions
2) while unsigned fix are properly called _fixuns*, unsigned float
   are called _floatun* (without s), but the var was using there
   the extra s and so didn't match
3) the variable didn't cover any of the TF <-> TI conversions,
   only TF <-> DI conversions
4) nothing in libgcc_s.so was handled, as those object files are
   called *_s.o rather than *.o and IBM128_SHARED_OBJS used wrong
   syntax of the GNU make substitution reference, which should be
   $(var:a=b) standing for $(patsubst a,b,$(var)) but it used
   $(var:a:b) instead

2021-04-03  Jakub Jelinek  <jakub@redhat.com>

PR target/97653
* config/rs6000/t-linux (IBM128_STATIC_OBJS): Fix spelling, use
$(objext) instead of $(object).  Use _floatunditf instead of
_floatunsditf.  Add tf <-> ti conversion objects.
(IBM128_SHARED_OBJS): Use proper substitution reference syntax.

(cherry picked from commit cda41ce0e8414aec59e6b9fbe645d96e6e8193e2)
libgcc/config/rs6000/t-linux
This page took 0.063381 seconds and 6 git commands to generate.