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

Re: [MiNT] binutils 2.18 patch



On Sun, 2008-04-06 at 22:31 +0200, Vincent Rivière wrote:
> Alan Hourihane wrote:
> > Even though in our build circumstances it shouldn't be hit, if we try
> > and switch on the --enable-shared flag, then the binutils build will
> > fail.
> > 
> > The attached patch fixes this problem, and follows the msdosdjgpp
> > settings for turning it off again.
> 
> Hello Alan.
> 
> I had a closer look to your patch, and I'm quite confused...
> You made modifications in all the configure scripts of the binutils. The 
> line you modified is actually generated from the file libtool.m4, in the 
> autoconf macro _LT_COMPILER_PIC. It is the used for generating all the 
> configure scripts, except in libiberty.

O.k. libtool.m4 is ok to modify too :-)

> That macro is intended to find the correct option for enabling PIC 
> compilation, which defaults to -fPIC. That option is unsupported by our 
> MiNT GCC, which will fail when trying to compile a file.
> 
> That default seems good to me.

We should follow the same as DOS. As it says... 

"DJGPP does not support shared libraries at all"

in the comment in libtool.m4, and neither does MiNT.

> Without applying your patch, I tried to cross-compile the binutils for 
> the MiNT host, using --enable-shared, and I got the following error very 
> early when building libiberty :
> ../../binutils-2.18-mint-20080228/libiberty/regex.c:1: error: -fpic is 
> not supported on this target

Right, and that's the problem. It needn't bail like that with the patch.

> So it seems that your patch is useless...

Nope.

> Did you find a good reason for adding that additional test ?

As above.

Alan.