libtool-patches
[Top][All Lists]
Advanced

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

Re: compensate compiler warnings and boilerplate


From: Gary V. Vaughan
Subject: Re: compensate compiler warnings and boilerplate
Date: Mon, 11 Apr 2005 09:33:25 +0100
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Hallo Ralf!

Ralf Wildenhues wrote:
> Two problems I want to kill with this patch:
> - picky compiler(s|flags) warn about innocuous code and thus make the
>   `-c -o' and the pic_flag tests (among others) spuriously fail.
> - some proprietary compilers output boilerplate every time.  Same
>   effect on libtool tests.

Excellent idea!

> OK to apply to HEAD and backport?
> 
> I'm unsure whether I should additionally put something like
>     m4_require(_LT_COMPILER_BOILERPLATE)
> at the beginning of respective tests?

By inspection (ie. I haven't actually tested the stuff I'm talking about below):

I think exposes an inconsistency in the way we handle lt_simple_*_test_code.
Since their contents are compiler dependent, we should be declaring:

_LT_TAGVAR(lt_simple_*_test_code, $1)="foo;\n"

Which implies:

# _LT_*_BOILERPLATE([TAG])
# ------------------------
m4_defun([_LT_*_BOILERPLATE],
ac_outfile=conftest.$ac_objext
printf "_LT_TAGVAR(lt_simple_*_test_code, $1)" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
_LT_TAGVAR(_lt_*_boilerplate, $1)=`cat conftest.err`
$RM conftest*
])# _LT_*_BOILERPLATE

And that in turn implies the m4_require can't be used, although the calls to
the BOILERPLATE macros from _LT_LANG_*_CONFIG will need to set the TAG 
correctly.

(Yes, I know there are plenty of other misused overloaded shell variables that
don't yet use the _LT_TAG machinery, but no sense in making things any worse).

>       * m4/libtool.m4 (_LT_COMPILER_BOILERPLATE, _LT_LINKER_BOILERPLATE):
>       New macros: save warnings and boilerplate of simple compile/link tests.
>         (_LT_LANG_C_CONFIG, _LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG,
>         _LT_LANG_GCJ_CONFIG, _LT_LANG_RC_CONFIG): Call. 
>         (_LT_COMPILER_OPTION, _LT_LINKER_OPTION, _LT_COMPILER_C_O, ):
>         Fail only if nonempty warnings different from default compile/link.

Fine for HEAD with the _LT_TAG changes.  How serious is the bug it fixes?  If
you think we will save ourselves considerable pain vs bug reports against the
eventual 2.0 release, I'll leave it to your discretion to backport to
branch-2-0.  I wouldn't waste anymore time on branch-1-5 if at all possible
though.

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]