public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 5/8] kbuild: add fine grained build dependencies for exported symbols
Date: Thu, 3 Mar 2016 23:57:56 +0100	[thread overview]
Message-ID: <56D8C174.70602@suse.com> (raw)
In-Reply-To: <1456717691-28298-6-git-send-email-nicolas.pitre@linaro.org>

Dne 29.2.2016 v 04:48 Nicolas Pitre napsal(a):
> +# Filter out exported kernel symbol names advertised as warning pragmas
> +# by the preprocessor and write them to $(1). We must consider continuation
> +# lines as well: they start with a blank, or the preceeding line ends with
> +# a ':'. Anything else is passed through as is.
> +# See also __KSYM_DEP() in include/linux/export.h.
> +ksym_dep_filter = sed -n \
> +	-e '1 {x; $$!d}' \
> +	-e '/^ / {H; $$!d}' \
> +	-e 'x; /:$$/ {x; H; $$!d; s/^/ /; x}' \
> +	-e ':filter; /^.*KBUILD_AUTOKSYM_DEP: /! {p; b next}' \
> +	-e 's//KSYM_/; s/\n.*//; w $(1)' \
> +	-e ':next; $$!d' \
> +	-e '1 q; s/^/ /; x; /^ /! b filter'

This is unreadable and it does not work with my gcc version. I get
dependencies like

    $(wildcard include/config/ksym/simple/strtoull [enabled by default].h) \

Please use some other way, which does not require parsing the compiler
diagnostic messages. A straightforward solution is to do something
similar to genksyms: A separate preprocessor pass with -Dsomething that
leaves the EXPORT_SYMBOL statements alone and just collect their occurences.

Thanks,
Michal

  reply	other threads:[~2016-03-03 22:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29  3:48 [PATCH v4 0/8] [PULL REQUEST] Trim unused exported kernel symbols Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 1/8] kbuild: record needed exported symbols for modules Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 2/8] allow for per-symbol configurable EXPORT_SYMBOL() Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 3/8] fixdep: accept extra dependencies on stdin Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 4/8] kbuild: de-duplicate fixdep usage Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 5/8] kbuild: add fine grained build dependencies for exported symbols Nicolas Pitre
2016-03-03 22:57   ` Michal Marek [this message]
2016-03-04  2:46     ` Nicolas Pitre
2016-03-04 10:10       ` Michal Marek
2016-02-29  3:48 ` [PATCH v4 6/8] create/adjust generated/autoksyms.h Nicolas Pitre
2016-03-03 22:14   ` Michal Marek
2016-03-04  1:53     ` Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 7/8] kbuild: build sample modules along with the rest of the kernel Nicolas Pitre
2016-02-29  3:48 ` [PATCH v4 8/8] kconfig option for TRIM_UNUSED_KSYMS Nicolas Pitre

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=56D8C174.70602@suse.com \
    --to=mmarek@suse.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.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