From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5541ECF8.1090706@xenomai.org> Date: Thu, 30 Apr 2015 10:51:04 +0200 From: Philippe Gerum MIME-Version: 1.0 References: <9BA84827B30CBE4996725F98F7DC912342963659@SMExchange01.siebmeyer.org> <55363096.8070400@siemens.com> <9BA84827B30CBE4996725F98F7DC912364F3742C@SMExchange01.siebmeyer.org> <55373FBF.2000807@xenomai.org> In-Reply-To: <55373FBF.2000807@xenomai.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Subject: Re: [Xenomai] Xeno3.x xeno-config --kcflags List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?windows-1252?Q?=22H=E4nel-Baas=2C_Alexander=22?= , Jan Kiszka Cc: "xenomai@xenomai.org" On 04/22/2015 08:29 AM, Philippe Gerum wrote: > On 04/22/2015 08:14 AM, H=E4nel-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 =3D $(shell /usr/xenomai/bin/xeno-config --rtdm --kcfl= ags) >> EXTRA_CFLAGS +=3D $(XENOMAI_K_CFLAGS) >> The result was: EXTRA_CFLAGS=3D -Iarch/$(SRCARCH)/xenomai/include. >> >> So I need a second expand step from $(SRCARCH). >> My solution is the eval function: >> $(eval EXTRA_CFLAGS +=3D $(XENOMAI_K_CFLAGS)) >> And now I get: EXTRA_CFLAGS=3D -Iarch/arm/xenomai/include=20 >> and now module builds are success full. >> >> Thank you very much for your post. >> >=20 > 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. >=20 > 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. >=20 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=3Dnext&id=3Da3a30499b7ffd9a3= 6c18d909909b4f45bf3f710a 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. --=20 Philippe.