Re: Building gcc with broken gfortran

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 11, 2019 at 09:01:51AM -0500, NightStrike wrote:
> On Wed, Jan 9, 2019 at 1:30 PM Steve Kargl
> <sgk@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Wed, Jan 09, 2019 at 01:20:35PM -0500, NightStrike wrote:
> >
> > >>  How are people currently building gfortran successfully?
> > >
> >
> > % cd $HOME/gcc/gccx
> > % svn update
> > % cd ../objx
> > % rm -rf *
> > % ../confx
> > % gmake -j6 bootstrap
> > % gmake -j6 check-fortran
> > % gmake install
> > % cat ../confx
> >
> > #! /bin/sh
> >
> > CC=/usr/local/bin/gcc8
> > export CC
> > CXX=/usr/local/bin/g++8
> > export CXX
> > LD_LIBRARY_PATH=/usr/local/lib/gcc8
> > export LD_LIBRARY_PATH
> > LD_RUN_PATH=/usr/local/lib/gcc8
> > export LD_RUN_PATH
> >
> > ../gccx/configure --prefix=$HOME/work/x --enable-languages=c,fortran \
> >   --enable-bootstrap --disable-nls
> 
> Does that work on RHEL or Cent 6?  I don't see much different in what
> I'm doing, other than wanting the faster clock_gettime.

I use neither RHEL nor Cent 6.  May be that's you're problem. :)

Have you tried the above exactly as I have typed it qout?  Your
configure line starts with "../configure" suggesting that
you are building within the source code directory.  Isn't
that taboo?  What happens if you remove --enable-libstdcxx-time=rt?

I don't understand what you mean by "wanting the faster clock_gettime".
gfortran's system_clock() will use clock_gettime if configure finds
that it is available on your system.

% nm objx/x86_64-unknown-freebsd13.0/libgfortran/system_clock.o
0000000000000000 T _gfortran_system_clock_4
0000000000000000 T _gfortran_system_clock_8
                 U clock_gettime
 
program foo
   implicit none
   integer(8) count1, count2, rate, cmax
   call system_clock(count1, rate, cmax)
   print '(A,I0)', 'count = ', count1
   print '(A,I0)', ' rate = ', rate
   print '(A,I0)', ' cmax = ', cmax
   call system("sleep 1")           ! sleep for 1 second + plus system
   call system_clock(count2)
   print '(A,I0)',   ' count = ', count2
   print '(A,F8.4)', 'elaspe = ', real(count2 - count1, 8) / rate
end program foo

% gfcx -o z d.f90 && ./z
count = 2588092417916290
 rate = 1000000000
 cmax = 9223372036854775807
 count = 2588093482115892
elaspe = 1.0642



-- 
Steve



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux