All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc: Fix compile of gcc plugins
@ 2021-12-23 12:25 Andrei Gherzan
  2021-12-24  5:50 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Andrei Gherzan @ 2021-12-23 12:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: bernhard.rosenkraenzer.ext, Andrei Gherzan

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Without this, compiling gcc plugins will fail with an error similar to:
[...]
fatal error: ./config/i386/linux64.h: No such file or directory
[...]

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 meta/recipes-devtools/gcc/gcc-11.2.inc        |  1 +
 .../0001-Fix-install-path-of-linux64.h.patch  | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch

diff --git a/meta/recipes-devtools/gcc/gcc-11.2.inc b/meta/recipes-devtools/gcc/gcc-11.2.inc
index e352c958de..f07a5be507 100644
--- a/meta/recipes-devtools/gcc/gcc-11.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.2.inc
@@ -59,6 +59,7 @@ SRC_URI = "\
            file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
            file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \
            file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
+           file://0001-Fix-install-path-of-linux64.h.patch \
            file://0001-CVE-2021-35465.patch \
            file://0002-CVE-2021-35465.patch \
            file://0003-CVE-2021-35465.patch \
diff --git a/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
new file mode 100644
index 0000000000..55f78eaa0b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
@@ -0,0 +1,33 @@
+From 58211c7ceb0510b2a11a7f1da3c7fa968c658749 Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei.gherzan@huawei.com>
+Date: Wed, 22 Dec 2021 12:49:25 +0100
+Subject: [PATCH] Fix install path of linux64.h
+
+We add linux64.h to tm includes[1] as a relative path to B. This patch
+adapts the install path of linux64.h to match the include in tm.h.
+
+[1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+
+Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/Makefile.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 9b17d120a..d175ec4e3 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3693,6 +3693,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ 	  "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
+ 	  | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
+ 	    base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
++	  ./* ) \
++	    base=`dirname $$path`;;\
+ 	  *) base=`basename $$path` ;; \
+ 	  esac; \
+ 	  dest=$(plugin_includedir)/$$base; \
+-- 
+2.25.1
+
-- 
2.25.1



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

* Re: [OE-core] [PATCH] gcc: Fix compile of gcc plugins
  2021-12-23 12:25 [PATCH] gcc: Fix compile of gcc plugins Andrei Gherzan
@ 2021-12-24  5:50 ` Khem Raj
  2022-01-06 13:56   ` Andrei Gherzan
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2021-12-24  5:50 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: Patches and discussions about the oe-core layer,
	Bernhard Rosenkränzer, Andrei Gherzan

On Thu, Dec 23, 2021 at 4:26 AM Andrei Gherzan <andrei@gherzan.com> wrote:
>
> From: Andrei Gherzan <andrei.gherzan@huawei.com>
>
> Without this, compiling gcc plugins will fail with an error similar to:
> [...]
> fatal error: ./config/i386/linux64.h: No such file or directory
> [...]
>
> Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
> ---
>  meta/recipes-devtools/gcc/gcc-11.2.inc        |  1 +
>  .../0001-Fix-install-path-of-linux64.h.patch  | 33 +++++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-11.2.inc b/meta/recipes-devtools/gcc/gcc-11.2.inc
> index e352c958de..f07a5be507 100644
> --- a/meta/recipes-devtools/gcc/gcc-11.2.inc
> +++ b/meta/recipes-devtools/gcc/gcc-11.2.inc
> @@ -59,6 +59,7 @@ SRC_URI = "\
>             file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
>             file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \
>             file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
> +           file://0001-Fix-install-path-of-linux64.h.patch \
>             file://0001-CVE-2021-35465.patch \
>             file://0002-CVE-2021-35465.patch \
>             file://0003-CVE-2021-35465.patch \
> diff --git a/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
> new file mode 100644
> index 0000000000..55f78eaa0b
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
> @@ -0,0 +1,33 @@
> +From 58211c7ceb0510b2a11a7f1da3c7fa968c658749 Mon Sep 17 00:00:00 2001
> +From: Andrei Gherzan <andrei.gherzan@huawei.com>
> +Date: Wed, 22 Dec 2021 12:49:25 +0100
> +Subject: [PATCH] Fix install path of linux64.h
> +
> +We add linux64.h to tm includes[1] as a relative path to B. This patch
> +adapts the install path of linux64.h to match the include in tm.h.
> +
> +[1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
> +
> +Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
> +
> +Upstream-Status: Inappropriate [configuration]
> +---
> + gcc/Makefile.in | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/gcc/Makefile.in b/gcc/Makefile.in
> +index 9b17d120a..d175ec4e3 100644
> +--- a/gcc/Makefile.in
> ++++ b/gcc/Makefile.in
> +@@ -3693,6 +3693,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
> +         "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
> +         | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
> +           base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
> ++        ./* ) \
> ++          base=`dirname $$path`;;\

this needs better explaining, and I have a hunch that it could be a
broad brush too,

> +         *) base=`basename $$path` ;; \
> +         esac; \
> +         dest=$(plugin_includedir)/$$base; \
> +--
> +2.25.1
> +
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#159978): https://lists.openembedded.org/g/openembedded-core/message/159978
> Mute This Topic: https://lists.openembedded.org/mt/87916998/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH] gcc: Fix compile of gcc plugins
  2021-12-24  5:50 ` [OE-core] " Khem Raj
@ 2022-01-06 13:56   ` Andrei Gherzan
  0 siblings, 0 replies; 3+ messages in thread
From: Andrei Gherzan @ 2022-01-06 13:56 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded, Bernhard Rosenkränzer, Andrei Gherzan

On Fri, 24 Dec 2021, at 05:50, Khem Raj wrote:
> On Thu, Dec 23, 2021 at 4:26 AM Andrei Gherzan <andrei@gherzan.com> wrote:
>>
>> From: Andrei Gherzan <andrei.gherzan@huawei.com>
>>
>> Without this, compiling gcc plugins will fail with an error similar to:
>> [...]
>> fatal error: ./config/i386/linux64.h: No such file or directory
>> [...]
>>
>> Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
>> ---
>>  meta/recipes-devtools/gcc/gcc-11.2.inc        |  1 +
>>  .../0001-Fix-install-path-of-linux64.h.patch  | 33 +++++++++++++++++++
>>  2 files changed, 34 insertions(+)
>>  create mode 100644 meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-11.2.inc b/meta/recipes-devtools/gcc/gcc-11.2.inc
>> index e352c958de..f07a5be507 100644
>> --- a/meta/recipes-devtools/gcc/gcc-11.2.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-11.2.inc
>> @@ -59,6 +59,7 @@ SRC_URI = "\
>>             file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
>>             file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \
>>             file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
>> +           file://0001-Fix-install-path-of-linux64.h.patch \
>>             file://0001-CVE-2021-35465.patch \
>>             file://0002-CVE-2021-35465.patch \
>>             file://0003-CVE-2021-35465.patch \
>> diff --git a/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
>> new file mode 100644
>> index 0000000000..55f78eaa0b
>> --- /dev/null
>> +++ b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
>> @@ -0,0 +1,33 @@
>> +From 58211c7ceb0510b2a11a7f1da3c7fa968c658749 Mon Sep 17 00:00:00 2001
>> +From: Andrei Gherzan <andrei.gherzan@huawei.com>
>> +Date: Wed, 22 Dec 2021 12:49:25 +0100
>> +Subject: [PATCH] Fix install path of linux64.h
>> +
>> +We add linux64.h to tm includes[1] as a relative path to B. This patch
>> +adapts the install path of linux64.h to match the include in tm.h.
>> +
>> +[1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
>> +
>> +Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
>> +
>> +Upstream-Status: Inappropriate [configuration]
>> +---
>> + gcc/Makefile.in | 2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/gcc/Makefile.in b/gcc/Makefile.in
>> +index 9b17d120a..d175ec4e3 100644
>> +--- a/gcc/Makefile.in
>> ++++ b/gcc/Makefile.in
>> +@@ -3693,6 +3693,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
>> +         "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
>> +         | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
>> +           base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
>> ++        ./* ) \
>> ++          base=`dirname $$path`;;\
>
> this needs better explaining, and I have a hunch that it could be a
> broad brush too,

The initial fix was to "case it" on the specific header file but I reckon this will be useful for other ./* header that might be added in the future.

I'm going to explain it more in git log and also make it specific to the header.

Andrei


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

end of thread, other threads:[~2022-01-06 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 12:25 [PATCH] gcc: Fix compile of gcc plugins Andrei Gherzan
2021-12-24  5:50 ` [OE-core] " Khem Raj
2022-01-06 13:56   ` Andrei Gherzan

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.