Skip to contentSkip to conversation

build: rm libhw

PATCH In review Anthony Liguori 3 participants 4 messages Oct 5, 2012 – Oct 7, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: rm libhw

---
 Makefile        |    2 +-
 Makefile.hw     |   22 ----------------------
 Makefile.objs   |    2 ++
 Makefile.target |    1 -
 configure       |    5 -----
 5 files changed, 3 insertions(+), 29 deletions(-)
 delete mode 100644 Makefile.hw
Makefile +1 -1
index 1cebe3a..a9c22bf 100644
@@ -214,7 +214,7 @@ $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
 qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
 
-QEMULIBS=libhw libuser libdis libdis-user
+QEMULIBS=libuser libdis libdis-user
 
 clean:
 # avoid old build problems by removing potentially incorrect old files
Makefile.hw deleted +0 -22
deleted file mode 100644
index 86f0bf4..0000000
@@ -1,22 +0,0 @@
-# Makefile for qemu target independent devices.
-
-include ../config-host.mak
-include ../config-all-devices.mak
-include $(SRC_PATH)/rules.mak
-
-.PHONY: all
-
-$(call set-vpath, $(SRC_PATH))
-
-QEMU_CFLAGS+=-I..
-QEMU_CFLAGS += -I$(SRC_PATH)/include
-
-include $(SRC_PATH)/Makefile.objs
-
-all: $(hw-obj-y)
-# Dummy command so that make thinks it has done something
-	@true
-
-clean:
-	rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
-	rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
Makefile.objs +2 -0
index b1f3e22..8c2d474 100644
@@ -226,6 +226,8 @@ common-obj-y += qmp.o hmp.o
 
 universal-obj-y += $(qapi-obj-y)
 
+common-obj-y += $(hw-obj-y)
+
 ######################################################################
 # guest agent
 
Makefile.target +0 -1
index 4449444..3822bc5 100644
@@ -154,7 +154,6 @@ all-obj-y += $(addprefix ../, $(universal-obj-y))
 ifdef CONFIG_SOFTMMU
 all-obj-y += $(addprefix ../, $(common-obj-y))
 all-obj-y += $(addprefix ../libdis/, $(libdis-y))
-all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
 all-obj-y += $(addprefix ../, $(trace-obj-y))
 else
 all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
configure +0 -5
index e58846d..73a5f3d 100755
@@ -3914,8 +3914,6 @@ fi
 if test "$target_softmmu" = "yes" ; then
   echo "CONFIG_SOFTMMU=y" >> $config_target_mak
   echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak
-  echo "HWDIR=../libhw" >> $config_target_mak
-  echo "subdir-$target: subdir-libhw" >> $config_host_mak
   if test "$smartcard_nss" = "yes" ; then
     echo "subdir-$target: subdir-libcacard" >> $config_host_mak
   fi
@@ -4157,9 +4155,6 @@ for rom in seabios vgabios ; do
     echo "LD=$ld" >> $config_mak
 done
 
-d=libhw
-symlink "$source_path/Makefile.hw" "$d/Makefile"
-
 d=libuser
 symlink "$source_path/Makefile.user" "$d/Makefile"
 
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 15 lines · Anthony Liguori
---
 Makefile        |    2 +-
 Makefile.hw     |   22 ----------------------
 Makefile.objs   |    2 ++
 Makefile.target |    1 -
 configure       |    5 -----
 5 files changed, 3 insertions(+), 29 deletions(-)
 delete mode 100644 Makefile.hw
Makefile +0 -0
index 1cebe3a..a9c22bf 100644

Makefile $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) · line 217

Quoted 5 lines
Makefile +1 -1
@@ -214,7 +214,7 @@ $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
 qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
 
-QEMULIBS=libhw libuser libdis libdis-user
+QEMULIBS=libuser libdis libdis-user

Not related to this patch, but do we need libdis-user anymore since user and system objects can be mixed?

Quoted 83 lines
Makefile +0 -0
 clean:
 # avoid old build problems by removing potentially incorrect old files
Makefile.hw deleted +0 -22
deleted file mode 100644
index 86f0bf4..0000000
@@ -1,22 +0,0 @@
-# Makefile for qemu target independent devices.
-
-include ../config-host.mak
-include ../config-all-devices.mak
-include $(SRC_PATH)/rules.mak
-
-.PHONY: all
-
-$(call set-vpath, $(SRC_PATH))
-
-QEMU_CFLAGS+=-I..
-QEMU_CFLAGS += -I$(SRC_PATH)/include
-
-include $(SRC_PATH)/Makefile.objs
-
-all: $(hw-obj-y)
-# Dummy command so that make thinks it has done something
-       @true
-
-clean:
-       rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
-       rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
Makefile.objs +2 -0
index b1f3e22..8c2d474 100644
@@ -226,6 +226,8 @@ common-obj-y += qmp.o hmp.o
 
 universal-obj-y += $(qapi-obj-y)
 
+common-obj-y += $(hw-obj-y)
+
 ######################################################################
 # guest agent
 
Makefile.target +0 -1
index 4449444..3822bc5 100644
@@ -154,7 +154,6 @@ all-obj-y += $(addprefix ../, $(universal-obj-y))
 ifdef CONFIG_SOFTMMU
 all-obj-y += $(addprefix ../, $(common-obj-y))
 all-obj-y += $(addprefix ../libdis/, $(libdis-y))
-all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
 all-obj-y += $(addprefix ../, $(trace-obj-y))
 else
 all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
configure +0 -6
index e58846d..73a5f3d 100755
@@ -3914,8 +3914,6 @@ fi
 if test "$target_softmmu" = "yes" ; then
   echo "CONFIG_SOFTMMU=y" >> $config_target_mak
   echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak
-  echo "HWDIR=../libhw" >> $config_target_mak
-  echo "subdir-$target: subdir-libhw" >> $config_host_mak
   if test "$smartcard_nss" = "yes" ; then
     echo "subdir-$target: subdir-libcacard" >> $config_host_mak
   fi
@@ -4157,9 +4155,6 @@ for rom in seabios vgabios ; do
     echo "LD=$ld" >> $config_mak
 done
 
-d=libhw
-symlink "$source_path/Makefile.hw" "$d/Makefile"
-
 d=libuser
 symlink "$source_path/Makefile.user" "$d/Makefile"
 
--

1.7.5.4

#2 lore raw
Quoted 17 lines · Blue Swirl
Quoted 16 lines · Anthony Liguori
---
 Makefile        |    2 +-
 Makefile.hw     |   22 ----------------------
 Makefile.objs   |    2 ++
 Makefile.target |    1 -
 configure       |    5 -----
 5 files changed, 3 insertions(+), 29 deletions(-)
 delete mode 100644 Makefile.hw
Makefile +0 -0
index 1cebe3a..a9c22bf 100644
@@ -214,7 +214,7 @@ $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
Quoted 7 lines

Makefile $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) · line 217

Quoted 4 lines
Makefile +1 -1
 qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
 
-QEMULIBS=libhw libuser libdis libdis-user
+QEMULIBS=libuser libdis libdis-user

Not related to this patch, but do we need libdis-user anymore since user and system objects can be mixed?

I don't know, but the closer we can get to only building objects once the better.

BTW, we could eliminate the majority of target specific objects by adding target_getpagesize() and related macros.

The remaining objects that actually touch CPUState can get moved to the corresponding target-* directories.

Regards,

Anthony Liguori

Quoted 84 lines
Quoted 84 lines
Makefile +0 -0
 clean:
 # avoid old build problems by removing potentially incorrect old files
Makefile.hw deleted +0 -22
deleted file mode 100644
index 86f0bf4..0000000
@@ -1,22 +0,0 @@
-# Makefile for qemu target independent devices.
-
-include ../config-host.mak
-include ../config-all-devices.mak
-include $(SRC_PATH)/rules.mak
-
-.PHONY: all
-
-$(call set-vpath, $(SRC_PATH))
-
-QEMU_CFLAGS+=-I..
-QEMU_CFLAGS += -I$(SRC_PATH)/include
-
-include $(SRC_PATH)/Makefile.objs
-
-all: $(hw-obj-y)
-# Dummy command so that make thinks it has done something
-       @true
-
-clean:
-       rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
-       rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
Makefile.objs +2 -0
index b1f3e22..8c2d474 100644
@@ -226,6 +226,8 @@ common-obj-y += qmp.o hmp.o
 
 universal-obj-y += $(qapi-obj-y)
 
+common-obj-y += $(hw-obj-y)
+
 ######################################################################
 # guest agent
 
Makefile.target +0 -1
index 4449444..3822bc5 100644
@@ -154,7 +154,6 @@ all-obj-y += $(addprefix ../, $(universal-obj-y))
 ifdef CONFIG_SOFTMMU
 all-obj-y += $(addprefix ../, $(common-obj-y))
 all-obj-y += $(addprefix ../libdis/, $(libdis-y))
-all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
 all-obj-y += $(addprefix ../, $(trace-obj-y))
 else
 all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
configure +0 -6
index e58846d..73a5f3d 100755
@@ -3914,8 +3914,6 @@ fi
 if test "$target_softmmu" = "yes" ; then
   echo "CONFIG_SOFTMMU=y" >> $config_target_mak
   echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak
-  echo "HWDIR=../libhw" >> $config_target_mak
-  echo "subdir-$target: subdir-libhw" >> $config_host_mak
   if test "$smartcard_nss" = "yes" ; then
     echo "subdir-$target: subdir-libcacard" >> $config_host_mak
   fi
@@ -4157,9 +4155,6 @@ for rom in seabios vgabios ; do
     echo "LD=$ld" >> $config_mak
 done
 
-d=libhw
-symlink "$source_path/Makefile.hw" "$d/Makefile"
-
 d=libuser
 symlink "$source_path/Makefile.user" "$d/Makefile"
 
--

1.7.5.4

#3 lore raw
In reply to Anthony Liguori

Makefile $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) · line 217

Quoted 5 lines · Anthony Liguori
Makefile +1 -1
-QEMULIBS=libhw libuser libdis libdis-user
+QEMULIBS=libuser libdis libdis-user

Two other possibilities:

- make it 'libhw.a' (and introduce a way of including just relevant hardware models) - reduces binary sizes, makes security types quieter
- make it 'libhw.so' (and not introduce a way of including just relevant hardware models) - reduces overall package size

Neither is compelling.

Signature · 1 line
error compiling committee.c: too many arguments to function