All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 1.6] w32: Add missing version.o to all executables (fix regression)
@ 2013-08-07 21:07 Stefan Weil
  2013-08-08  7:59 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-08-07 21:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Anthony Liguori, Stefan Weil

QEMU executables for w32, w64 had included meta information built from
version.rc. These rules were changed several times some months ago.

The latest version added version.o to the tools, but not to the system
emulations.

This patch adds the meta information to all system emulations again.

It builds a version.o for each target (which allows different information
for each target in the future).

I removed the libtool part with version-lobj-y (why was it added?).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 Makefile        |    6 ++----
 Makefile.target |    6 ++++++
 rules.mak       |    5 ++---
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 29f1043..59788c4 100644
--- a/Makefile
+++ b/Makefile
@@ -167,13 +167,11 @@ recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 
 bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
 
-version.o: $(SRC_PATH)/version.rc config-host.h | version.lo
-version.lo: $(SRC_PATH)/version.rc config-host.h
+version.o: $(SRC_PATH)/version.rc config-host.h
 
 version-obj-$(CONFIG_WIN32) += version.o
-version-lobj-$(CONFIG_WIN32) += version.lo
 
-Makefile: $(version-obj-y) $(version-lobj-y)
+Makefile: $(version-obj-y)
 
 ######################################################################
 # Build libraries
diff --git a/Makefile.target b/Makefile.target
index 9a49852..01037fe 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -13,6 +13,12 @@ QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H
 
 QEMU_CFLAGS+=-I$(SRC_PATH)/include
 
+version.o: $(SRC_PATH)/version.rc ../config-host.h
+
+version-obj-$(CONFIG_WIN32) += version.o
+
+Makefile: $(version-obj-y)
+
 ifdef CONFIG_USER_ONLY
 # user emulator name
 QEMU_PROG=qemu-$(TARGET_NAME)
diff --git a/rules.mak b/rules.mak
index 4499745..0bcd876 100644
--- a/rules.mak
+++ b/rules.mak
@@ -20,7 +20,7 @@ QEMU_INCLUDES += -I$(<D) -I$(@D)
 %.o: %.c
 	$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
 %.o: %.rc
-	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
+	$(call quiet-command,$(WINDRES) -I $(BUILD_DIR) -o $@ $<,"  RC    $(TARGET_DIR)$@")
 
 ifeq ($(LIBTOOL),)
 LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
@@ -38,8 +38,7 @@ LIBTOOL += $(if $(V),,--quiet)
 LINK = $(call quiet-command,\
        $(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
        )$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
-       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
-       $(if $(filter %.lo %.la,$^),$(version-lobj-y),$(version-obj-y)) \
+       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
        $(if $(filter %.lo %.la,$^),$(LIBTOOLFLAGS)) \
        $(LIBS),$(if $(filter %.lo %.la,$^),"lt LINK ", "  LINK  ")"$(TARGET_DIR)$@")
 endif
-- 
1.7.10.4

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

* Re: [Qemu-devel] [PATCH for 1.6] w32: Add missing version.o to all executables (fix regression)
  2013-08-07 21:07 [Qemu-devel] [PATCH for 1.6] w32: Add missing version.o to all executables (fix regression) Stefan Weil
@ 2013-08-08  7:59 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2013-08-08  7:59 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Anthony Liguori, qemu-devel



----- Original Message -----
> From: "Stefan Weil" <sw@weilnetz.de>
> To: "qemu-devel" <qemu-devel@nongnu.org>
> Cc: "Anthony Liguori" <aliguori@us.ibm.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Stefan Weil" <sw@weilnetz.de>
> Sent: Wednesday, August 7, 2013 11:07:04 PM
> Subject: [PATCH for 1.6] w32: Add missing version.o to all executables (fix regression)
> 
> QEMU executables for w32, w64 had included meta information built from
> version.rc. These rules were changed several times some months ago.
> 
> The latest version added version.o to the tools, but not to the system
> emulations.
> 
> This patch adds the meta information to all system emulations again.
> 
> It builds a version.o for each target (which allows different information
> for each target in the future).
> 
> I removed the libtool part with version-lobj-y (why was it added?).

For libcacard.

I think the bug is simply that these two lines:

>  version-obj-$(CONFIG_WIN32) += version.o
> -version-lobj-$(CONFIG_WIN32) += version.lo

should be moved to Makefile.objs.

Then if you want you can have separate version.o files in 1.7.
For 1.6 that's not necessary.

Paolo

> -Makefile: $(version-obj-y) $(version-lobj-y)
> +Makefile: $(version-obj-y)
>  
>  ######################################################################
>  # Build libraries
> diff --git a/Makefile.target b/Makefile.target
> index 9a49852..01037fe 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -13,6 +13,12 @@ QEMU_CFLAGS += -I..
> -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H
>  
>  QEMU_CFLAGS+=-I$(SRC_PATH)/include
>  
> +version.o: $(SRC_PATH)/version.rc ../config-host.h
> +
> +version-obj-$(CONFIG_WIN32) += version.o
> +
> +Makefile: $(version-obj-y)
> +
>  ifdef CONFIG_USER_ONLY
>  # user emulator name
>  QEMU_PROG=qemu-$(TARGET_NAME)
> diff --git a/rules.mak b/rules.mak
> index 4499745..0bcd876 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -20,7 +20,7 @@ QEMU_INCLUDES += -I$(<D) -I$(@D)
>  %.o: %.c
>  	$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS)
>  	$(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
>  %.o: %.rc
> -	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
> +	$(call quiet-command,$(WINDRES) -I $(BUILD_DIR) -o $@ $<,"  RC
> $(TARGET_DIR)$@")
>  
>  ifeq ($(LIBTOOL),)
>  LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
>  \
> @@ -38,8 +38,7 @@ LIBTOOL += $(if $(V),,--quiet)
>  LINK = $(call quiet-command,\
>         $(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
>         )$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
> -       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
> -       $(if $(filter %.lo %.la,$^),$(version-lobj-y),$(version-obj-y)) \
> +       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
>         $(if $(filter %.lo %.la,$^),$(LIBTOOLFLAGS)) \
>         $(LIBS),$(if $(filter %.lo %.la,$^),"lt LINK ", "  LINK
>         ")"$(TARGET_DIR)$@")
>  endif
> --
> 1.7.10.4
> 
> 

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

end of thread, other threads:[~2013-08-08  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 21:07 [Qemu-devel] [PATCH for 1.6] w32: Add missing version.o to all executables (fix regression) Stefan Weil
2013-08-08  7:59 ` 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.