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

[lintian] 02/03: c/binaries: Improve LFS tag description



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit fa54a4814d756df5c8265393b4a51e771b224f13
Author: Guillem Jover <guillem@debian.org>
Date:   Mon Sep 4 01:01:58 2017 +0200

    c/binaries: Improve LFS tag description
    
    Mention when setting the _FILE_OFFSET_BITS macro is optional, and that
    it does not require renaming function names. Mention the option of
    providing parallel interfaces with _LARGEFILE64_SOURCE for shared
    libraries. Add references to SUSv2 and the glibc manual.
    
    Closes: #874078
    Signed-off-by: Guillem Jover <guillem@debian.org>
---
 checks/binaries.desc | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/checks/binaries.desc b/checks/binaries.desc
index 659c23f..e0731fb 100644
--- a/checks/binaries.desc
+++ b/checks/binaries.desc
@@ -440,10 +440,17 @@ Info: The listed ELF binary appears to be (partially) built without
  those files are not slurped into memory or mmap(2)ed, and that correct
  64-bit data types are used (ex: off_t instead of ssize_t), etc.  Once
  that has been done ensure <tt>_FILE_OFFSET_BITS</tt> is defined and
- set to 64 before the relevant files are included.  This can be done by
- using the <tt>AC_SYS_LARGEFILE</tt> macro with autoconf, or by appending
- the output of <tt>getconf LFS_CFLAGS</tt> and <tt>getconf LFS_LDFLAGS</tt>
- to <tt>CFLAGS</tt> and <tt>LDFLAGS</tt> respectively.
+ set to 64 before any system headers are included (note that on systems
+ were the ABI has LFS enabled by default, setting <tt>_FILE_OFFSET_BITS</tt>
+ to 64 will be a no-op, and as such optional).  This can be done by using
+ the <tt>AC_SYS_LARGEFILE</tt> macro with autoconf which will set any
+ macro required to enable LFS when necessary, or by appending the output
+ of <tt>getconf LFS_CFLAGS</tt> and <tt>getconf LFS_LDFLAGS</tt> to
+ <tt>CFLAGS</tt> and <tt>LDFLAGS</tt> respectively.  Using
+ <tt>_FILE_OFFSET_BITS</tt> should require no system function renames (eg.
+ from open(2) to open64(2)), and if this tag is still emitted, the most
+ probable cause is because the macro is not seen by the system code being
+ compiled.
  .
  Take into account that even if this tag is not emitted, that does not
  mean the binary is LFS-safe (ie. no OOM conditions, file truncation
@@ -451,4 +458,10 @@ Info: The listed ELF binary appears to be (partially) built without
  .
  Also note that enabling LFS on a shared library is not always safe as
  it might break ABI in case some of the exported types change size, in
- those cases a SOVERSION bump might be required.
+ those cases a SOVERSION bump might be required.  Or alternatively, on
+ systems with an ABI without LFS, defining <tt>_LARGEFILE64_SOURCE</tt>
+ and exporting both 32 and 64-bit variants of the interfaces can avoid
+ the SOVERSION bump, at the cost of more complex maintenance.
+Ref:
+ https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html,
+ http://www.unix.org/version2/whatsnew/lfs20mar.html

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: