[PATCH] GDB: PPC: sim: fix cross-compilation
Aaro Koskinen
aaro.koskinen@iki.fi
Mon Feb 17 20:10:00 GMT 2014
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
More information about the Gdb-patches
mailing list