[Oneiric] [PATCH 0/1] LP#824377 -- fix relative include files in linux-libc-dev

Andy Whitcroft apw at canonical.com
Fri Sep 16 12:20:30 UTC 2011


We are seeing a number of FTBSs in Oneiric in userspace packages.
The common theme is that they use the -I- option with gcc.  This changes
implicit search order for header files, specifically it removes "the same
directory as the current header" from the search path.  This directly
affects any system header files which include local variants using this
mechanism.  For example unistd.h on x86 includes a 32 or 64 bit variant
as below:

    # ifdef __i386__
    #  include "unistd_32.h"
    # else
    #  include "unistd_64.h"
    # endif

As the use of -I- is not an unreasonable thing for userspace to do those headers should be corrected to use the appropriate #include <> form as below:

    # ifdef __i386__
    #  include <asm/unistd_32.h>
    # else
    #  include <asm/unistd_64.h>
    # endif

As this is un unbounded problem, any number of headers might use this idom
at any time I have modified the header file generation phase to substitute
in the appropriate path.

Proposing for Oneiric.

-apw

Andy Whitcroft (1):
  UBUNTU: SAUCE: headers_install: fix #include "..." usage for
    userspace

 scripts/Makefile.headersinst |    4 ++--
 scripts/headers_install.pl   |    8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
1.7.4.1





More information about the kernel-team mailing list