* Re: [menuconfig] build failure.
[not found] <201210162049.HIC43747.OOtOJHFFFQMVSL@I-love.SAKURA.ne.jp>
@ 2012-10-16 12:58 ` Benjamin Poirier
2012-10-17 22:47 ` Yann E. MORIN
` (2 more replies)
2012-10-16 13:46 ` [PATCH 3.7-rc1] Fix kconfig failure on old environments Tetsuo Handa
1 sibling, 3 replies; 5+ messages in thread
From: Benjamin Poirier @ 2012-10-16 12:58 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: mmarek, linux-kbuild
Michal, do you think we're better off:
* copying the CIRCLEQ macros from sys/queue.h (about 30 lines needed,
bsd licenced)
* switching over to kernel-style linked lists using:
* a copy of tools/firewire/list.h
* #include "../../../include/linux/list.h" like perf does in
tools/perf/util/include/linux/list.h
-Benjamin
On 2012/10/16 20:49, Tetsuo Handa wrote:
> Hello.
>
> Commit 95ac9b3b "menuconfig: Assign jump keys per-page instead of globally"
> broke menuconfig on legacy environment (Debian Sarge). oops...
>
> # make menuconfig
> HOSTCC scripts/kconfig/mconf.o
> scripts/kconfig/mconf.c: In function `update_text':
> scripts/kconfig/mconf.c:326: warning: implicit declaration of function `CIRCLEQ_FOREACH'
> scripts/kconfig/mconf.c:326: error: `entries' undeclared (first use in this function)
> scripts/kconfig/mconf.c:326: error: (Each undeclared identifier is reported only once
> scripts/kconfig/mconf.c:326: error: for each function it appears in.)
> scripts/kconfig/mconf.c:326: error: syntax error before '{' token
> scripts/kconfig/mconf.c:333: error: `header' undeclared (first use in this function)
> scripts/kconfig/mconf.c: At top level:
> scripts/kconfig/mconf.c:343: error: syntax error before '}' token
> scripts/kconfig/mconf.c: In function `search_conf':
> scripts/kconfig/mconf.c:378: warning: implicit declaration of function `CIRCLEQ_HEAD_INITIALIZER'
> scripts/kconfig/mconf.c:378: error: invalid initializer
> make[1]: *** [scripts/kconfig/mconf.o] Error 1
> make: *** [menuconfig] Error 2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3.7-rc1] Fix kconfig failure on old environments.
[not found] <201210162049.HIC43747.OOtOJHFFFQMVSL@I-love.SAKURA.ne.jp>
2012-10-16 12:58 ` [menuconfig] build failure Benjamin Poirier
@ 2012-10-16 13:46 ` Tetsuo Handa
1 sibling, 0 replies; 5+ messages in thread
From: Tetsuo Handa @ 2012-10-16 13:46 UTC (permalink / raw)
To: bpoirier, mmarek; +Cc: linux-kernel
>From af0876644f04eca9d59c96320447abb0af526079 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Tue, 16 Oct 2012 22:30:38 +0900
Subject: [PATCH 3.7-rc1] Fix kconfig failure on old environments.
Commit 95ac9b3b "menuconfig: Assign jump keys per-page instead of globally"
used macros which are available in "@(#)queue.h 8.5 (Berkeley) 8/20/94" but are
not available in "@(#)queue.h 8.3 (Berkeley) 12/13/93", making it impossible to
run one of kconfig targets on old environments.
This patch defines missing macros as needed.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Benjamin Poirier <bpoirier@suse.de>
Cc: Michal Marek <mmarek@suse.cz>
---
scripts/kconfig/expr.h | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index bd2e098..1ec59f3 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -13,6 +13,49 @@ extern "C" {
#include <assert.h>
#include <stdio.h>
#include <sys/queue.h>
+#ifndef CIRCLEQ_HEAD_INITIALIZER
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { (void *)&head, (void *)&head }
+#endif
+#ifndef CIRCLEQ_FOREACH
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->cqh_first); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_next))
+#endif
+#ifndef CIRCLEQ_FOREACH_REVERSE
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for ((var) = ((head)->cqh_last); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_prev))
+#endif
+#ifndef CIRCLEQ_EMPTY
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
+#endif
+#ifndef CIRCLEQ_FIRST
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#endif
+#ifndef CIRCLEQ_LAST
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#endif
+#ifndef CIRCLEQ_NEXT
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#endif
+#ifndef CIRCLEQ_PREV
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+#endif
+#ifndef CIRCLEQ_LOOP_NEXT
+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
+ (((elm)->field.cqe_next == (void *)(head)) \
+ ? ((head)->cqh_first) \
+ : (elm->field.cqe_next))
+#endif
+#ifndef CIRCLEQ_LOOP_PREV
+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
+ (((elm)->field.cqe_prev == (void *)(head)) \
+ ? ((head)->cqh_last) \
+ : (elm->field.cqe_prev))
+#endif
#ifndef __cplusplus
#include <stdbool.h>
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [menuconfig] build failure.
2012-10-16 12:58 ` [menuconfig] build failure Benjamin Poirier
@ 2012-10-17 22:47 ` Yann E. MORIN
2012-10-19 14:46 ` Tetsuo Handa
2012-10-19 15:17 ` Michal Marek
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2012-10-17 22:47 UTC (permalink / raw)
To: linux-kbuild; +Cc: Benjamin Poirier, Tetsuo Handa, mmarek
Michal, Tetsuo, Benjamin, All,
On Tuesday 16 October 2012 Benjamin Poirier wrote:
> Michal, do you think we're better off:
> * copying the CIRCLEQ macros from sys/queue.h (about 30 lines needed,
> bsd licenced)
> * switching over to kernel-style linked lists using:
> * a copy of tools/firewire/list.h
> * #include "../../../include/linux/list.h" like perf does in
> tools/perf/util/include/linux/list.h
>
> -Benjamin
>
> On 2012/10/16 20:49, Tetsuo Handa wrote:
> > Hello.
> >
> > Commit 95ac9b3b "menuconfig: Assign jump keys per-page instead of globally"
> > broke menuconfig on legacy environment (Debian Sarge). oops...
It also breaks building on Cygwin, because Cygwin does not have the
CIRCLEQ macros in sys/queue.h (it does not even have it all).
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [menuconfig] build failure.
2012-10-16 12:58 ` [menuconfig] build failure Benjamin Poirier
2012-10-17 22:47 ` Yann E. MORIN
@ 2012-10-19 14:46 ` Tetsuo Handa
2012-10-19 15:17 ` Michal Marek
2 siblings, 0 replies; 5+ messages in thread
From: Tetsuo Handa @ 2012-10-19 14:46 UTC (permalink / raw)
To: bpoirier; +Cc: mmarek, linux-kbuild
Benjamin Poirier wrote:
> Michal, do you think we're better off:
> * copying the CIRCLEQ macros from sys/queue.h (about 30 lines needed,
> bsd licenced)
Oops, I didn't notice that sys/queue.h is bsd licenced.
Then, how can we use missing CIRCLEQ macros (from gpl licenced
scripts/kconfig/ files) which is not defined inside bsd licenced
old sys/queue.h but is defined inside bsd licenced new sys/queue.h ?
Is it OK to copy these missing CIRCLEQ macros from bsd licenced new
sys/queue.h to gpl licenced scripts/kconfig/expr.h ?
Or, create a separate file containing only missing CIRCLEQ macros
and #include it (provided that userland tools included in linux's
tarball accepts bsd licenced file)?
> * switching over to kernel-style linked lists using:
> * a copy of tools/firewire/list.h
> * #include "../../../include/linux/list.h" like perf does in
> tools/perf/util/include/linux/list.h
>
> -Benjamin
>
> On 2012/10/16 20:49, Tetsuo Handa wrote:
> > Hello.
> >
> > Commit 95ac9b3b "menuconfig: Assign jump keys per-page instead of globally"
> > broke menuconfig on legacy environment (Debian Sarge). oops...
> >
> > # make menuconfig
> > HOSTCC scripts/kconfig/mconf.o
> > scripts/kconfig/mconf.c: In function `update_text':
> > scripts/kconfig/mconf.c:326: warning: implicit declaration of function `CIRCLEQ_FOREACH'
> > scripts/kconfig/mconf.c:326: error: `entries' undeclared (first use in this function)
> > scripts/kconfig/mconf.c:326: error: (Each undeclared identifier is reported only once
> > scripts/kconfig/mconf.c:326: error: for each function it appears in.)
> > scripts/kconfig/mconf.c:326: error: syntax error before '{' token
> > scripts/kconfig/mconf.c:333: error: `header' undeclared (first use in this function)
> > scripts/kconfig/mconf.c: At top level:
> > scripts/kconfig/mconf.c:343: error: syntax error before '}' token
> > scripts/kconfig/mconf.c: In function `search_conf':
> > scripts/kconfig/mconf.c:378: warning: implicit declaration of function `CIRCLEQ_HEAD_INITIALIZER'
> > scripts/kconfig/mconf.c:378: error: invalid initializer
> > make[1]: *** [scripts/kconfig/mconf.o] Error 1
> > make: *** [menuconfig] Error 2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [menuconfig] build failure.
2012-10-16 12:58 ` [menuconfig] build failure Benjamin Poirier
2012-10-17 22:47 ` Yann E. MORIN
2012-10-19 14:46 ` Tetsuo Handa
@ 2012-10-19 15:17 ` Michal Marek
2 siblings, 0 replies; 5+ messages in thread
From: Michal Marek @ 2012-10-19 15:17 UTC (permalink / raw)
To: Benjamin Poirier; +Cc: Tetsuo Handa, linux-kbuild, Arnaud Lacombe
On 16.10.2012 14:58, Benjamin Poirier wrote:
> Michal, do you think we're better off:
> * copying the CIRCLEQ macros from sys/queue.h (about 30 lines needed,
> bsd licenced)
> * switching over to kernel-style linked lists using:
> * a copy of tools/firewire/list.h
> * #include "../../../include/linux/list.h" like perf does in
> tools/perf/util/include/linux/list.h
I did not know that linux/list.h can be used by userspace without
modifications. But I guess such dependency would still be inconvenient
for people who are using kconfig externally. Arnaud, what do you think?
So I think that the next-best thing is to copy tools/firewire/list.h.
That way, we avoid all the ifdefs.
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-19 15:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201210162049.HIC43747.OOtOJHFFFQMVSL@I-love.SAKURA.ne.jp>
2012-10-16 12:58 ` [menuconfig] build failure Benjamin Poirier
2012-10-17 22:47 ` Yann E. MORIN
2012-10-19 14:46 ` Tetsuo Handa
2012-10-19 15:17 ` Michal Marek
2012-10-16 13:46 ` [PATCH 3.7-rc1] Fix kconfig failure on old environments Tetsuo Handa
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.