diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-08-25 09:18:52 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-01 13:12:51 -0500 |
commit | e2a99ad3e174ab4c9d2320dcecd779230409829f (patch) | |
tree | 4f58a2193d330d159410d20d5c04587430b3accc /rules.mak | |
parent | 4d88a2ac8643265108ef1fb47ceee5d7b28e19f2 (diff) | |
download | qemu-e2a99ad3e174ab4c9d2320dcecd779230409829f.zip qemu-e2a99ad3e174ab4c9d2320dcecd779230409829f.tar.gz qemu-e2a99ad3e174ab4c9d2320dcecd779230409829f.tar.bz2 |
build: sort objects to remove duplicates for link
Avoid duplicate object files during the link. There are legitimate
cases where a link command-line would include duplicate object files
because two independent subsystems both depend on common infrastructure.
Use GNU make's $(sort) function to remove duplicate object files from
the link command-line.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'rules.mak')
-rw-r--r-- | rules.mak | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -31,7 +31,7 @@ endif %.o: %.m $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@") -LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(1) $(LIBS)," LINK $(TARGET_DIR)$@") +LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(sort $(1)) $(LIBS)," LINK $(TARGET_DIR)$@") %$(EXESUF): %.o $(call LINK,$^) |