public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] GDB: PPC: sim: fix cross-compilation
@ 2014-02-17 20:10 Aaro Koskinen
  2014-02-17 22:15 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Aaro Koskinen @ 2014-02-17 20:10 UTC (permalink / raw)
  To: Mike Frysinger, gdb-patches, gdb-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] GDB: PPC: sim: fix cross-compilation
  2014-02-17 20:10 [PATCH] GDB: PPC: sim: fix cross-compilation Aaro Koskinen
@ 2014-02-17 22:15 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2014-02-17 22:15 UTC (permalink / raw)
  To: gdb-patches; +Cc: Aaro Koskinen

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

On Monday, February 17, 2014 22:09:22 Aaro Koskinen wrote:
> 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.

correct format for this i think would be:
+2014-02-17  Aaro Koskinen  <aaro.koskinen@iki.fi>
+
+	PR gdb/12202
+	* Makefile.in (psim): Delete $(LIBS) from dependency.

i've pushed our fix with that entry.  thanks!
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-17 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 20:10 [PATCH] GDB: PPC: sim: fix cross-compilation Aaro Koskinen
2014-02-17 22:15 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).