[PATCH] build: add -Wl,-rpath=path to $gmplibs (issue 7124057)

Mike Stump mikestump@comcast.net
Fri Jan 18 17:49:00 GMT 2013


On Jan 17, 2013, at 12:05 PM, minux <minux.ma@gmail.com> wrote:
> On Fri, Jan 18, 2013 at 3:39 AM, Mike Stump <mikestump@comcast.net> wrote:
>> On Jan 17, 2013, at 11:11 AM, minux.ma@gmail.com wrote:
>>> some systems (notably NetBSD), doesn't place the path where libgmp,
>> 
>> I think gcc should try and build and run a gmp program and fail to configure if the binary can't also run.  This prevents configuring and building on such a system.  The gcc directions for building gmp and friends should say that they must be configured and built with --disable-shared --enable-static if the user doesn't have the installed lib directory in their environment.
> 
> any opinions on this? this is very easy to implement with AC_TRY_RUN and
> at least it will make the problem turn up early instead of when it's about to
> configure libgcc (with the confusing error "gcc not able to compile").
> of course, i will exclude the case when we're cross compiling gcc.

I don't think that's a wise idea (to exclude the cross compiling case).  The notion is, we need to preflight the sanity (since some people are insane) of the libraries.  If we find they are insane, in any way, then we can't use them, period.  At no time, did I mention the word cross, therefore, it is wrong to insert it.

Now, if a library isn't used for cross compilation, then trivially, the check should be avoided for cross; but that isn't the case here.

?

Now, I'm happy to have a shared library expert weigh in and explain why we should not fail the build…  I'm happy to defer to them, if there is a compelling reason why someone would compile things this way.  I just can't help but think we serve the user more by insisting up front, on being able to find the libraries at run time.

Oh, wait, AC_TRY_RUN, ac doesn't like cross…  must exclude cross, cause ac doesn't do cross…  if that was the motivation…  oh, I get it now.  Hum…  only a full canadian cross should pose a problem.  In a normal cross, one can still run on the host, as it is the same as the build machine…  Yeah, unfortunate…  but, ok, I agree with that.  I'd rather have the check, if only applicable to a subset; though, if there is a way to manage the full solution, that would be preferred.



More information about the Gcc-patches mailing list