[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: speed up configure for releases
From: |
Jim Meyering |
Subject: |
Re: [PATCH] build: speed up configure for releases |
Date: |
Tue, 20 Mar 2012 19:25:17 +0100 |
Eric Blake wrote:
> On 03/20/2012 10:35 AM, Eric Blake wrote:
>> On 03/17/2012 03:34 AM, Jim Meyering wrote:
>>> Since I rarely configure without using a cache, I suspect
>>> that the speed difference will be negligible for me.
>>>
>>> On the other hand, for most people, even a speed-up of just
>>> a few seconds would probably be welcome.
>>>
>>> How about a compromise: leave the code there, but guard it with
>>> some new envvar setting that is normally off.
>>> Then add something to my-distcheck so that for at least one
>>> ./configure run it is enabled. That will preserve the safety net
>>> *and* save most people the cost of those added tests.
>>
>> Cool idea - I'm playing with an m4_syscmd wrapper that conditionally
>> invokes the macro based on the current environment of the autoconf
>> process, as well as the counterpart to cfg.mk that sets the envvar.
>
> Hmm; we haven't used GNULIB_POSIXCHECK in quite some time. Using
> GNULIB_POSIXCHECK inside the gnulib directory currently spits out
> several warnings on existing gnulib modules; most, if not all, are
> probably spurious. And limiting the check to just coreutils source
> code, by doing:
>
> ./configure --enable-gcc-warnings
> make
> make -C src clean
> make CFLAGS=-DGNULIB_POSIXCHECK=1 -k
>
> generated 1337 lines of errors where we used a function without a gnulib
> module. Each of those lines calls out the culprit, but you can filter
> it down to the specific module complaints, using:
>
> make CFLAGS=-DGNULIB_POSIXCHECK=1 -k 2>&1 \
> | sed -n '/.* error:/ s///p' | sort -u
>
> to come up with this list:
>
...
> call to 'rpl_fseek' declared with attribute warning: fseek cannot
> handle files larger than 4 GB on 32-bit platforms - use fseeko function
> for handling of large files [-Werror]
Thanks!
Here's one, already:
>From 29d08be861464698f84c24f1bb14ea37ffc0ca72 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 20 Mar 2012 19:21:01 +0100
Subject: [PATCH] tac: avoid malfunction when reading 4GiB or more from a pipe
* src/tac.c (temp_stream): Use fseeko, not fseek, to avoid the
4GiB limitation on 32-bit platforms.
---
src/tac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tac.c b/src/tac.c
index 670b20d..b50382d 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -470,7 +470,7 @@ temp_stream (FILE **fp, char **file_name)
}
else
{
- if (fseek (tmp_fp, 0, SEEK_SET) < 0
+ if (fseeko (tmp_fp, 0, SEEK_SET) < 0
|| ftruncate (fileno (tmp_fp), 0) < 0)
{
error (0, errno, _("failed to rewind stream for %s"),
--
1.7.10.rc1.23.g16a10
- [PATCH] build: speed up configure for releases, Eric Blake, 2012/03/14
- Re: [PATCH] build: speed up configure for releases, Erik Auerswald, 2012/03/14
- Re: [PATCH] build: speed up configure for releases, Jim Meyering, 2012/03/17
- Re: [PATCH] build: speed up configure for releases, Jim Meyering, 2012/03/17
- Re: [PATCH] build: speed up configure for releases, Eric Blake, 2012/03/20
- [PATCHv2] build: speed up configure for releases, Eric Blake, 2012/03/20
- Re: [PATCHv2] build: speed up configure for releases, Eric Blake, 2012/03/20
- Re: [PATCHv2] build: speed up configure for releases, Jim Meyering, 2012/03/20
Re: [PATCH] build: speed up configure for releases, Jim Meyering, 2012/03/17