Hi Steve,

Steve Langasek wrote:

> Three cheers for the new dpkg-buildflags interface!
>
> I would like to suggest an addition to the default flags:  the output of
> getconf LFS_CFLAGS should be included in the CFLAGS/CXXFLAGS variables.  On
> 32-bit archs, this gives the following:
>
>   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>
> (on 64-bit archs, it returns an empty string.)

I think (for the reasons you mentioned, among others) that this would
be a very scary change.  It also has a negative side-effect that
Debian would no longer be doing its part to get

 #define _LARGEFILE_SOURCE
 #define _FILE_OFFSET_BITS 64

put directly in upstream's config.h when appropriate.

> I make this suggestion because we had lfs as a release goal nearly a decade
> ago already, and we've never really had very good coverage for this and made
> very little progress since then.

I wonder if it's possible to check the archive in some automated way
for large file support problems.  For example, on i386:

        eu-readelf -s $binary | grep -e '\Wopen@'

Of course, this has some false hits when programs are deliberately
using the old-fashioned APIs to read or write files that they know
will be small (dash does that, for example).

Hmm, running that command on binaries in /usr/bin/ tells a worse story
than I expected.  For example, dpkg itself doesn't seem to have
large-file support.  An optional build flag specification for this
(like the current DEB_BUILD_MAINT_OPTIONS=hardening=pie) doesn't sound
like a terrible idea, though as mentioned above it's better if people
patch the upstream build systems instead of using it. :)

I'd be happy to see progress on this.

Thanks,
Jonathan



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to