[committed, PATCH] Fix sim build
H.J. Lu
hjl.tools@gmail.com
Thu Apr 2 12:50:00 GMT 2015
On Wed, Apr 1, 2015 at 10:35 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> 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
These are 3 patches I pushed. I used
zlibdir="-L\$(top_builddir)/../zlib"
zlibinc="-I\$(top_srcdir)/../zlib"
since top_xxx is relative to configure. I also added top_srcdir to
gdb/Makefile.in.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-zlibdir-zlibinc-with-top_builddir-top_srcdir.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150402/445df5f8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Regenerate-configure-in-sim.patch
Type: text/x-patch
Size: 16264 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150402/445df5f8/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Regenerate-configure-in-bfd-binutils-gas-gdb-gold.patch
Type: text/x-patch
Size: 5079 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150402/445df5f8/attachment-0002.bin>
More information about the Binutils
mailing list