From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Mike Frysinger <vapier@gentoo.org>,
gdb-patches@sources.redhat.com, gdb-patches@sourceware.org
Subject: [PATCH] GDB: PPC: sim: fix cross-compilation
Date: Mon, 17 Feb 2014 20:10:00 -0000 [thread overview]
Message-ID: <20140217200922.GM573@drone.musicnaut.iki.fi> (raw)
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 <aaro.koskinen@iki.fi>
* 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
next reply other threads:[~2014-02-17 20:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 20:10 Aaro Koskinen [this message]
2014-02-17 22:15 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140217200922.GM573@drone.musicnaut.iki.fi \
--to=aaro.koskinen@iki.fi \
--cc=gdb-patches@sources.redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox