This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PR libgcj/44341] introduce --with-target-{gmp,mpfr,...}


On Mon, 17 Jan 2011, Alexandre Oliva wrote:

> This patch addresses the problem that arguments on where to find gmp are
> used by both host (gcc) and target (libgcj) components.  When you're
> cross compiling, that's bound to be a problem.
> 
> I've arranged for the gmp flags to be passed on to target libs only when
> not cross compiling, and for us to support corresponding --with-target-*
> options at the top level, suitable transformed when configuring target
> libraries.

I don't think it makes sense to define lots of --with-target-* options for 
libraries that are, in fact, never used on the target.  As far as I know 
only GMP is used on the target and so that is the only one of these 
libraries that should get new options.

Even there, the options may not really be general enough, in that if you 
are building libgcj, linked against libgmp, for an x86_64-linux-gnu target 
in a multilib configuration, you probably want both 32-bit and 64-bit 
libgmp and so a single option may not suffice to say where they are for 
all multilibs.  However, in this case you'll have a sysroot with the 
target libraries, and target libgmp will need to end up in the sysroot to 
be of use, so the options may not in fact be needed there.

What should be done in general is making it explicit (in install.texi) 
that certain options are host options or target options.  Thus: 
--with-gmp* and other library options are purely host options and do not 
relate to the target at all.  --disable-shared is purely a target option 
and not relevant to the host (see PR 47225).  --disable-nls purely relates 
to translations in the host tools and does not affect locale or 
translation support in libstdc++ or other target libraries.

-- 
Joseph S. Myers
joseph@codesourcery.com


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