[Top][All Lists]

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

Re: AW: new snapshot available: coreutils-7.4.125-eca6

From: Jim Meyering
Subject: Re: AW: new snapshot available: coreutils-7.4.125-eca6
Date: Tue, 18 Aug 2009 12:14:15 +0200

Voelker, Bernhard wrote:
> Jim Meyering wrote:
>> coreutils began the switch to C99 years ago, and that sort of
>> initialization is a new addition.  We did debate whether to use the
>> new-to-coreutils construct.  However, if that's the only bit of code
>> that causes build failure for this compiler, I may accommodate it with
>> the attached patch:
> thanx for the quick response.
> Side note: according to the help output, this compiler supports C99
> syntax:
>       -xc99[=<a>]     Enable ISO C99 features, <a>={%all,%none}
> but using that option doesn't make any difference.
> Changing the code using your patch makes `make` work.
> Unfortunately, `make check` also fails:
>   CC     stdbuf.o
> "stdbuf.c", line 214: warning: non-constant initializer: op "NAME"
> "stdbuf.c", line 214: left operand must be modifiable lvalue: op "="
> "stdbuf.c", line 261: cannot recover from previous errors
> cc: acomp failed for stdbuf.c
> I guess it hit on the const declarations.
> The source stdbuf.c compiles if I change this:

Actually it's a deeper problem.
On your system, stdbuf-related code should not be compiled at all.
The fact that it's being compiled is due to the check-AUTHORS
rule, (run via "make check").  Here's a patch to make it so
"make check" no longer runs that check:

>From 4ae5becee3cd9ae0c2630e9c7fda8c2612c414cf Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 18 Aug 2009 12:12:21 +0200
Subject: [PATCH] build: perform check-AUTHORS via syntax-check, not via "make 

* src/Makefile.am (check): Don't depend on check-AUTHORS.
That check fails on systems for which a program like stdbuf is
not built.  Instead, move this check to "make syntax-check".
* cfg.mk (sc_check-AUTHORS): New rule.
Reported by Berhnard Voelker.
 cfg.mk          |    4 ++++
 src/Makefile.am |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 34123d5..7a26f4f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -176,6 +176,10 @@ ALL_RECURSIVE_TARGETS += sc_tight_scope
        @$(MAKE) -C src $@

+       @$(MAKE) -C src $@
 # Perl-based tests used to exec perl from a #!/bin/sh script.
 # Now they all start with #!/usr/bin/perl and the portability
 # infrastructure is in tests/Makefile.am.  Make sure no old-style
diff --git a/src/Makefile.am b/src/Makefile.am
index 4f21c86..630bea3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -377,7 +377,7 @@ pm = progs-makefile
 pr = progs-readme
 # Ensure that the list of programs in README matches the list
 # of programs we can build.
-check: check-README check-duplicate-no-install check-AUTHORS
+check: check-README check-duplicate-no-install
        rm -rf $(pr) $(pm)

reply via email to

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