From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5131 invoked by alias); 17 Feb 2014 20:10:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5121 invoked by uid 89); 17 Feb 2014 20:10:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: filtteri5.pp.htv.fi Received: from filtteri5.pp.htv.fi (HELO filtteri5.pp.htv.fi) (213.243.153.188) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Feb 2014 20:10:23 +0000 Received: from localhost (localhost [127.0.0.1]) by filtteri5.pp.htv.fi (Postfix) with ESMTP id E9F9E5A7604; Mon, 17 Feb 2014 22:10:18 +0200 (EET) Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri5.pp.htv.fi [213.243.153.188]) (amavisd-new, port 10024) with ESMTP id 83sI4-8BFBpc; Mon, 17 Feb 2014 22:10:15 +0200 (EET) Received: from drone (91-145-91-118.bb.dnainternet.fi [91.145.91.118]) by smtp4.welho.com (Postfix) with ESMTP id 2F87C5BC017; Mon, 17 Feb 2014 22:10:17 +0200 (EET) Date: Mon, 17 Feb 2014 20:10:00 -0000 From: Aaro Koskinen To: Mike Frysinger , gdb-patches@sources.redhat.com, gdb-patches@sourceware.org Subject: [PATCH] GDB: PPC: sim: fix cross-compilation Message-ID: <20140217200922.GM573@drone.musicnaut.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-SW-Source: 2014-02/txt/msg00537.txt.bz2 Hi, Please consider applying the below trivial patch. When cross-compiling GDB for PPC, there's a prerequisite "-lz" for psim that results in a build failure. With such prerequisite, GNU Make will try to search the library from build machine's /usr/lib which is wrong. On 64-bit Linux build machines the compilation will fail because of this. This has been also reported on other operating systems, see e.g. https://sourceware.org/bugzilla/show_bug.cgi?id=12202. The fix is to delete system library linker options from prerequisite/dependency list as they are not really useful anyway. 2014-02-17 Aaro Koskinen * PR gdb/12202. Fix cross-compilation on PPC by removing compiler library options from psim dependencies. diff -uprN gdb-7.7.orig/sim/ppc/Makefile.in gdb-7.7/sim/ppc/Makefile.in --- gdb-7.7.orig/sim/ppc/Makefile.in 2013-12-08 06:55:48.000000000 +0200 +++ gdb-7.7/sim/ppc/Makefile.in 2014-02-17 21:15:39.645080159 +0200 @@ -552,7 +552,7 @@ PACKAGE_SRC = @sim_pk_src@ PACKAGE_OBJ = @sim_pk_obj@ -psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP) +psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP) $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) run: psim