Skip to contentSkip to conversation

build: fix Win32 clean build

PATCH Applied Paolo Bonzini 3 participants 4 messages Jan 15, 2013 – Jan 16, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: fix Win32 clean build

The version.o file did not appear explicitly as a dependency, and this caused clean builds to fail. Force its build by making the Makefile depend on version.o.

(We cannot add it to libqemuutil.a, because it doesn't export any symbol and thus would not be pulled by the linker).

Cc Blue Swirl <[email protected]>
Cc Stefan Weil <[email protected]>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 7622a4c..cfa2fa6 100644
@@ -153,6 +153,7 @@ version.o: $(SRC_PATH)/version.rc config-host.h
 	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
 
 version-obj-$(CONFIG_WIN32) += version.o
+Makefile: $(version-obj-y)
 
 ######################################################################
 # Build libraries
Signature · 1 line
1.8.1
Tested-by on v1 1/1
#1 lore raw

Am 15.01.2013 09:49, schrieb Paolo Bonzini:

Quoted 19 lines

The version.o file did not appear explicitly as a dependency, and this caused clean builds to fail. Force its build by making the Makefile depend on version.o.

(We cannot add it to libqemuutil.a, because it doesn't export any symbol and thus would not be pulled by the linker).

Cc Blue Swirl <[email protected]>
Cc Stefan Weil <[email protected]>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +0 -0
index 7622a4c..cfa2fa6 100644

Makefile version.o: $(SRC_PATH)/version.rc config-host.h · line 159

Quoted 7 lines
Makefile +1 -0
@@ -153,6 +153,7 @@ version.o: $(SRC_PATH)/version.rc config-host.h
 	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
 
 version-obj-$(CONFIG_WIN32) += version.o
+Makefile: $(version-obj-y)
 
 ######################################################################
 # Build libraries

Blue, Paolo's patch fixes a recently introduced build regression for MinGW. Please apply it to git master.

I won't send a pull request because it is a build fix.

Paolo, your latest modifications added one more regression because MinGW builds now compile files which are only needed for user mode (= never for MinGW).util/envlist.c uses strtok_r which is unavailable for MinGW, so we get a compiler warning, but no linker error because it is unused.

Regards
Stefan

#2 lore raw

Il 15/01/2013 18:34, Stefan Weil ha scritto:

Quoted 6 lines

Blue, Paolo's patch fixes a recently introduced build regression for MinGW. Please apply it to git master.

Quoted 7 lines

I won't send a pull request because it is a build fix.

Paolo, your latest modifications added one more regression because MinGW builds now compile files which are only needed for user mode (= never for MinGW).util/envlist.c uses strtok_r which is unavailable for MinGW, so we get a compiler warning, but no linker error because it is unused.

Yeah, this is a side effect of having an understandable directory layout. :) However I'd prefer if we added strtok_r to oslib-win32.c to silence the warning, even if it's dead code.

Paolo