[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Makefile: don't use LINKPROG for tests/migratio
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] Makefile: don't use LINKPROG for tests/migration/stress |
Date: |
Mon, 2 Oct 2017 12:14:39 +0100 |
On 2 October 2017 at 09:30, Alexey Perevalov <address@hidden> wrote:
> This patch just replaces LINKPROG for CC.
> LINKPROG invokes both CXX and CC.
> So in case of static linking of C source, static libstdc++
> is required by build, but it could be missing in system.
> And static libstdc++ may not be needed for whole QEMU.
>
> Signed-off-by: Alexey Perevalov <address@hidden>
> ---
> tests/Makefile.include | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index abc6707..bf94516 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -803,7 +803,7 @@ tests/numa-test$(EXESUF): tests/numa-test.o
> tests/vmgenid-test$(EXESUF): tests/vmgenid-test.o tests/boot-sector.o
> tests/acpi-utils.o
>
> tests/migration/stress$(EXESUF): tests/migration/stress.o
> - $(call quiet-command, $(LINKPROG) -static -O3 $(PTHREAD_LIB) -o $@ $<
> ,"LINK","$(TARGET_DIR)$@")
> + $(call quiet-command, $(CC) -static -O3 $(PTHREAD_LIB) -o $@ $<
> ,"LINK","$(TARGET_DIR)$@")
>
> INITRD_WORK_DIR=tests/migration/initrd
Why does this executable need to define its own link rule anyway?
Ideally it should just use the standard rules.mak LINK function
like everything else. If it does need to do something weird
it should have a comment saying why it's weird...
thanks
-- PMM