Re: gcc-help Digest 17 Jul 2007 16:12:44 -0000 Issue 2448

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

 



On 7/19/07, Saurabh Verma <saurabh.verma@xxxxxxxxxx> wrote:
On 7/19/07, Saurabh Verma <saurabh.verma@xxxxxxxxxx> wrote:
> On Thu, 2007-07-19 at 05:18 -0400, NightStrike wrote:
> > No, it's not.  But it never was before.  --with-mpfr should specify
> > the root, and set --with-mpfr-lib and --with-mpfr-include accordingly.
> >  If it didn't, then that makes --with-mpfr-lib pretty useless...  From
> > ./configure --help:
> >
> > --with-mpfr=PATH        specify prefix directory for installed MPFR package.
> >                         Equivalent to --with-mpfr-include=PATH/include
> >                         plus --with-mpfr-lib=PATH/lib
> hi,
>         Not sure about the status before, but AFAIK with-mpfr and with-include
> are only build-time flags (so that xgcc can build). To run xgcc you have
> to ensure that the dynamic linker can find the libs, and so have to give
> the path in LD_LIBRARY_PATH too. Of course the compiler can be built
> with rpath set, but i don't know if that is put in the gcc build yet.
>
> regards
> saurabh

> On Thu, 2007-07-19 at 06:27 -0400, NightStrike wrote:
> >
> > Why would --with-mpfr not be passed on to xgcc?  Seems like it's only
> > half-implemented, then.

> --with-mpfr is a configure option, so it is used at the time of building
> xgcc. Once xgcc is built, AFAIK the flag does not affect its run-time
> behavior. So, you can use any copy of the mpfr lib with gcc, once it is
> built (which you would not be able to do, if the mpfr lib path was
> hardcoded in the compiler).
>

Ok, I understand that much, but I don't think it has to be hard coded
into xgcc.  Why can't you just have configure set a variable and use
it to build a Makefile that passes the right library path as a
parameter to xgcc?  In Makefile.in, instead of:

GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./
-B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem
$(build_tooldir)/sys-include -L$(objdir)/../ld

Use something like:

GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./
-B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem
$(build_tooldir)/sys-include -L$(objdir)/../ld @MPFR-LIB@

Then have configure set @MPFR-LIB@ to -B$--with-mpfr-lib (I don't know
what the argument to with-mpfr-lib gets sent to).

That way, if --with-mpfr-lib is empty, it won't hurt anything.  If you
*do* use with-mpfr, then it will have the desired effect, and nothing
will be hard coded into xgcc.


Does any of that seem reasonable?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux