qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/4] hw/display/milkymist-tmu2: Move inlined


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v2 4/4] hw/display/milkymist-tmu2: Move inlined code from header to source
Date: Mon, 28 Jan 2019 18:47:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Cc'ing Thomas/Paolo for Makefile rules...

On 1/24/19 12:43 PM, Gerd Hoffmann wrote:
> On Thu, Jan 24, 2019 at 02:15:54AM +0100, Philippe Mathieu-Daudé wrote:
>> Move the complexity of milkymist_tmu2_create() into the
>> source file. Doing so we avoid to include the X11/OpenGL
>> headers in all LM32 devices, and we also avoid the duplicate
>> declaration of glx_fbconfig_attr[] (it is already declared
>> in hw/display/milkymist-tmu2.c).
>> Since TYPE_MILKYMIST_TMU2 is now accessible, use it.
> 
> Oops, fails the build:
> 
>   LINK    lm32-softmmu/qemu-system-lm32
> hw/lm32/milkymist.o: In function `milkymist_init':
> milkymist.c:(.text+0xb0f): undefined reference to `milkymist_tmu2_create'

The problem comes from patch #2:

> diff --git a/default-configs/lm32-softmmu.mak
b/default-configs/lm32-softmmu.mak
> index 4889348a10..4049b23562 100644
> --- a/default-configs/lm32-softmmu.mak
> +++ b/default-configs/lm32-softmmu.mak
> @@ -2,7 +2,7 @@
>
>  CONFIG_LM32=y
>  CONFIG_MILKYMIST=y
> -CONFIG_MILKYMIST_TMU2=$(CONFIG_OPENGL)
> +CONFIG_MILKYMIST_TMU2=$(call land,$(CONFIG_X11),$(CONFIG_OPENGL))
>  CONFIG_FRAMEBUFFER=y
>  CONFIG_PTIMER=y
>  CONFIG_PFLASH_CFI01=y
> diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
> index 97acd5b6cb..079e702f25 100644
> --- a/hw/display/Makefile.objs
> +++ b/hw/display/Makefile.objs
> @@ -29,8 +29,8 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-vgafb.o
>  common-obj-$(CONFIG_ZAURUS) += tc6393xb.o
>
>  common-obj-$(CONFIG_MILKYMIST_TMU2) += milkymist-tmu2.o
> -milkymist-tmu2.o-cflags := $(X11_CFLAGS)
> -milkymist-tmu2.o-libs := $(X11_LIBS)
> +milkymist-tmu2.o-cflags := $(X11_CFLAGS) $(OPENGL_CFLAGS)
> +milkymist-tmu2.o-libs := $(X11_LIBS) $(OPENGL_LIBS)
>
>  obj-$(CONFIG_OMAP) += omap_dss.o
>  obj-$(CONFIG_OMAP) += omap_lcdc.o

Using $(call land) seems to break CONFIG_MILKYMIST_TMU2 availability in
$(common-obj), while it works correctly in the per-target $(obj).
I'm not sure what is the cause, but moving milkymist-tmu2.o to $(obj)
makes more sense and fix this, so I'll go this way.

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]