All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support
@ 2017-03-31 20:26 Romain Naour
  2017-03-31 20:26 ` [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support Romain Naour
  2017-04-01 12:43 ` [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Romain Naour @ 2017-03-31 20:26 UTC (permalink / raw)
  To: buildroot

Apply a patch from Xenomai 2.6 [1].

Fixes:
http://autobuild.buildroot.net/results/762/7623410a81b1587b33b4f4b9cf1572c872b8a6e9/build-end.log

[1] https://git.xenomai.org/xenomai-2.6.git/commit/?id=ebc2779baa222db4a5936c3d3022803355585b8c

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 .../xenomai/0002-arm-enable-armv5tej-support.patch | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/xenomai/0002-arm-enable-armv5tej-support.patch

diff --git a/package/xenomai/0002-arm-enable-armv5tej-support.patch b/package/xenomai/0002-arm-enable-armv5tej-support.patch
new file mode 100644
index 0000000..5feaa59
--- /dev/null
+++ b/package/xenomai/0002-arm-enable-armv5tej-support.patch
@@ -0,0 +1,32 @@
+From fcd06f42fef4d52bb0d9772fa71015988c828b1b Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Fri, 31 Mar 2017 21:10:23 +0200
+Subject: [PATCH] arm: enable armv5tej support
+
+armv5tej are not detected in lib/cobalt/arch/arm/include/asm/xenomai/features.h
+
+Apply the same patch from xenomai-2.6:
+https://git.xenomai.org/xenomai-2.6.git/commit/?id=ebc2779baa222db4a5936c3d3022803355585b8c
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ lib/cobalt/arch/arm/include/asm/xenomai/features.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/cobalt/arch/arm/include/asm/xenomai/features.h b/lib/cobalt/arch/arm/include/asm/xenomai/features.h
+index 10bd0c7..e84b809 100644
+--- a/lib/cobalt/arch/arm/include/asm/xenomai/features.h
++++ b/lib/cobalt/arch/arm/include/asm/xenomai/features.h
+@@ -34,7 +34,8 @@
+ #endif /* armv4 */
+ 
+ #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
+-	|| defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__)
++	|| defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
++	|| defined(__ARM_ARCH_5TEJ__)
+ #define __LINUX_ARM_ARCH__ 5
+ #endif /* armv5 */
+ 
+-- 
+2.9.3
+
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support
  2017-03-31 20:26 [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support Romain Naour
@ 2017-03-31 20:26 ` Romain Naour
  2017-04-01 12:44   ` Thomas Petazzoni
  2017-04-15 10:01   ` Thomas Petazzoni
  2017-04-01 12:43 ` [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support Thomas Petazzoni
  1 sibling, 2 replies; 7+ messages in thread
From: Romain Naour @ 2017-03-31 20:26 UTC (permalink / raw)
  To: buildroot

Obstack support in Xenomai is broken when the libc doesn't support
obstack support itself. Make sure we disable obstack support for all
libc since it was removed in uClibc-ng since 1.0.21 release and it's
always disabled with Glibc.

Fixes:
http://autobuild.buildroot.net/results/555/555d9cb9cb59fad6353516bed206e1117974e8cd/build-end.log

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Pawel Sikora <sikor6@gmail.com>
---
 package/xenomai/xenomai.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
index fc240f9..77889f0 100644
--- a/package/xenomai/xenomai.mk
+++ b/package/xenomai/xenomai.mk
@@ -23,6 +23,12 @@ XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
 
 XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ --disable-doc-install
 
+# Obstack support in Xenomai is broken when the libc doesn't support
+# obstack support itself. Make sure we disable obstack support for all
+# libc since it was removed in uClibc-ng since 1.0.21 release and it's
+# always disabled with Glibc.
+XENOMAI_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -DELIDE_CODE"
+
 define XENOMAI_REMOVE_DEVFILES
 	for i in xeno-config xeno-info wrap-link.sh ; do \
 		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support
  2017-03-31 20:26 [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support Romain Naour
  2017-03-31 20:26 ` [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support Romain Naour
@ 2017-04-01 12:43 ` Thomas Petazzoni
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-04-01 12:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 31 Mar 2017 22:26:03 +0200, Romain Naour wrote:
> Apply a patch from Xenomai 2.6 [1].
> 
> Fixes:
> http://autobuild.buildroot.net/results/762/7623410a81b1587b33b4f4b9cf1572c872b8a6e9/build-end.log
> 
> [1] https://git.xenomai.org/xenomai-2.6.git/commit/?id=ebc2779baa222db4a5936c3d3022803355585b8c
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  .../xenomai/0002-arm-enable-armv5tej-support.patch | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 package/xenomai/0002-arm-enable-armv5tej-support.patch

Applied to master, thanks. Please submit the patch upstream, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support
  2017-03-31 20:26 ` [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support Romain Naour
@ 2017-04-01 12:44   ` Thomas Petazzoni
  2017-04-01 21:44     ` Romain Naour
  2017-04-15 10:01   ` Thomas Petazzoni
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-04-01 12:44 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 31 Mar 2017 22:26:04 +0200, Romain Naour wrote:
> Obstack support in Xenomai is broken when the libc doesn't support
> obstack support itself. Make sure we disable obstack support for all
> libc since it was removed in uClibc-ng since 1.0.21 release and it's
> always disabled with Glibc.

What makes you say it's always disabled in glibc?

What's the status with musl?

Also, Xenomai seems to have some replacement code when obstack support
is not available from the C library. How does that interfact with
ELIDE_CODE ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support
  2017-04-01 12:44   ` Thomas Petazzoni
@ 2017-04-01 21:44     ` Romain Naour
  2017-04-11  9:42       ` Pawel Sikora
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2017-04-01 21:44 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

Le 01/04/2017 ? 14:44, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Fri, 31 Mar 2017 22:26:04 +0200, Romain Naour wrote:
>> Obstack support in Xenomai is broken when the libc doesn't support
>> obstack support itself. Make sure we disable obstack support for all
>> libc since it was removed in uClibc-ng since 1.0.21 release and it's
>> always disabled with Glibc.
> 
> What makes you say it's always disabled in glibc?

From lib/boilerplate/obstack.c in Xenomai code:

#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
# include <gnu-versions.h>
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
#  define ELIDE_CODE
# endif
#endif

While glibc is used, _GNU_OBSTACK_INTERFACE_VERSION is equal to
OBSTACK_INTERFACE_VERSION so ELIDE_CODE is defined and the Xenomai Obstack
support (the replacement code) is disabled.

While uClibc-ng >= 1.0.21 is used, _GNU_OBSTACK_INTERFACE_VERSION is not defined
so the Xenomai Obstack support is used but break the build.

> 
> What's the status with musl?

Xenomai is disabled with musl toolchains

> 
> Also, Xenomai seems to have some replacement code when obstack support
> is not available from the C library. How does that interfact with
> ELIDE_CODE ?

This is precisely the replacement code that is broken...
It try to use "exitfail.h" and define obstack_exit_failure with exit_failure
which is not defined.

The proposed fix define ELIDE_CODE to disable the Xenomai Obstack support
completely.

Otherwise, we have to add a dependency on glibc toolchain only since Obstack
support is missing in uClibc-ng... (maybe it's safer to do that?).

Best regards,
Romain

> 
> Thanks,
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support
  2017-04-01 21:44     ` Romain Naour
@ 2017-04-11  9:42       ` Pawel Sikora
  0 siblings, 0 replies; 7+ messages in thread
From: Pawel Sikora @ 2017-04-11  9:42 UTC (permalink / raw)
  To: buildroot

Hi,


2017-04-01 23:44 GMT+02:00 Romain Naour <romain.naour@gmail.com>:

> Hi Thomas, All,
>
> Le 01/04/2017 ? 14:44, Thomas Petazzoni a ?crit :
> > Hello,
> >
> > On Fri, 31 Mar 2017 22:26:04 +0200, Romain Naour wrote:
> >> Obstack support in Xenomai is broken when the libc doesn't support
> >> obstack support itself. Make sure we disable obstack support for all
> >> libc since it was removed in uClibc-ng since 1.0.21 release and it's
> >> always disabled with Glibc.
> >
> > What makes you say it's always disabled in glibc?
>
> From lib/boilerplate/obstack.c in Xenomai code:
>
> #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
> # include <gnu-versions.h>
> # if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
> #  define ELIDE_CODE
> # endif
> #endif
>
> While glibc is used, _GNU_OBSTACK_INTERFACE_VERSION is equal to
> OBSTACK_INTERFACE_VERSION so ELIDE_CODE is defined and the Xenomai Obstack
> support (the replacement code) is disabled.
>
> While uClibc-ng >= 1.0.21 is used, _GNU_OBSTACK_INTERFACE_VERSION is not
> defined
> so the Xenomai Obstack support is used but break the build.
>
> >
> > What's the status with musl?
>
> Xenomai is disabled with musl toolchains
>
> >
> > Also, Xenomai seems to have some replacement code when obstack support
> > is not available from the C library. How does that interfact with
> > ELIDE_CODE ?
>
> This is precisely the replacement code that is broken...
> It try to use "exitfail.h" and define obstack_exit_failure with
> exit_failure
> which is not defined.
>
> The proposed fix define ELIDE_CODE to disable the Xenomai Obstack support
> completely.
>
> Otherwise, we have to add a dependency on glibc toolchain only since
> Obstack
> support is missing in uClibc-ng... (maybe it's safer to do that?).
>

That's a good question, but I also think that we should add dependency from
glibc,
at least until someone could say (Romain?) what would be the impact on
uClibc-ng without
obstack support... and will test it, right?

..but until then, Thomas/All, what do you think?

Regards,
Pawel


>
> Best regards,
> Romain
>
> >
> > Thanks,
> >
> > Thomas
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170411/0ead8b36/attachment.html>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support
  2017-03-31 20:26 ` [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support Romain Naour
  2017-04-01 12:44   ` Thomas Petazzoni
@ 2017-04-15 10:01   ` Thomas Petazzoni
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-04-15 10:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 31 Mar 2017 22:26:04 +0200, Romain Naour wrote:
> Obstack support in Xenomai is broken when the libc doesn't support
> obstack support itself. Make sure we disable obstack support for all
> libc since it was removed in uClibc-ng since 1.0.21 release and it's
> always disabled with Glibc.
> 
> Fixes:
> http://autobuild.buildroot.net/results/555/555d9cb9cb59fad6353516bed206e1117974e8cd/build-end.log
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Pawel Sikora <sikor6@gmail.com>
> ---
>  package/xenomai/xenomai.mk | 6 ++++++
>  1 file changed, 6 insertions(+)

Since nobody proposed a better solution, I applied your patch. However,
could you report the issue upstream? Hopefully they will have a look
and propose a better solution.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-15 10:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 20:26 [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support Romain Naour
2017-03-31 20:26 ` [Buildroot] [PATCH 2/2] package/xenomai: disable obstack support Romain Naour
2017-04-01 12:44   ` Thomas Petazzoni
2017-04-01 21:44     ` Romain Naour
2017-04-11  9:42       ` Pawel Sikora
2017-04-15 10:01   ` Thomas Petazzoni
2017-04-01 12:43 ` [Buildroot] [PATCH 1/2] package/xenomai: enable armv5tej support Thomas Petazzoni

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.