public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw2@infradead.org>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/8] extend make headers_check to detect more problems
Date: Mon, 18 Sep 2006 08:21:52 +0200	[thread overview]
Message-ID: <20060918062152.GA7088@uranus.ravnborg.org> (raw)
In-Reply-To: <20060918013216.335200000@klappe.arndb.de>

> --- linux-cg.orig/scripts/hdrcheck.sh	2006-09-18 02:04:44.000000000 +0200
> +++ linux-cg/scripts/hdrcheck.sh	2006-09-18 02:04:45.000000000 +0200
> @@ -1,8 +1,28 @@
>  #!/bin/sh
>  
> +# check if all included files exist
>  for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do
>      if [ ! -r $1/$FILE ]; then
>  	echo $2 requires $FILE, which does not exist in exported headers
>  	exit 1
>      fi
>  done
> +
> +# try to compile in order to see CC warnings, show only the first few
> +CHECK_CFLAGS=`grep @headercheck: $2 | sed -e 's/^.*@headercheck:\([^@]*\)@.*$/\1/'`

The purpose of @headercheck: should be documented sonewhere.
A simple way to do so would be to paste the content of the changelog that
describe it in the top of this file.

> +CFLAGS="-Wall -std=gnu99 -xc -O2 -I$1 ${CHECK_CFLAGS}"
> +tmpfile=`mktemp`
Can't we do this with a hdrchk$$$ filename to avoid using
random entropy for each compile?

> +${CC:-gcc} ${CFLAGS} -c $2 -o $tmpfile 2>&1 | sed -e "s:$1:include:g" >&2
> +
> +# check if object file is empty
> +if [ "`nm $tmpfile`" ] ; then
Replace nm with {NM:-nm} to obtain correct NM when cross compiling.

> +    echo include${2#$1}: warning: non-empty output >&2
Paste output of nm so one can see what is defined?

	Sam

  reply	other threads:[~2006-09-18  6:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1158079495.9189.125.camel@hades.cambridge.redhat.com>
2006-09-18  1:27 ` [patch 0/8] Re: All arch maintainers: 'make headers_check' fails on most architectures Arnd Bergmann
2006-09-18  1:27 ` [patch 1/8] extend make headers_check to detect more problems Arnd Bergmann
2006-09-18  6:21   ` Sam Ravnborg [this message]
2006-09-18  6:45     ` David Woodhouse
2006-09-21 15:13       ` David Woodhouse
2006-09-18  8:05     ` Arnd Bergmann
2006-09-18  8:10       ` David Woodhouse
2006-09-23 11:04   ` David Woodhouse
2006-09-23 13:18     ` Arnd Bergmann
2006-09-18  1:27 ` [patch 2/8] fix byteorder headers for make headers_check Arnd Bergmann
2006-09-18  1:27 ` [patch 3/8] hide kernel-only parts of some installed headers Arnd Bergmann
2006-09-18  1:27 ` [patch 4/8] fix exported flock64 constants Arnd Bergmann
2006-09-18  1:27 ` [patch 5/8] add missing #includes in user space parts of headers Arnd Bergmann
2006-09-18  1:27 ` [patch 6/8] annotate header files for make headers_check Arnd Bergmann
2006-09-18  1:27 ` [patch 8/8] annotate netfilter header " Arnd Bergmann
2006-09-18  1:37 ` [patch 7/8] annotate if_* " Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060918062152.GA7088@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox