All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: "\"Hänel-Baas, Alexander\"" <alexander.haenel-baas@sieb-meyer.de>,
	"Jan Kiszka" <jan.kiszka@siemens.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Xeno3.x xeno-config --kcflags
Date: Thu, 30 Apr 2015 10:51:04 +0200	[thread overview]
Message-ID: <5541ECF8.1090706@xenomai.org> (raw)
In-Reply-To: <55373FBF.2000807@xenomai.org>

On 04/22/2015 08:29 AM, Philippe Gerum wrote:
> On 04/22/2015 08:14 AM, Hänel-Baas, Alexander wrote:
>> Hi Jan
>>
>> You are right, kbuild resolve it.
>>
>> My mistake: I stored the kcflags in a variable and put this variable in the EXTRA_CFLAGS from the make file.
>> XENOMAI_K_CFLAGS  = $(shell /usr/xenomai/bin/xeno-config --rtdm --kcflags)
>> EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS)
>> The result was: EXTRA_CFLAGS= -Iarch/$(SRCARCH)/xenomai/include.
>>
>> So I need a second expand step from $(SRCARCH).
>> My solution is the eval function:
>> $(eval EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS))
>> And now I get:  EXTRA_CFLAGS= -Iarch/arm/xenomai/include 
>> and now module builds are success full.
>>
>> Thank you very much for your post.
>>
> 
> Actually, this xeno-config --kcflags I came up with is overly and
> uselessly complex. Since we patch the build system for merging the
> Xenomai bits into the kernel image, we could just define a plain make
> variable for holding those extra flags, which depend on the file layout
> of the Xenomai release patched in only, so running a script to get them
> is 100% overkill.
> 
> I'll come up with something simpler in the next days, so that Makefiles
> can just refer to $(RTDM_CFLAGS) or something along these lines.
> 

You won't need any extra CFLAGS anymore for building RTDM drivers, with
this commit from the -next branch:

http://git.xenomai.org/xenomai-3.git/commit/?h=next&id=a3a30499b7ffd9a36c18d909909b4f45bf3f710a

For these changes to take effect, you will have to run the
prepare-kernel.sh script on a fresh kernel, so that the kernel Makefiles
are patched properly.

In other words, with this changes in, you can drop the xeno-config
--kcflags invocation from your Makefiles building RTDM drivers.

-- 
Philippe.


  parent reply	other threads:[~2015-04-30  8:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  6:37 [Xenomai] Xeno3.x xeno-config --kcflags Hänel-Baas, Alexander
2015-04-21 11:12 ` Jan Kiszka
2015-04-22  6:14   ` Hänel-Baas, Alexander
2015-04-22  6:29     ` Philippe Gerum
2015-04-22  6:46       ` Hänel-Baas, Alexander
2015-04-30  8:51       ` Philippe Gerum [this message]
2015-05-04  6:01         ` Hänel-Baas, Alexander

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=5541ECF8.1090706@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=alexander.haenel-baas@sieb-meyer.de \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.