Samba 3.5.6 and determining ld version

Michael Wood esiotrot at gmail.com
Fri Nov 26 09:10:37 MST 2010


Hi

On 26 November 2010 16:29, Björn Jacke <bj at sernet.de> wrote:
> On 2010-11-26 at 10:29 +0100 Björn JACKE sent off:
>> if that is what "gcc -Wl,-v /dev/null 2>/dev/null" gives, can you please test
>> what "gcc -Wl,-v /dev/null 2>/dev/null < /dev/null" gives there?
>
> just tested it - I see, everything goes to stderr there also with /dev/null
> piped in. Tom, Olaf can you test the attached patch, please?

> From 862ab8e79e0cd5b823f503e658b8da3293aa80b3 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj at sernet.de>
> Date: Fri, 26 Nov 2010 15:14:14 +0100
> Subject: [PATCH] s3/configure: fix GNU ld version detection with old gcc releases
>
> needed as old gcc releases output everything to stderr, even stdout output from
> ld
> ---
>  source3/configure.in |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/source3/configure.in b/source3/configure.in
> index 1d2c616..a416b03 100644
> --- a/source3/configure.in
> +++ b/source3/configure.in
> @@ -215,7 +215,7 @@ dnl Certain versions of GNU ld the default is not to have the
>  dnl --allow-shlib-undefined flag defined.  This causes a stackload of
>  dnl warnings when building modules.
>  if test "$ac_cv_prog_gnu_ld" = "yes"; then
> -	ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2>/dev/null | head -1`
> +	ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2>&1 < /dev/null | egrep "GNU ld"`

No need for "egrep" here.  Plain "grep" or "grep -F" will work.

>  	AC_MSG_CHECKING(GNU ld release date)
>  	changequote(,)dnl
>  	ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
> --
> 1.7.3.1

-- 
Michael Wood <esiotrot at gmail.com>


More information about the samba-technical mailing list