* [Qemu-devel] [PATCH] work around make bug for *-user builds
@ 2010-04-27 15:07 Nathan Froyd
2010-04-27 16:10 ` [Qemu-devel] " Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Froyd @ 2010-04-27 15:07 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini
When I try to build a linux-user target, I get:
Makefile:84: *** missing `endif'. Stop.
As best as I can figure out, what happens is that when we call eval from
set-vpath, make is checking that there are no dangling conditionals at
the end of the input. But in this case make is doing the wrong thing:
the input is just what gets fed to eval, not the wider Makefile from
which eval was called.
To restore buildability of the *-user configs, move calls to set-vpath
out from under ifdefs, and conditionally provide a path for set-vpath.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
---
Makefile.target | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 65beed5..e1c0f4a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -79,9 +79,11 @@ signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
#########################################################
# Linux user emulator target
-ifdef CONFIG_LINUX_USER
+# This call (sans `if') ought to be under the ifdef below, but that
+# triggers bugs in make.
+$(call set-vpath,$(if $CONFIG_LINUX_USER,$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)))
-$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
+ifdef CONFIG_LINUX_USER
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
@@ -111,9 +113,9 @@ endif #CONFIG_LINUX_USER
#########################################################
# Darwin user emulator target
-ifdef CONFIG_DARWIN_USER
+$(call set-vpath,$(if $CONFIG_DARWIN_USER,$(SRC_PATH)/darwin-user))
-$(call set-vpath, $(SRC_PATH)/darwin-user)
+ifdef CONFIG_DARWIN_USER
QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
@@ -138,9 +140,9 @@ endif #CONFIG_DARWIN_USER
#########################################################
# BSD user emulator target
-ifdef CONFIG_BSD_USER
+$(call set-vpath,$(if $CONFIG_BSD_USER,$(SRC_PATH)/bsd-user))
-$(call set-vpath, $(SRC_PATH)/bsd-user)
+ifdef CONFIG_BSD_USER
QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
--
1.6.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] Re: [PATCH] work around make bug for *-user builds
2010-04-27 15:07 [Qemu-devel] [PATCH] work around make bug for *-user builds Nathan Froyd
@ 2010-04-27 16:10 ` Paolo Bonzini
2010-04-27 16:21 ` Nathan Froyd
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2010-04-27 16:10 UTC (permalink / raw)
To: Nathan Froyd; +Cc: qemu-devel
On 04/27/2010 05:07 PM, Nathan Froyd wrote:
> To restore buildability of the *-user configs, move calls to set-vpath
> out from under ifdefs, and conditionally provide a path for set-vpath.
Uhm, out of curiosity what make is this? Lots of patches have been
committed to *-user in the meanwhile, so it looks like a problem in your
make.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] Re: [PATCH] work around make bug for *-user builds
2010-04-27 16:10 ` [Qemu-devel] " Paolo Bonzini
@ 2010-04-27 16:21 ` Nathan Froyd
2010-04-27 16:22 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Froyd @ 2010-04-27 16:21 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Tue, Apr 27, 2010 at 06:10:50PM +0200, Paolo Bonzini wrote:
> On 04/27/2010 05:07 PM, Nathan Froyd wrote:
>> To restore buildability of the *-user configs, move calls to set-vpath
>> out from under ifdefs, and conditionally provide a path for set-vpath.
>
> Uhm, out of curiosity what make is this? Lots of patches have been
> committed to *-user in the meanwhile, so it looks like a problem in your
> make.
This happens to me with three different versions of make:
- 3.80, no patches applied.
- 3.81, no patches applied.
- 3.81 from Ubuntu Hardy (I haven't looked to see what patches are applied).
I realize that other people have been humming along with *-user builds,
but perhaps the distro that they use patches make appropriately?
(Certainly the set-vpath patch indicates that some distro(s), somewhere,
apply some set of patches to make...?)
-Nathan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] Re: [PATCH] work around make bug for *-user builds
2010-04-27 16:21 ` Nathan Froyd
@ 2010-04-27 16:22 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2010-04-27 16:22 UTC (permalink / raw)
To: Nathan Froyd; +Cc: qemu-devel
>>> To restore buildability of the *-user configs, move calls to set-vpath
>>> out from under ifdefs, and conditionally provide a path for set-vpath.
>>
>> Uhm, out of curiosity what make is this? Lots of patches have been
>> committed to *-user in the meanwhile, so it looks like a problem in your
>> make.
>
> This happens to me with three different versions of make:
>
> - 3.80, no patches applied.
> - 3.81, no patches applied.
> - 3.81 from Ubuntu Hardy (I haven't looked to see what patches are applied).
Interesting. BTW I am using Fedora. Given this,
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-27 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-27 15:07 [Qemu-devel] [PATCH] work around make bug for *-user builds Nathan Froyd
2010-04-27 16:10 ` [Qemu-devel] " Paolo Bonzini
2010-04-27 16:21 ` Nathan Froyd
2010-04-27 16:22 ` Paolo Bonzini
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.