[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Newest Native Binutils release....



Hello again Vincent,

Thank you for the quick reply. Applies the patch in the binutils source tree, and the compilation completed (had already fixed the EOF issues :) ).

Can't test it yet since I am in the middle of a native GCC build, just over half way thru stage 2. Not sure it would be safe to replace Bintuils while compiling, but if someone thinks otherwise, I have no problems doing it.

Keith

On Wed, 16 Jan 2008, Vincent Rivière wrote:

NB: I send this reply to the list because it can be interesting.

Keith Scroggins wrote:
This is the problem I had with Binutils (latest patch)

make[4]: Entering directory `/d/usr/local/src/binutils-2.18-build/ld'
/bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -o ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o sha1.o em68kmint.o ../bfd/libbfd.la ../libiberty/libiberty.a libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -o ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o sha1.o em68kmint.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ldemul.o:/usr/local/src/binutils-2.18-build/ld/../../binutils-2.18/ld/ldemul.c:(.data+0x0): undefined reference to `_ld_m68kmint_emulation'
collect2: ld returned 1 exit status
make[4]: *** [ld-new] Error 1

I'll see if I can dig up some time to look further into why that happened. Since my Falcon is actively building, it is kind of slow at the moment.

If it matters, my current config (which may still cause me problems)

Sparemint released GCC 2.95.3
Sparemint released MiNTLib (I'll rebuild immediately after GCC works or fails with CVS + patches)
Your Binutils 2.18 from December

Now I have a working EasyMiNT configuration on ARAnyM. So I have made some investigation. The problem looked strange, because I have cross-compiled the native binutils without any problem.

And finally, the culprit is... bash !!

The problem is in ld/genscripts.sh.
That script is used to generate the file em68kmint.c and the linker scripts. At the top, we can find the usual #!/bin/sh At the bottom, it uses ${BASH_LINENO[0]}, but only if the shell is actually bash.

There is a different behavior on the different bash versions when it is invoked as sh. With a recent bash (like the one I use in Cygwin), that BASH_LINENO works as expected. But with the old one provided with EasyMiNT, BASH_LINENO fails, then the file em68kmint.c is generated but empty. And of course, there is a link error.

I have attached a quick fix for that problem.
And after that... you have a native build of binutils 2.18 !

Some other advices:
1) The makeinfo package from Sparemint has to be installed in order to make the build success
3) Before running make install, be sure to do:
stack /usr/bin/install -S 256K

I will include that additional patch in my next release.

By the way, the BASH_LINENO problem has already been here for binutils 2.18. I can't understand why you didn't have the problem with the previous version of the patch...

Enjoy !

--
Vincent Rivière