All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec-tools: Fix compilation with clang
@ 2019-04-16 15:29 Oleksiy Obitotskyy
  2019-05-16  8:32 ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksiy Obitotskyy @ 2019-04-16 15:29 UTC (permalink / raw)
  To: openembedded-core

clang assembler do not understand some directives e.g.

../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive
.arch i386
^ ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:115:11: error: unknown token in expression
ljmp %cs:*(realdest - entry16)
^

Force external assembler for purgatory and tests.

Upstream-Status: Pending
Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
---
 ..._64-Makefile-fix-assemble-with-clang.patch | 23 +++++++++++++++++++
 .../kexec/kexec-tools_2.0.19.bb               |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch

diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
new file mode 100644
index 0000000000..13f247982a
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
@@ -0,0 +1,23 @@
+--- a/purgatory/Makefile	2019-03-05 07:47:03.190429822 -0800
++++ b/purgatory/Makefile	2019-03-05 07:42:52.167623612 -0800
+@@ -31,6 +31,9 @@ include $(srcdir)/purgatory/arch/x86_64/
+ 
+ PURGATORY_SRCS+=$($(ARCH)_PURGATORY_SRCS)
+ 
++PURGATORY_EXTRA_CFLAGS += -no-integrated-as
++$(ARCH)_PURGATORY_EXTRA_CFLAGS += -no-integrated-as
++
+ PURGATORY_OBJS = $(call objify, $(PURGATORY_SRCS)) purgatory/sha256.o
+ PURGATORY_DEPS = $(call depify, $(PURGATORY_OBJS))
+ 
+--- a/kexec_test/Makefile	2019-03-05 07:45:14.757353575 -0800
++++ b/kexec_test/Makefile	2019-03-05 07:45:57.567173264 -0800
+@@ -17,6 +17,8 @@ endif
+ 
+ ifeq ($(BUILD_KEXEC_TEST),yes)
+ 
++CPPFLAGS += -no-integrated-as
++
+ KEXEC_TEST_OBJS = $(call objify, $(KEXEC_TEST_SRCS))
+ KEXEC_TEST_DEPS = $(call depify, $(KEXEC_TEST_OBJS))
+ 
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
index f65cd9f106..c229097d5b 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
@@ -20,6 +20,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
            file://0001-Disable-PIE-during-link.patch \
            "
 
+SRC_URI_append_toolchain-clang = " file://0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch"
+
 SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
 SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58"
 
-- 
2.19.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kexec-tools: Fix compilation with clang
  2019-04-16 15:29 [PATCH] kexec-tools: Fix compilation with clang Oleksiy Obitotskyy
@ 2019-05-16  8:32 ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)
  2019-05-20 20:14   ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco) @ 2019-05-16  8:32 UTC (permalink / raw)
  To: openembedded-core

Any comments?

Regards,
Oleksiy

On 16.04.19 18:29, Oleksiy Obitotskyy wrote:
> clang assembler do not understand some directives e.g.
>
> ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive
> .arch i386
> ^ ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:115:11: error: unknown token in expression
> ljmp %cs:*(realdest - entry16)
> ^
>
> Force external assembler for purgatory and tests.
>
> Upstream-Status: Pending
> Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
> ---
>  ..._64-Makefile-fix-assemble-with-clang.patch | 23 +++++++++++++++++++
>  .../kexec/kexec-tools_2.0.19.bb               |  2 ++
>  2 files changed, 25 insertions(+)
>  create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>
> diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
> new file mode 100644
> index 0000000000..13f247982a
> --- /dev/null
> +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
> @@ -0,0 +1,23 @@
> +--- a/purgatory/Makefile	2019-03-05 07:47:03.190429822 -0800
> ++++ b/purgatory/Makefile	2019-03-05 07:42:52.167623612 -0800
> +@@ -31,6 +31,9 @@ include $(srcdir)/purgatory/arch/x86_64/
> + 
> + PURGATORY_SRCS+=$($(ARCH)_PURGATORY_SRCS)
> + 
> ++PURGATORY_EXTRA_CFLAGS += -no-integrated-as
> ++$(ARCH)_PURGATORY_EXTRA_CFLAGS += -no-integrated-as
> ++
> + PURGATORY_OBJS = $(call objify, $(PURGATORY_SRCS)) purgatory/sha256.o
> + PURGATORY_DEPS = $(call depify, $(PURGATORY_OBJS))
> + 
> +--- a/kexec_test/Makefile	2019-03-05 07:45:14.757353575 -0800
> ++++ b/kexec_test/Makefile	2019-03-05 07:45:57.567173264 -0800
> +@@ -17,6 +17,8 @@ endif
> + 
> + ifeq ($(BUILD_KEXEC_TEST),yes)
> + 
> ++CPPFLAGS += -no-integrated-as
> ++
> + KEXEC_TEST_OBJS = $(call objify, $(KEXEC_TEST_SRCS))
> + KEXEC_TEST_DEPS = $(call depify, $(KEXEC_TEST_OBJS))
> + 
> diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
> index f65cd9f106..c229097d5b 100644
> --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
> +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
> @@ -20,6 +20,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
>             file://0001-Disable-PIE-during-link.patch \
>             "
>  
> +SRC_URI_append_toolchain-clang = " file://0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch"
> +
>  SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
>  SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58"
>  



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kexec-tools: Fix compilation with clang
  2019-05-16  8:32 ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)
@ 2019-05-20 20:14   ` Khem Raj
  2019-05-21  9:52     ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2019-05-20 20:14 UTC (permalink / raw)
  To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco),
	openembedded-core



On 5/16/19 1:32 AM, Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at 
Cisco) via Openembedded-core wrote:
> Any comments?
> 

This is same as https://bugzilla.kernel.org/show_bug.cgi?id=177321

and I think the below should have helped.

https://github.com/kraj/meta-clang/blob/master/conf/nonclangable.conf#L152-L158

If thats not helping then I would like to understand why

So lets try to fix the problem upstream first and meanwhile make fixes 
in meta-clang.

> Regards,
> Oleksiy
> 
> On 16.04.19 18:29, Oleksiy Obitotskyy wrote:
>> clang assembler do not understand some directives e.g.
>>
>> ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive
>> .arch i386
>> ^ ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:115:11: error: unknown token in expression
>> ljmp %cs:*(realdest - entry16)
>> ^
>>
>> Force external assembler for purgatory and tests.
>>
>> Upstream-Status: Pending
>> Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
>> ---
>>   ..._64-Makefile-fix-assemble-with-clang.patch | 23 +++++++++++++++++++
>>   .../kexec/kexec-tools_2.0.19.bb               |  2 ++
>>   2 files changed, 25 insertions(+)
>>   create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>>
>> diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>> new file mode 100644
>> index 0000000000..13f247982a
>> --- /dev/null
>> +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>> @@ -0,0 +1,23 @@
>> +--- a/purgatory/Makefile	2019-03-05 07:47:03.190429822 -0800
>> ++++ b/purgatory/Makefile	2019-03-05 07:42:52.167623612 -0800
>> +@@ -31,6 +31,9 @@ include $(srcdir)/purgatory/arch/x86_64/
>> +
>> + PURGATORY_SRCS+=$($(ARCH)_PURGATORY_SRCS)
>> +
>> ++PURGATORY_EXTRA_CFLAGS += -no-integrated-as
>> ++$(ARCH)_PURGATORY_EXTRA_CFLAGS += -no-integrated-as
>> ++
>> + PURGATORY_OBJS = $(call objify, $(PURGATORY_SRCS)) purgatory/sha256.o
>> + PURGATORY_DEPS = $(call depify, $(PURGATORY_OBJS))
>> +
>> +--- a/kexec_test/Makefile	2019-03-05 07:45:14.757353575 -0800
>> ++++ b/kexec_test/Makefile	2019-03-05 07:45:57.567173264 -0800
>> +@@ -17,6 +17,8 @@ endif
>> +
>> + ifeq ($(BUILD_KEXEC_TEST),yes)
>> +
>> ++CPPFLAGS += -no-integrated-as
>> ++
>> + KEXEC_TEST_OBJS = $(call objify, $(KEXEC_TEST_SRCS))
>> + KEXEC_TEST_DEPS = $(call depify, $(KEXEC_TEST_OBJS))
>> +
>> diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
>> index f65cd9f106..c229097d5b 100644
>> --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
>> +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
>> @@ -20,6 +20,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
>>              file://0001-Disable-PIE-during-link.patch \
>>              "
>>   
>> +SRC_URI_append_toolchain-clang = " file://0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch"
>> +
>>   SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
>>   SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58"
>>   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kexec-tools: Fix compilation with clang
  2019-05-20 20:14   ` Khem Raj
@ 2019-05-21  9:52     ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)
  0 siblings, 0 replies; 4+ messages in thread
From: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco) @ 2019-05-21  9:52 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On 20.05.19 23:14, Khem Raj wrote:
>
> On 5/16/19 1:32 AM, Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at 
> Cisco) via Openembedded-core wrote:
>> Any comments?
>>
> This is same as https://bugzilla.kernel.org/show_bug.cgi?id=177321
>
> and I think the below should have helped.
>
> https://github.com/kraj/meta-clang/blob/master/conf/nonclangable.conf#L152-L158
>
> If thats not helping then I would like to understand why
Yes, overriding CC flags for clang toolchain is fine.

>
> So lets try to fix the problem upstream first and meanwhile make fixes 
> in meta-clang.
>
>> Regards,
>> Oleksiy
>>
>> On 16.04.19 18:29, Oleksiy Obitotskyy wrote:
>>> clang assembler do not understand some directives e.g.
>>>
>>> ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive
>>> .arch i386
>>> ^ ../kexec-tools-2.0.17/purgatory/arch/i386/entry32-16.S:115:11: error: unknown token in expression
>>> ljmp %cs:*(realdest - entry16)
>>> ^
>>>
>>> Force external assembler for purgatory and tests.
>>>
>>> Upstream-Status: Pending
>>> Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
>>> ---
>>>   ..._64-Makefile-fix-assemble-with-clang.patch | 23 +++++++++++++++++++
>>>   .../kexec/kexec-tools_2.0.19.bb               |  2 ++
>>>   2 files changed, 25 insertions(+)
>>>   create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>>>
>>> diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>>> new file mode 100644
>>> index 0000000000..13f247982a
>>> --- /dev/null
>>> +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch
>>> @@ -0,0 +1,23 @@
>>> +--- a/purgatory/Makefile	2019-03-05 07:47:03.190429822 -0800
>>> ++++ b/purgatory/Makefile	2019-03-05 07:42:52.167623612 -0800
>>> +@@ -31,6 +31,9 @@ include $(srcdir)/purgatory/arch/x86_64/
>>> +
>>> + PURGATORY_SRCS+=$($(ARCH)_PURGATORY_SRCS)
>>> +
>>> ++PURGATORY_EXTRA_CFLAGS += -no-integrated-as
>>> ++$(ARCH)_PURGATORY_EXTRA_CFLAGS += -no-integrated-as
>>> ++
>>> + PURGATORY_OBJS = $(call objify, $(PURGATORY_SRCS)) purgatory/sha256.o
>>> + PURGATORY_DEPS = $(call depify, $(PURGATORY_OBJS))
>>> +
>>> +--- a/kexec_test/Makefile	2019-03-05 07:45:14.757353575 -0800
>>> ++++ b/kexec_test/Makefile	2019-03-05 07:45:57.567173264 -0800
>>> +@@ -17,6 +17,8 @@ endif
>>> +
>>> + ifeq ($(BUILD_KEXEC_TEST),yes)
>>> +
>>> ++CPPFLAGS += -no-integrated-as
>>> ++
>>> + KEXEC_TEST_OBJS = $(call objify, $(KEXEC_TEST_SRCS))
>>> + KEXEC_TEST_DEPS = $(call depify, $(KEXEC_TEST_OBJS))
>>> +
>>> diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
>>> index f65cd9f106..c229097d5b 100644
>>> --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
>>> +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
>>> @@ -20,6 +20,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
>>>              file://0001-Disable-PIE-during-link.patch \
>>>              "
>>>   
>>> +SRC_URI_append_toolchain-clang = " file://0001-purgatory-x86_64-Makefile-fix-assemble-with-clang.patch"
>>> +
>>>   SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
>>>   SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58"
>>>   



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-21  9:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 15:29 [PATCH] kexec-tools: Fix compilation with clang Oleksiy Obitotskyy
2019-05-16  8:32 ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)
2019-05-20 20:14   ` Khem Raj
2019-05-21  9:52     ` Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC@Cisco)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.