Skip to content

Commit c4ddab7

Browse files
committed
build: fix device module builds
Slightly hackish workaround, works ok as long as we don't have target-specific modules. meson will obsolete this. See comment in the patch for the --verbose description. Signed-off-by: Gerd Hoffmann <[email protected]> Message-id: [email protected] [ kraxel: updated comment from discussions ] Signed-off-by: Gerd Hoffmann <[email protected]>
1 parent 7ab6e7f commit c4ddab7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Makefile.target

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,20 @@ endif # CONFIG_SOFTMMU
179179
dummy := $(call unnest-vars,,obj-y)
180180
all-obj-y := $(obj-y)
181181

182+
#
183+
# common-obj-m has some crap here, probably as side effect from
184+
# unnest-vars recursing into target directories to fill obj-y and not
185+
# properly handling the -m case.
186+
#
187+
# Clear common-obj-m as workaround. Fixes suspious dependency errors
188+
# when building devices as modules. A bit hackish, but should be ok
189+
# as long as we do not have any target-specific modules.
190+
#
191+
# The meson-based build system currently in development doesn't need
192+
# unnest-vars and will obsolete this workaround.
193+
#
194+
common-obj-m :=
195+
182196
include $(SRC_PATH)/Makefile.objs
183197
dummy := $(call unnest-vars,.., \
184198
authz-obj-y \

0 commit comments

Comments
 (0)