All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add --disable-{demo,testsuite} options
@ 2021-08-13  8:12 Fabrice Fontaine
  2021-08-13  8:54 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-13  8:12 UTC (permalink / raw)
  To: xenomai; +Cc: Fabrice Fontaine

Allow the user to disable demo and testsuite to avoid the following
build failures on arc and riscv32:

latency.c: In function 'display':
latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
  326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
      |                 ~~~~^
      |                     |
      |                     long int
      |                 %.2lld
  327 |          "priority %d)\n", dt / 3600,
      |                            ~~~~~~~~~
      |                               |
      |                               time_t {aka long long int}

altency.c: In function ‘display’:
altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
  262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
      |                 ~~~~^
      |                     |
      |                     long int
      |                 %.2lld
  263 |          "priority %d)\n", dt / 3600,
      |                            ~~~~~~~~~
      |                               |
      |                               time_t {aka long long int}

Fixes:
 - http://autobuild.buildroot.org/results/448efe22e8fe058a1b354a3c124874e30b9ce138

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 Makefile.am  | 12 ++++++++++--
 configure.ac | 12 ++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 891e53f66..604644277 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,9 +6,17 @@ SUBDIRS = 		\
 	config		\
 	include		\
 	scripts		\
-	testsuite	\
-	utils		\
+	utils
+
+if XENO_ENABLE_DEMO
+SUBDIRS += 		\
 	demo
+endif
+
+if XENO_ENABLE_TESTSUITE
+SUBDIRS += 		\
+	testsuite
+endif
 
 EXTRA_DIST = kernel debian
 
diff --git a/configure.ac b/configure.ac
index bd5fd5ba9..29dfd16e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,6 +200,18 @@ test \! x$debug_mode = x && AC_DEFINE(CONFIG_XENO_DEBUG,1,[config])
 AM_CONDITIONAL(XENO_DEBUG_FULL,[test x$debug_mode = xfull])
 test x$debug_mode = xfull && AC_DEFINE(CONFIG_XENO_DEBUG_FULL,1,[config])
 
+dnl Demo (default: on)
+
+AC_ARG_ENABLE(demo,
+	AS_HELP_STRING([--disable-demo], [Disable demo]))
+AM_CONDITIONAL(XENO_ENABLE_DEMO,[test x$enable_demo != xno])
+
+dnl Testsuite (default: on)
+
+AC_ARG_ENABLE(testsuite,
+	AS_HELP_STRING([--disable-testsuite], [Disable testsuite]))
+AM_CONDITIONAL(XENO_ENABLE_TESTSUITE,[test x$enable_testsuite != xno])
+
 dnl Low resolution clock (default: off)
 
 unset lores_clock
-- 
2.30.2



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

* Re: [PATCH] Add --disable-{demo,testsuite} options
  2021-08-13  8:12 [PATCH] Add --disable-{demo,testsuite} options Fabrice Fontaine
@ 2021-08-13  8:54 ` Jan Kiszka
  2021-08-13 13:17   ` Fabrice Fontaine
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-08-13  8:54 UTC (permalink / raw)
  To: Fabrice Fontaine, xenomai

On 13.08.21 10:12, Fabrice Fontaine via Xenomai wrote:
> Allow the user to disable demo and testsuite to avoid the following
> build failures on arc and riscv32:

Are you working on ports to those archs? Or is xenomai userland just
prematurely built for those in buildroot?

> 
> latency.c: In function 'display':
> latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
>   326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>       |                 ~~~~^
>       |                     |
>       |                     long int
>       |                 %.2lld
>   327 |          "priority %d)\n", dt / 3600,
>       |                            ~~~~~~~~~
>       |                               |
>       |                               time_t {aka long long int}
> 
> altency.c: In function ‘display’:
> altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
>   262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>       |                 ~~~~^
>       |                     |
>       |                     long int
>       |                 %.2lld
>   263 |          "priority %d)\n", dt / 3600,
>       |                            ~~~~~~~~~
>       |                               |
>       |                               time_t {aka long long int}
> 

How about fixing those issues instead?

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

* Re: [PATCH] Add --disable-{demo,testsuite} options
  2021-08-13  8:54 ` Jan Kiszka
@ 2021-08-13 13:17   ` Fabrice Fontaine
  2021-08-13 14:29     ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-13 13:17 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

Le ven. 13 août 2021 à 10:54, Jan Kiszka <jan.kiszka@siemens.com> a écrit :
>
> On 13.08.21 10:12, Fabrice Fontaine via Xenomai wrote:
> > Allow the user to disable demo and testsuite to avoid the following
> > build failures on arc and riscv32:
>
> Are you working on ports to those archs? Or is xenomai userland just
> prematurely built for those in buildroot?
No, I'm not working on ports to those archs. I just sent this patch to
fix buidlroot autobuilder failures. I'm not even an expert in xenomai.
In buildroot, we allow to build xenomai userland on all architectures.
The only requirement on the toolchain is that it must have threads,
sync and must be uclibc or glibc:
https://git.buildroot.net/buildroot/commit/package/xenomai/Config.in?id=c35f157486431eafdb8d3583fc52d8ce4c784cf3.
In cobalt core, we're restricting the architectures to x86, powerpc and ARM.
>
> >
> > latency.c: In function 'display':
> > latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
> >   326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
> >       |                 ~~~~^
> >       |                     |
> >       |                     long int
> >       |                 %.2lld
> >   327 |          "priority %d)\n", dt / 3600,
> >       |                            ~~~~~~~~~
> >       |                               |
> >       |                               time_t {aka long long int}
> >
> > altency.c: In function ‘display’:
> > altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
> >   262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
> >       |                 ~~~~^
> >       |                     |
> >       |                     long int
> >       |                 %.2lld
> >   263 |          "priority %d)\n", dt / 3600,
> >       |                            ~~~~~~~~~
> >       |                               |
> >       |                               time_t {aka long long int}
> >
>
> How about fixing those issues instead?
Indeed, fixing those issues would be great. I'll let you handle that.
However, I also think that disabling demo and testsuite is a nice
addition as it will decrease compile time and save disk space.
>
> Jan
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux
Best Regards,

Fabrice


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

* Re: [PATCH] Add --disable-{demo,testsuite} options
  2021-08-13 13:17   ` Fabrice Fontaine
@ 2021-08-13 14:29     ` Jan Kiszka
  2021-08-13 15:05       ` Fabrice Fontaine
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-08-13 14:29 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: xenomai

On 13.08.21 15:17, Fabrice Fontaine wrote:
> Le ven. 13 août 2021 à 10:54, Jan Kiszka <jan.kiszka@siemens.com> a écrit :
>>
>> On 13.08.21 10:12, Fabrice Fontaine via Xenomai wrote:
>>> Allow the user to disable demo and testsuite to avoid the following
>>> build failures on arc and riscv32:
>>
>> Are you working on ports to those archs? Or is xenomai userland just
>> prematurely built for those in buildroot?
> No, I'm not working on ports to those archs. I just sent this patch to
> fix buidlroot autobuilder failures. I'm not even an expert in xenomai.
> In buildroot, we allow to build xenomai userland on all architectures.
> The only requirement on the toolchain is that it must have threads,
> sync and must be uclibc or glibc:
> https://git.buildroot.net/buildroot/commit/package/xenomai/Config.in?id=c35f157486431eafdb8d3583fc52d8ce4c784cf3.
> In cobalt core, we're restricting the architectures to x86, powerpc and ARM.

Ah, ok, these are mercury userland builds. Makes more sense now.

>>
>>>
>>> latency.c: In function 'display':
>>> latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
>>>   326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>>>       |                 ~~~~^
>>>       |                     |
>>>       |                     long int
>>>       |                 %.2lld
>>>   327 |          "priority %d)\n", dt / 3600,
>>>       |                            ~~~~~~~~~
>>>       |                               |
>>>       |                               time_t {aka long long int}
>>>
>>> altency.c: In function ‘display’:
>>> altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
>>>   262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>>>       |                 ~~~~^
>>>       |                     |
>>>       |                     long int
>>>       |                 %.2lld
>>>   263 |          "priority %d)\n", dt / 3600,
>>>       |                            ~~~~~~~~~
>>>       |                               |
>>>       |                               time_t {aka long long int}
>>>
>>
>> How about fixing those issues instead?
> Indeed, fixing those issues would be great. I'll let you handle that.

I wouldn't mind getting patches as well. ;)

> However, I also think that disabling demo and testsuite is a nice
> addition as it will decrease compile time and save disk space.

I don't disagree. I just don't like merging a feature with the argument
"this works around a bug". If you resend with adjusted reasoning, I'm
fine with merging the functional changes.

But then I would still not use that to address the above errors...

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

* Re: [PATCH] Add --disable-{demo,testsuite} options
  2021-08-13 14:29     ` Jan Kiszka
@ 2021-08-13 15:05       ` Fabrice Fontaine
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-13 15:05 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

Le ven. 13 août 2021 à 16:29, Jan Kiszka <jan.kiszka@siemens.com> a écrit :
>
> On 13.08.21 15:17, Fabrice Fontaine wrote:
> > Le ven. 13 août 2021 à 10:54, Jan Kiszka <jan.kiszka@siemens.com> a écrit :
> >>
> >> On 13.08.21 10:12, Fabrice Fontaine via Xenomai wrote:
> >>> Allow the user to disable demo and testsuite to avoid the following
> >>> build failures on arc and riscv32:
> >>
> >> Are you working on ports to those archs? Or is xenomai userland just
> >> prematurely built for those in buildroot?
> > No, I'm not working on ports to those archs. I just sent this patch to
> > fix buidlroot autobuilder failures. I'm not even an expert in xenomai.
> > In buildroot, we allow to build xenomai userland on all architectures.
> > The only requirement on the toolchain is that it must have threads,
> > sync and must be uclibc or glibc:
> > https://git.buildroot.net/buildroot/commit/package/xenomai/Config.in?id=c35f157486431eafdb8d3583fc52d8ce4c784cf3.
> > In cobalt core, we're restricting the architectures to x86, powerpc and ARM.
>
> Ah, ok, these are mercury userland builds. Makes more sense now.
>
> >>
> >>>
> >>> latency.c: In function 'display':
> >>> latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
> >>>   326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
> >>>       |                 ~~~~^
> >>>       |                     |
> >>>       |                     long int
> >>>       |                 %.2lld
> >>>   327 |          "priority %d)\n", dt / 3600,
> >>>       |                            ~~~~~~~~~
> >>>       |                               |
> >>>       |                               time_t {aka long long int}
> >>>
> >>> altency.c: In function ‘display’:
> >>> altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
> >>>   262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
> >>>       |                 ~~~~^
> >>>       |                     |
> >>>       |                     long int
> >>>       |                 %.2lld
> >>>   263 |          "priority %d)\n", dt / 3600,
> >>>       |                            ~~~~~~~~~
> >>>       |                               |
> >>>       |                               time_t {aka long long int}
> >>>
> >>
> >> How about fixing those issues instead?
> > Indeed, fixing those issues would be great. I'll let you handle that.
>
> I wouldn't mind getting patches as well. ;)
>
> > However, I also think that disabling demo and testsuite is a nice
> > addition as it will decrease compile time and save disk space.
>
> I don't disagree. I just don't like merging a feature with the argument
> "this works around a bug". If you resend with adjusted reasoning, I'm
> fine with merging the functional changes.
OK, I sent a new patch set.
>
> But then I would still not use that to address the above errors...
>
> Jan
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux
Best Regards,

Fabrice


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

end of thread, other threads:[~2021-08-13 15:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13  8:12 [PATCH] Add --disable-{demo,testsuite} options Fabrice Fontaine
2021-08-13  8:54 ` Jan Kiszka
2021-08-13 13:17   ` Fabrice Fontaine
2021-08-13 14:29     ` Jan Kiszka
2021-08-13 15:05       ` Fabrice Fontaine

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.