[Bug fortran/38268] gfortran doesn't link any 64 bits binaries on Solaris
mt1 at systella dot fr
gcc-bugzilla@gcc.gnu.org
Wed Nov 26 08:28:00 GMT 2008
------- Comment #5 from mt1 at systella dot fr 2008-11-26 08:27 -------
(In reply to comment #4)
> > There is no error on link stage, but gfortran tries to link program with 32
> > bits libraries, not with 64 bits one even I force -m64.
>
> Not quite. The binary is correctly linked against 64-bit libraries, but the
> -R path is not set by default. You need to set it or set LD_LIBRARY_PATH:
>
> (botcazou@ob) ~ $ gfortran -m64 test.f90
> (botcazou@ob) ~ $ ./a.out
> ld.so.1: ./a.out: fatal:
> /nile.build/botcazou/gcc-head/install_sparc/lib/libgfortran.so.3: wrong ELF
> class: ELFCLASS32
> Killed
> (botcazou@ob) ~ $ gfortran -m64 test.f90
> -Wl,-R,/nile.build/botcazou/gcc-head/install_sparc/lib/sparcv9
> (botcazou@ob) ~ $ ./a.out
> Hello, world
>
> (botcazou@ob) ~ $ gfortran -m64 test.f90
> (botcazou@ob) ~ $ ./a.out
> ld.so.1: ./a.out: fatal:
> /nile.build/botcazou/gcc-head/install_sparc/lib/libgfortran.so.3: wrong ELF
> class: ELFCLASS32
> Killed
> (botcazou@ob) ~ $ export
> LD_LIBRARY_PATH=/nile.build/botcazou/gcc-head/install_sparc/lib/sparcv9
> (botcazou@ob) ~ $ ./a.out
> Hello, world
Thanks a lot. I'm trying to build my project with
LDFLAGS=-Wl,-R,/usr/shared-apps/lib/sparcv9
Is there any issue to direclty fix this mistake in gfortran sources ?
Regards,
JKB
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38268
More information about the Gcc-bugs
mailing list