This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed, PATCH] Fix sim build

On 02 Apr 2015 05:50, H.J. Lu wrote:
> On Wed, Apr 1, 2015 at 10:35 PM, Mike Frysinger 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/

err, yeah, obviously you're right :).  the sim provides srcroot, but that 
doesn't look common, and there doesn't seem to be a buildroot.  the latest
tree is working for me now.  thanks!

Attachment: signature.asc
Description: Digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]