[committed] Fix sim build
Commit Message
I checked in this patch to fix sim build.
H.J.
* common/Make-common.in (CSEARCH): Remove $(ZLIBINC).
(BFD_LIB): Remove $(ZLIB).
(CONFIG_LIBS): Add $(ZLIB).
* ppc/Makefile.in (ZLIBINC): Removed.
(INCLUDES): Remove $(ZLIBINC).
(BFD_LIB): Remove $(ZLIB).
---
sim/ChangeLog | 9 +++++++++
sim/common/Make-common.in | 7 +++----
sim/ppc/Makefile.in | 10 ++--------
3 files changed, 14 insertions(+), 12 deletions(-)
Comments
On 01 Apr 2015 10:33, H.J. Lu wrote:
> I checked in this patch to fix sim build.
this partially fixes it. the zlib macro is still broken:
# Use the system's zlib library.
zlibdir=-L../zlib
that only works if you try to link zlib when you're one dir deep. the sim is
two dirs deep which leads to failure:
make[2]: Entering directory '/usr/local/src/gnu/gdb/build/build-bfin-mingw/sim/bfin'
i686-w64-mingw32-gcc -DHAVE_CONFIG_H -DWITH_DEFAULT_MODEL='"bf537"' -DPROFILE=1 -DWITH_PROFILE=-1 -DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT -DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN -DWITH_ENVIRONMENT=ALL_ENVIRONMENT -DWITH_HW=1 -DWITH_HOST_BYTE_ORDER=0 -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wno-format -D__USE_MINGW_FSEEK -I. -I../../../../sim/bfin -I../common -I../../../../sim/bfin/../common -I../../include -I../../../../sim/bfin/../../include -I../../bfd -I../../../../sim/bfin/../../bfd -I../../opcodes -I../../../../sim/bfin/../../opcodes -g -O2 -D__USE_MINGW_ACCESS -static-libstdc++ -static-libgcc -Wl,--stack,12582912 -o run.exe \
nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -lm -L../zlib -lz -lm
/usr/libexec/gcc/i686-w64-mingw32/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile:297: recipe for target 'run.exe' failed
make[2]: *** [run.exe] Error 1
the zlib.a is in zlib/, but sim/bfin/ can't see that with -L../zlib. guess you
want -L\$(top_builddir)/lib instead.
-mike
@@ -1,5 +1,14 @@
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
+ * common/Make-common.in (CSEARCH): Remove $(ZLIBINC).
+ (BFD_LIB): Remove $(ZLIB).
+ (CONFIG_LIBS): Add $(ZLIB).
+ * ppc/Makefile.in (ZLIBINC): Removed.
+ (INCLUDES): Remove $(ZLIBINC).
+ (BFD_LIB): Remove $(ZLIB).
+
+2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
+
* arm/configure: Regenerated.
* avr/configure: Likewise.
* bfin/configure: Likewise.
@@ -248,21 +248,20 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
-I../../include -I$(srcroot)/include \
-I../../bfd -I$(srcroot)/bfd \
-I../../opcodes -I$(srcroot)/opcodes \
- @INCINTL@ $(ZLIBINC)
+ @INCINTL@
ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
BUILD_CFLAGS = -g -O $(CSEARCH)
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
ZLIB = @zlibdir@ -lz
-ZLIBINC = @zlibinc@
LIBIBERTY_LIB = ../../libiberty/libiberty.a
-BFD_LIB = ../../bfd/libbfd.a $(ZLIB)
+BFD_LIB = ../../bfd/libbfd.a
@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
OPCODES_LIB = ../../opcodes/libopcodes.a
LIBINTL = @LIBINTL@
LIBINTL_DEP = @LIBINTL_DEP@
-CONFIG_LIBS = @LIBS@
+CONFIG_LIBS = @LIBS@ $(ZLIB)
LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB) \
$(SIM_EXTRA_LIBDEPS)
EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
@@ -152,19 +152,13 @@ MAKEOVERRIDES=
LIB_INCLUDES = -I$(srcdir)/../../include
BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
-ZLIBINC = @zlibinc@
-INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES) $(ZLIBINC)
+INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
LIBIBERTY_LIB = ../../libiberty/libiberty.a
-BFD_LIB = ../../bfd/libbfd.a $(ZLIB)
+BFD_LIB = ../../bfd/libbfd.a
ZLIB = @zlibdir@ -lz
-# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
-# -I../zlib, unless we were configured with --with-system-zlib, in which
-# case both are empty.
-ZLIB = @zlibdir@ -lz
-
LIBINTL = @LIBINTL@
LIBINTL_DEP = @LIBINTL_DEP@
INTL_CFLAGS = @INCINTL@