[ET Trac] [Einstein Toolkit] #1845: remove fortran compiler option -m128bit-long-double from general option lists

Einstein Toolkit trac-noreply at einsteintoolkit.org
Mon Dec 7 19:30:39 CST 2015


#1845: remove fortran compiler option -m128bit-long-double from general option
lists
------------------------+---------------------------------------------------
 Reporter:  knarf       |       Owner:                     
     Type:  defect      |      Status:  new                
 Priority:  minor       |   Milestone:  ET_2016_05         
Component:  SimFactory  |     Version:  development version
 Keywords:              |  
------------------------+---------------------------------------------------
 According to the documentation:
 {{{
 -m96bit-long-double
 -m128bit-long-double
     These switches control the size of long double type. The i386
 application binary interface specifies the size to be 96 bits, so -m96bit-
 long-double is the default in 32 bit mode.

     Modern architectures (Pentium and newer) would prefer long double to
 be aligned to an 8 or 16 byte boundary. In arrays or structures conforming
 to the ABI, this would not be possible. So specifying a -m128bit-long-
 double will align long double to a 16 byte boundary by padding the long
 double with an additional 32 bit zero.

     In the x86-64 compiler, -m128bit-long-double is the default choice as
 its ABI specifies that long double is to be aligned on 16 byte boundary.

     Notice that neither of these options enable any extra precision over
 the x87 standard of 80 bits for a long double.

     Warning: if you override the default value for your target ABI, the
 structures and arrays containing long double variables will change their
 size as well as function calling convention for function taking long
 double will be modified. Hence they will not be binary compatible with
 arrays or structures in code compiled without that switch.
 }}}

 The problem with this switch is that it is target-specific; it is only
 defined for Intel platforms. Option lists like 'debian.cfg' should not be
 target specific. I don't know why this flag was given, and from above docu
 I can only imagine it is to preserve binary-compatibility between 32bit
 and 64bit long doubles. On the other hand, I have no idea how that plays
 out with linked libraries that might have been compiled differently, and
 also I have no idea where we would actually use Fortran long doubles.

 Thus, I here propose to remove this flag, at least from general option
 lists (not machine-specific), unless of course someone objects and can
 name a good reason to keep it. Currently it prevents option lists like
 debian.cfg or ubuntu.cfg from compiling on non-Intel platforms.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1845>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list