bug-make
[Top][All Lists]
Advanced

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

Re: [bug #62173] Fix test features/archives.


From: Jeffrey Walton
Subject: Re: [bug #62173] Fix test features/archives.
Date: Sun, 24 Apr 2022 14:46:44 -0400

On Sun, Mar 13, 2022 at 10:49 AM Dmitry Goncharov
<INVALID.NOREPLY@gnu.org> wrote:
>
> Follow-up Comment #2, bug #62173 (project make):
>
> The patch contains the following changes
> ++++
> -my $arflags = 'rv';
> +my $arflags = '-rv';
> +if ($^O eq 'aix') {
> +    $arflags = "-Xany -rv";
> +}
> ----
>
> That reason for the first part of the patch, specifically
> ++++
> -my $arflags = 'rv';
> +my $arflags = '-rv'
> ----
> is the following
>
> The test has the following piece of code
>
> ++++
> $_ = `$ar U$arflags libxx.a a1.o $redir`;
> if ($? == 0) {
>     $arflags = 'Urv';
>     $arvar = "$arvar ARFLAGS=$arflags";
> }
> ----
>
> This piece of code causes $arvar contain $arflags.
> This happens only when ar supports -U. This is relatively new version of gnu
> ar.
> Other systems (not only aix) won't have ar support -U and $arvar on those
> systems does not contain $arflags. The default value of ARFLAGS builtin in
> make was change from 'rv' to -rv' in 0e020bbc24d89592e9ea15f9e8b887a71692eedf.
> This makes the test fail on any system where ar does not support -U.
>
> The other part of the patch, specifically
> ++++
> +if ($^O eq 'aix') {
> +    $arflags = "-Xany -rv";
> +}
> ----
> is indeed aix specific. I originally proposed to use an env var OBJECT_MODE
> and keep arflags intact on aix (see sv 59096). But that robs the user of the
> ability to override the value.
> However, i'd call this change trivial.
>
>
>
> > I have quite a few of similar issues with the test suite on MS-Windows, but
> I never thought I should make changes non-trivial to the test suite to make
> those pseudo-failures pass.  Instead, I eyeball the test diffs to determine
> whether the issue is real or not.
>
> i once had to make a change which affected windows (sv 60774). Once i was able
> to build make, i wanted to check that the test suite passes. It did not. i am
> not familiar with windows. i'd definitely appreciate if the test suite passed.
> Similarly, if you ever have to make a change on sun or aix, etc, you'll
> appreciate if the test suite passes.

Be sure to test the change on OpenBSD. In the past OpenBSD needed the
dash for options. I'm not sure if it is needed nowadays.

Jeff



reply via email to

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