patches/linux/3.0.9/100-headers_install-fix-__packed-in-exported-kernel-head.patch
author Matthieu Crapet <mcrapet@gmail.com>
Wed Jun 06 12:03:12 2012 +0200 (2012-06-06)
changeset 2991 252ade1e9e17
parent 2735 f09ed6dd71a3
permissions -rw-r--r--
libc/eglibc: fix missing LIBC_TRY_CC_OPTION definition (eglibc 2.15)

Upstream SVN is currently broken:
http://www.eglibc.org/svn/branches/eglibc-2_15/libc/

LIBC_TRY_CC_OPTION macro is not defined in aclocal.m4.
This patch fix the configure script.

Once upstream branch will be fixed this patch could be reverted.

Related patch (committed to eglibc trunk):
Use autoconf macro for testing compiler options with empty input
http://sourceware.org/ml/libc-alpha/2012-03/msg00816.html

Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>

diff -r 1f6c8e4b2b92 -r d10afc5bcc25
patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch
     1 commit f210735fe2f17a6225432ee3d1239bcf23a8659c
     2 Author: Markus Trippelsdorf <markus@trippelsdorf.de>
     3 Date:   Fri Jun 24 15:51:00 2011 +0200
     4 
     5     headers_install: fix __packed in exported kernel headers
     6     
     7     checkpatch.pl warns about using __attribute__((packed)) in kernel
     8     headers: "__packed is preferred over __attribute__((packed))". If one
     9     follows that advice it could cause problems in the exported header
    10     files, because the outside world doesn't know about this shortcut.
    11     
    12     For example busybox will fail to compile:
    13      CC      miscutils/ubi_attach_detach.o
    14      In file included from miscutils/ubi_attach_detach.c:27:0:
    15      /usr/include/mtd/ubi-user.h:330:3: error: conflicting types for ‘__packed’
    16      /usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
    17     ...
    18     
    19     Fix the problem by substituting __packed with __attribute__((packed)) in
    20     the header_install.pl script.
    21     
    22     Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
    23     CC: Joe Perches <joe@perches.com>
    24     Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
    25     Signed-off-by: Michal Marek <mmarek@suse.cz>
    26 
    27 diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
    28 index efb3be1..48462be 100644
    29 --- a/scripts/headers_install.pl
    30 +++ b/scripts/headers_install.pl
    31 @@ -35,6 +35,7 @@ foreach my $file (@files) {
    32  		$line =~ s/([\s(])__iomem\s/$1/g;
    33  		$line =~ s/\s__attribute_const__\s/ /g;
    34  		$line =~ s/\s__attribute_const__$//g;
    35 +		$line =~ s/\b__packed\b/__attribute__((packed))/g;
    36  		$line =~ s/^#include <linux\/compiler.h>//;
    37  		$line =~ s/(^|\s)(inline)\b/$1__$2__/g;
    38  		$line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;