All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain
@ 2020-05-06  2:15 Denys Dmytriyenko
  2020-05-06  2:15 ` [PATCH 2/4] gcc-arm: remove extra binary aliases when TCMODE=external-arm Denys Dmytriyenko
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-06  2:15 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

gcc-target.inc expects unwind.h to come from and be staged by libgcc.
When TCMODE="external-arm" libgcc is provided by external-arm-toolchain.bb
And while it stages the necessary unwind.h file, it ends up in slightly
different location, so re-stage it. More details are in the comments.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../recipes-devtools/gcc/gcc-arm-common.inc             | 17 +++++++++++++++++
 meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb  |  1 +
 meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb  |  1 +
 meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb  |  1 +
 4 files changed, 20 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc

diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
new file mode 100644
index 0000000..55f40e1
--- /dev/null
+++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
@@ -0,0 +1,17 @@
+# gcc-target.inc in OE-Core has these 2 lines in do_install():
+#
+# | # Add unwind.h, it comes from libgcc which we don't want to build again
+# | install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+#
+# When TCMODE="external-arm" libgcc is provided by external-arm-toolchain.bb
+# And while it stages the necessary unwind.h file, it ends up in slightly
+# different location. While this is a kludge, be very conservative - only
+# copy the file for target build in recipe-specific sysroot, in external-arm
+# toolchain mode and if the required file does not exist already.
+
+do_install_prepend_class-target () {
+	if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then
+		install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
+		install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
+	fi
+}
diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb
index c4a2de2..51a0877 100644
--- a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb
+++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb
@@ -1,5 +1,6 @@
 require recipes-devtools/gcc/gcc-${PV}.inc
 require recipes-devtools/gcc/gcc-target.inc
+require recipes-devtools/gcc/gcc-arm-common.inc
 
 # Building with thumb enabled on armv4t armv5t fails with
 # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb
index c4a2de2..51a0877 100644
--- a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb
+++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb
@@ -1,5 +1,6 @@
 require recipes-devtools/gcc/gcc-${PV}.inc
 require recipes-devtools/gcc/gcc-target.inc
+require recipes-devtools/gcc/gcc-arm-common.inc
 
 # Building with thumb enabled on armv4t armv5t fails with
 # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb
index c4a2de2..51a0877 100644
--- a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb
+++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb
@@ -1,5 +1,6 @@
 require recipes-devtools/gcc/gcc-${PV}.inc
 require recipes-devtools/gcc/gcc-target.inc
+require recipes-devtools/gcc/gcc-arm-common.inc
 
 # Building with thumb enabled on armv4t armv5t fails with
 # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-- 
2.7.4


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

* [PATCH 2/4] gcc-arm: remove extra binary aliases when TCMODE=external-arm
  2020-05-06  2:15 [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Denys Dmytriyenko
@ 2020-05-06  2:15 ` Denys Dmytriyenko
  2020-05-06  2:15 ` [PATCH 3/4] external-arm-toolchain: remove empty libexecdir Denys Dmytriyenko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-06  2:15 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

When TCMODE=external-arm, TARGET_SYS!=EAT_TARGET_SYS and gcc installs extra
binary aliases, which could lead to QA errors:

ERROR: gcc-arm-9.2-r2019.12 do_package: QA Issue: gcc: Files/directories were installed but not shipped in any package:
  /usr/bin/arm-poky-linux-gnueabi-arm-none-linux-gnueabihf-g++
  /usr/bin/arm-poky-linux-gnueabi-arm-none-linux-gnueabihf-gcc
  /usr/bin/arm-poky-linux-gnueabi-arm-none-linux-gnueabihf-gcc-ar
  /usr/bin/arm-poky-linux-gnueabi-arm-none-linux-gnueabihf-gcc-ranlib
  /usr/bin/arm-poky-linux-gnueabi-arm-none-linux-gnueabihf-gcc-nm
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
gcc: 5 installed and not shipped files. [installed-vs-shipped]
ERROR: gcc-arm-9.2-r2019.12 do_package: Fatal QA errors found, failing task.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
index 55f40e1..5599743 100644
--- a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
+++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
@@ -15,3 +15,13 @@ do_install_prepend_class-target () {
 		install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
 	fi
 }
+
+# When TCMODE="external-arm" and TARGET_SYS is different from EAT_TARGET_SYS,
+# gcc installs additional aliases as ${TARGET_SYS}-${EAT_TARGET_SYS}-gcc, etc.
+# Since those are not packaged and not too useful, let's remove them to avoid
+# QA issues
+do_install_append () {
+	for f in g++ gcc gcc-ar gcc-ranlib gcc-nm; do
+		rm -f ${D}${bindir}/${TARGET_SYS}-${EAT_TARGET_SYS}-$f
+	done
+}
-- 
2.7.4


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

* [PATCH 3/4] external-arm-toolchain: remove empty libexecdir
  2020-05-06  2:15 [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Denys Dmytriyenko
  2020-05-06  2:15 ` [PATCH 2/4] gcc-arm: remove extra binary aliases when TCMODE=external-arm Denys Dmytriyenko
@ 2020-05-06  2:15 ` Denys Dmytriyenko
  2020-05-06  2:15 ` [PATCH 4/4] external-arm-toolchain: remove unused /usr/share/info/dir Denys Dmytriyenko
  2020-05-06 17:26 ` [meta-arm] [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Jon Mason
  3 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-06  2:15 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Fixes following QA issue (normally a warning, but Poky and other distros
may treat it as fatal):

ERROR: external-arm-toolchain-2019.12-r0 do_package: QA Issue: external-arm-toolchain: Files/directories were installed but not shipped in any package:
  /usr/libexec
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
external-arm-toolchain: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: external-arm-toolchain-2019.12-r0 do_package: Fatal QA errors found, failing task.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
index 88ebbb3..f98f6a3 100644
--- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
+++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
@@ -223,6 +223,7 @@ do_install() {
 	rmdir ${D}${bindir} || true
 	rmdir ${D}${sbindir} || true
 	rmdir ${D}${base_sbindir} || true
+	rmdir ${D}${libexecdir} || true
 }
 
 # External toolchain doesn't provide multilib support so make corresponding
-- 
2.7.4


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

* [PATCH 4/4] external-arm-toolchain: remove unused /usr/share/info/dir
  2020-05-06  2:15 [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Denys Dmytriyenko
  2020-05-06  2:15 ` [PATCH 2/4] gcc-arm: remove extra binary aliases when TCMODE=external-arm Denys Dmytriyenko
  2020-05-06  2:15 ` [PATCH 3/4] external-arm-toolchain: remove empty libexecdir Denys Dmytriyenko
@ 2020-05-06  2:15 ` Denys Dmytriyenko
  2020-05-06 17:26 ` [meta-arm] [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Jon Mason
  3 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-06  2:15 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Fixes following QA issue:

WARNING: external-arm-toolchain-2019.12-r0 do_package_qa: QA Issue: The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
index f98f6a3..04d8923 100644
--- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
+++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
@@ -224,6 +224,9 @@ do_install() {
 	rmdir ${D}${sbindir} || true
 	rmdir ${D}${base_sbindir} || true
 	rmdir ${D}${libexecdir} || true
+
+	# Remove unused /usr/share/info/dir
+	rm -f ${D}${infodir}/dir
 }
 
 # External toolchain doesn't provide multilib support so make corresponding
-- 
2.7.4


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

* Re: [meta-arm] [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain
  2020-05-06  2:15 [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Denys Dmytriyenko
                   ` (2 preceding siblings ...)
  2020-05-06  2:15 ` [PATCH 4/4] external-arm-toolchain: remove unused /usr/share/info/dir Denys Dmytriyenko
@ 2020-05-06 17:26 ` Jon Mason
  3 siblings, 0 replies; 5+ messages in thread
From: Jon Mason @ 2020-05-06 17:26 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

On Tue, May 05, 2020 at 10:15:31PM -0400, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> gcc-target.inc expects unwind.h to come from and be staged by libgcc.
> When TCMODE="external-arm" libgcc is provided by external-arm-toolchain.bb
> And while it stages the necessary unwind.h file, it ends up in slightly
> different location, so re-stage it. More details are in the comments.
> 
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

Series applied to master branch.

Thanks,
Jon

> ---
>  .../recipes-devtools/gcc/gcc-arm-common.inc             | 17 +++++++++++++++++
>  meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb  |  1 +
>  meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb  |  1 +
>  meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb  |  1 +
>  4 files changed, 20 insertions(+)
>  create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
> 
> diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
> new file mode 100644
> index 0000000..55f40e1
> --- /dev/null
> +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc
> @@ -0,0 +1,17 @@
> +# gcc-target.inc in OE-Core has these 2 lines in do_install():
> +#
> +# | # Add unwind.h, it comes from libgcc which we don't want to build again
> +# | install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
> +#
> +# When TCMODE="external-arm" libgcc is provided by external-arm-toolchain.bb
> +# And while it stages the necessary unwind.h file, it ends up in slightly
> +# different location. While this is a kludge, be very conservative - only
> +# copy the file for target build in recipe-specific sysroot, in external-arm
> +# toolchain mode and if the required file does not exist already.
> +
> +do_install_prepend_class-target () {
> +	if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then
> +		install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
> +		install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
> +	fi
> +}
> diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb
> index c4a2de2..51a0877 100644
> --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb
> +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb
> @@ -1,5 +1,6 @@
>  require recipes-devtools/gcc/gcc-${PV}.inc
>  require recipes-devtools/gcc/gcc-target.inc
> +require recipes-devtools/gcc/gcc-arm-common.inc
>  
>  # Building with thumb enabled on armv4t armv5t fails with
>  # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
> diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb
> index c4a2de2..51a0877 100644
> --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb
> +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb
> @@ -1,5 +1,6 @@
>  require recipes-devtools/gcc/gcc-${PV}.inc
>  require recipes-devtools/gcc/gcc-target.inc
> +require recipes-devtools/gcc/gcc-arm-common.inc
>  
>  # Building with thumb enabled on armv4t armv5t fails with
>  # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
> diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb
> index c4a2de2..51a0877 100644
> --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb
> +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb
> @@ -1,5 +1,6 @@
>  require recipes-devtools/gcc/gcc-${PV}.inc
>  require recipes-devtools/gcc/gcc-target.inc
> +require recipes-devtools/gcc/gcc-arm-common.inc
>  
>  # Building with thumb enabled on armv4t armv5t fails with
>  # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
> -- 
> 2.7.4
> 

> 


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

end of thread, other threads:[~2020-05-06 17:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06  2:15 [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Denys Dmytriyenko
2020-05-06  2:15 ` [PATCH 2/4] gcc-arm: remove extra binary aliases when TCMODE=external-arm Denys Dmytriyenko
2020-05-06  2:15 ` [PATCH 3/4] external-arm-toolchain: remove empty libexecdir Denys Dmytriyenko
2020-05-06  2:15 ` [PATCH 4/4] external-arm-toolchain: remove unused /usr/share/info/dir Denys Dmytriyenko
2020-05-06 17:26 ` [meta-arm] [PATCH 1/4] gcc-arm: add re-staging of unwind.h from external-arm-toolchain Jon Mason

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.