Problems with out libgcc_s.so in base

Steve Kargl sgk at troutmask.apl.washington.edu
Mon Aug 15 00:20:35 UTC 2016


On Sun, Aug 14, 2016 at 07:34:30PM -0400, Diane Bruce wrote:
> On Sun, Aug 14, 2016 at 04:03:51PM -0700, Steve Kargl wrote:
> > 
> > FreeBSD-ports could avoid libquadmath issues by building gcc
> > without it.  See --without-libquadmath or --without-quadmath (I
> > don't remember the config option because it would be questionable
> > to neuter one of gfortran's strength).
> 
> Correct. This blog entry I read some months ago outlines this
> exact problem we are having and suggests the identical solution.
> 
> http://glennklockwood.blogspot.ca/2014/02/linux-perf-libquadmath-and-gfortrans.html
> 
> quadmath does have an impact on performance.
> 

I read that blog a long time ago.  It is quite humorous, because
the author does not understand the storage requirements of Fortran.
If one uses only the -fdefault-real-8 option to promote REAL to
DOUBLE PRECISION, then storage requirements mandate that DP 
should be promoted to QP (if available).  That's why there is
the -fdefault-double-8.  In additions, these options were never
meant to be used in a situation where performance matters.  These
options are a crutch for lazy programmers, who don't want to properly
port code to a wider precision.   

As the person who actually implemented these options in gfortran
for backwards compatibility with g77, I can assure that very few
people know what these options do.  The problem lies in Fortran's
COMMON and EQUIVALENCE statements, where storage alignment can be
messed up by the -fdefault-* options.  Other than properly porting
code to a wider type, people should use the -freal-* (eg, -freal-4-real-8).  

I submitted a patch to fortran at gcc to deprecate the -fdefault-*
option in January.  The deprecation who have occurred over 2
major releases.  But, too many people objected under POLA. 

> > Freebsd-ports could also use a wrapper:
> > % cat ~/bin/gfc7
> > #! /bin/sh
> 
> Yes. I have also suggested we use a wrapper to the ports guys.
> 

There always the option to link apps that need libgfortran 
with the -static option.

-- 
Steve


More information about the freebsd-ports mailing list