From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11948 invoked by alias); 26 Nov 2008 08:28:43 -0000 Received: (qmail 5332 invoked by uid 48); 26 Nov 2008 08:27:19 -0000 Date: Wed, 26 Nov 2008 08:28:00 -0000 Message-ID: <20081126082719.5331.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/38268] gfortran doesn't link any 64 bits binaries on Solaris In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mt1 at systella dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg02239.txt.bz2 ------- 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