[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 14/24] tests/tcg/i386: fix test-i386
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v1 14/24] tests/tcg/i386: fix test-i386 |
Date: |
Sun, 15 Apr 2018 21:13:15 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/10/2018 04:39 PM, Alex Bennée wrote:
> The test-i386 test case is a little special as it includes assembler
> files. Add the additional compile magic to assemble these bits and
> link them to the final binary.
>
> Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> tests/tcg/i386/Makefile.target | 19 +++++++++++++++++++
> tests/tcg/i386/test-i386.c | 1 -
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
> index 7dbb7992e7..1df69e0dab 100644
> --- a/tests/tcg/i386/Makefile.target
> +++ b/tests/tcg/i386/Makefile.target
> @@ -8,3 +8,22 @@ ifdef CROSS_CC_GUEST_CFLAGS
> CFLAGS+=$(CROSS_CC_GUEST_CFLAGS)
> endif
> endif
> +
> +#
> +# test-386 includes a couple of additional objects that need to be linked
> together
> +#
> +
> +TEST_I386_DEPS=test-i386-code16.o test-i386-vm86.o
> +
> +# override the default compile and link in one go rule
> +test-i386.o: test-i386.c
> + $(CC) $(CFLAGS) -c $< -o $@
> +
> +# and provide a rule to compile .S files
> +%.o: %.S
> + $(CC) $(CFLAGS) -c $< -o $@
> +
> +test-i386: LDFLAGS+=-lm -lc
> +test-i386: test-i386.o $(TEST_I386_DEPS)
> + $(LD) -melf_i386 $(LDFLAGS) $< $(TEST_I386_DEPS) -o $@
> +
> diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
> index 9599204895..cae6a7773a 100644
> --- a/tests/tcg/i386/test-i386.c
> +++ b/tests/tcg/i386/test-i386.c
> @@ -17,7 +17,6 @@
> * along with this program; if not, see <http://www.gnu.org/licenses/>.
> */
> #define _GNU_SOURCE
> -#include "qemu/compiler.h"
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
>
- [Qemu-devel] [PATCH v1 09/24] tests/tcg: move architecture independent tests into subdir, (continued)
- [Qemu-devel] [PATCH v1 09/24] tests/tcg: move architecture independent tests into subdir, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 13/24] tests/tcg/i386: move test-i386-sse.c to tests/tcg/x86_64/test-sse.c, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 10/24] tests/tcg/multiarch: Build fix for linux-test, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 14/24] tests/tcg/i386: fix test-i386, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 15/24] tests/tcg/i368: fix hello-i386, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 18/24] tests/tcg/arm: fix hello-arm, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 24/24] tests/Makefile.include: add (clean-)check-tcg targets, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 23/24] Makefile.target: add (clean-)guest-tests targets, Alex Bennée, 2018/04/10