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

Re: [Xen-devel] [PATCH v1 9/9] livepatch: tests: Make them compile under ARM64



On 17/08/2016 20:57, Julien Grall wrote:
> Hi Konrad,
>
> On 17/08/2016 20:00, Konrad Rzeszutek Wilk wrote:
>> On Wed, Aug 17, 2016 at 07:29:12PM +0100, Julien Grall wrote:
>>> On 15/08/16 00:07, Konrad Rzeszutek Wilk wrote:
>
> [...]
>
>>>> diff --git a/xen/common/Makefile b/xen/common/Makefile
>>>> index 22806b6..fe83653 100644
>>>> --- a/xen/common/Makefile
>>>> +++ b/xen/common/Makefile
>>>> @@ -82,6 +82,6 @@ subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt
>>>>
>>>>  .PHONY: tests
>>>>  tests:
>>>> -ifeq ($(XEN_TARGET_ARCH),x86_64)
>>>> +ifneq ($(XEN_TARGET_ARCH),arm32)
>>>>      $(MAKE) -f $(BASEDIR)/Rules.mk -C test livepatch
>>>>  endif
>>>> diff --git a/xen/common/test/Makefile b/xen/common/test/Makefile
>>>> index 23dff1d..3eed6dd 100644
>>>> --- a/xen/common/test/Makefile
>>>> +++ b/xen/common/test/Makefile
>>>> @@ -1,5 +1,11 @@
>>>>  include $(XEN_ROOT)/Config.mk
>>>>
>>>> +ifeq ($(XEN_TARGET_ARCH),x86_64)
>>>> +OBJCOPY_MAGIC := -I binary -O elf64-x86-64 -B i386:x86-64
>>>> +else
>>>
>>> Is there any reason to fallback on arm64 flags by default? Would not
>>> it be
>>> better to have an else if here?
>>>
>>>> +OBJCOPY_MAGIC := -I binary -O elf64-littleaarch64 -B aarch64
>>
>> I presume you are referring to this comment. I am not sure how you would
>> identify whether the elf64-littleaarch64 is not part of the OBJCOPY?
>>
>> Oh I guess you can: objcopy --info
>>
>> Or are you saying just use 'arm64' instead of 'aarch64' ?
>
> I was suggesting to do
>
> ifeq ($(XEN_TARGET_ARCH),x86_64))
> OBJCOPY_MAGIC := ...
> endif
> ifeq ($(XEN_TARGET_ARCH),arm64))
> OBJCOPY_MAGIC := ...
> endif

You can chain "else ifeq" together like this in a makefile to avoid most
of those endif's

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.