From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 454 invoked by alias); 19 Jan 2009 13:38:44 -0000 Received: (qmail 387 invoked by alias); 19 Jan 2009 13:38:25 -0000 Date: Mon, 19 Jan 2009 13:38:00 -0000 Message-ID: <20090119133825.386.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/38384] fails to build cross gcc for target hppa64-hp-hpux11.00 in libstdc++/libmath In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dave at hiauly1 dot hia dot nrc dot ca" 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: 2009-01/txt/msg02086.txt.bz2 ------- Comment #38 from dave at hiauly1 dot hia dot nrc dot ca 2009-01-19 13:38 ------- Subject: Re: fails to build cross gcc for target hppa64-hp-hpux11.00 in libstdc++/libmath > There are some strange symptoms. > > I tried to build a simple "Hello, World!" application in 4 variants. > 1. C source using gcc > 2. C source using gcc, static linking > 3. C++ source using g++ > 4. C++ source using g++, static linking > > I will create attachments containing the compile logs. > > 1. Compilation ok, excecution on the target system ok, but ldd on the target > system gives: > ldd: "hello" is not a shared executable. > > 2. Compilation ok, execution on the target system gives: > ./hello: cannot execute binary file > > 3. Linking fails! > > 4. Compilation ok, execution on the target system gives: > ./hello: cannot execute binary file > > Any idea? Use file, chatr, ldd and readelf commands to check file type and ELF information. Compare with native application. GNU ld doesn't create "static" executables (known problem). It can only create dynamic executables. Typically, problems in launching dynamic executables are debugged by running the dynamic linker under gdb. This is hard here because the dynamic linker is proprietary. 3 is probably a binutils bug. I haven't tried a native build using GNU ld for some time. It used to be good enough to do what you want. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38384