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 19:28:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/28/19 7:02 PM, Peter Maydell wrote:
> On Mon, 28 Jan 2019 at 17:47, Philippe Mathieu-Daudé <address@hidden> wrote:
>>
>> Cc'ing Thomas/Paolo for Makefile rules...
>>
>> On 1/24/19 12:43 PM, Gerd Hoffmann wrote:
>>> 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.
> 
> Something weird definitely seems to be going on here -- 'call land'
> ought not to be broken in this situation.
> 
> I don't understand why the build/config-all-devices.mak versions of
> the defines of CONFIG_FOO variables are so weird:
> 
> CONFIG_ACPI:=$(findstring y,$(CONFIG_ACPI)y)
> 
> ...are they really intended to be self-referential like that?
> 
> The per-target ones in build/foo-softmmu/config-devices.mak are
> more like what I expected:
> 
> CONFIG_VGA=y
> 
> Paolo, git blame says you wrote the makefile rune back in 2013:
> I don't suppose you can remember the intent ?

Now than Kconfig is in good usable shape, I'm pretty sure Paolo doesn't
want to remember ;) Our time is better worth spent on Kconfig than
fixing those issues.

For this series goal (remove SDL1!) I'll go with moving LM32/Milkymist
devices to $(obj). Hopefully the next patch will be in Kconfig :)



reply via email to

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