ifunc function in home-build glibc, executables linked against that libm.a and PIE

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

 



[ This might not be the right mailing list to ask, but I want to start somewhere - google-ing ifunc and pie didn't bring me any answers ]

I have made a home-build glibc-2.17 (on a core-avx system). It works great - linking against it (instead of using the current Debian-Testing's eglibc-2.13) brought the wall-clock time of my weather forecasting job down from 3:35 hours to 2:45 (mostly due to a more efficient implementation of powf, expf and logf).

However, if I try to link another weather model against that libm.a, I get an error saying that you cannot link an executable with 'ifunc' functions like 'cos'; however, the following "just works":

      double precision x
      read*,x
      print*,exp(x)
      print*,log(x)
      print*,sin(x)
      print*,cos(x)
      print*,tan(x)
      print*,asin(x)
      print*,acos(x)
      print*,atan(x)
      end

and also if I replace "double precision" with "real".

So perhaps it's the special way the weather model's executable is linked:

gfortran -g -Wl,-M -Wl,-export-dynamic master.o C_code.o _odb_glue.o -Wl,--start-group -L/scratch/harmonie/hm_home/trunk/lib/linux.gfortran.mpi/src -lxrd -lxla -ltfl -ltal -lsur -larp -lald -lbla -lmpa -lmse -lsurfex -lbip -lsat -luti -lodb -lodbport -lCCMA -lECMA -Wl,--end-group dummies.o \ -L/scratch/harmonie/hm_home/trunk/lib/linux.gfortran.mpi/src -lodbdummy -L/scratch/harmonie/hm_home/trunk/lib/linux.gfortran.mpi/src -lrgb -lgribex -lbufr -L/home/harmonie/grib_api -lgrib_api_f90 -lgrib_api -lnetcdff -lnetcdf -llapack -lblas -lmpi_f90 -lmpi_f77 -lmpi -lpthread -o /scratch/harmonie/hm_home/trunk/lib/linux.gfortran.mpi/src/MASTERODB > /scratch/harmonie/hm_home/trunk/lib/linux.gfortran.mpi/src/load.map

The error occurs if I put my glibc-2.17's libm.a between "-lpthread" and "-o".

Anyone have a suggestion (or a mailing list better suited for this question) ?

Thanks in advance,

--
Toon Moene - e-mail: toon@xxxxxxxxx - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news


[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