summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-07-06 03:35:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 12:28:00 +0100
commite86dc1a18222142a20913ebe79feab58dc668aca (patch)
tree22445e60e34f1b1fa5b028085fc257529bb0c6d1 /meta/recipes-devtools/gcc
parentfd91e710774d91bc5ff2902b7d9ec665c532dab4 (diff)
downloadpoky-e86dc1a18222142a20913ebe79feab58dc668aca.tar.gz
gcc-target 5.1: fix for libcc1
Fixed: * gcc 5 introduces a plugin libcc1.so, which is used by gdb, the target gcc didn't build it in the past because gcc_cv_objdump is null, and the error was: gcc-5.2.0/libcc1/configure: line 14531: -T: command not found This only happens for tar gcc as the code shows: if test x$build = x$host; then export_sym_check="objdump${exeext} -T" elif test x$host = x$target; then export_sym_check="$gcc_cv_objdump -T" else export_sym_check= fi * Install libcc1.so and libcc1plugin.so to $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) as lto-plugin did. * Use sed command to fix bad RPATH iussue. [YOCTO #7956] (From OE-Core rev: f6e47aa9b12f9ab61530c40e0343f451699d9077) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.2.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch51
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc5
-rw-r--r--meta/recipes-devtools/gcc/gcc_5.2.bb6
4 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.2.inc b/meta/recipes-devtools/gcc/gcc-5.2.inc
index 34606b909c..dba8999017 100644
--- a/meta/recipes-devtools/gcc/gcc-5.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-5.2.inc
@@ -70,6 +70,7 @@ SRC_URI = "\
70 file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ 70 file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
71 file://0037-pr65779.patch \ 71 file://0037-pr65779.patch \
72 file://0038-fix-g++-sysroot.patch \ 72 file://0038-fix-g++-sysroot.patch \
73 file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
73 " 74 "
74 75
75BACKPORTS = "" 76BACKPORTS = ""
diff --git a/meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
new file mode 100644
index 0000000000..2f025c6d0c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -0,0 +1,51 @@
1From acea0df9997a47f8b8224b6ca1618c8c9dfbe6d5 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sun, 5 Jul 2015 20:25:18 -0700
4Subject: [PATCH] libcc1: fix libcc1's install path and rpath
5
6* Install libcc1.so and libcc1plugin.so into
7 $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
8 had done to lto-plugin.
9* Fix bad RPATH iussue:
10 gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
11 /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
12 [rpaths]
13
14Upstream-Status: Inappropriate [OE configuration]
15
16Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
17---
18 libcc1/Makefile.am | 4 ++--
19 libcc1/Makefile.in | 4 ++--
20 2 files changed, 4 insertions(+), 4 deletions(-)
21
22diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
23index 7a274b3..db69bea 100644
24--- a/libcc1/Makefile.am
25+++ b/libcc1/Makefile.am
26@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
27 $(Wc)$(libiberty_normal)))
28 libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
29
30-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
31-cc1libdir = $(libdir)/$(libsuffix)
32+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
33+plugindir = $(cc1libdir)
34
35 if ENABLE_PLUGIN
36 plugin_LTLIBRARIES = libcc1plugin.la
37diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
38index 1916134..c8995d2 100644
39--- a/libcc1/Makefile.in
40+++ b/libcc1/Makefile.in
41@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
42 $(Wc)$(libiberty_normal)))
43
44 libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
45-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
46-cc1libdir = $(libdir)/$(libsuffix)
47+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
48+plugindir = $(cc1libdir)
49 @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
50 @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
51 BUILT_SOURCES = compiler-name.h
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 5d314460c0..c362a0f6b9 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -10,6 +10,11 @@ EXTRA_OECONF_PATHS = "\
10 10
11EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" 11EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
12 12
13# libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
14# set in subdir gcc, so subdir libcc1 can't use it, export it here to
15# fix the problem.
16export gcc_cv_objdump = "${TARGET_PREFIX}objdump"
17
13EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}" 18EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
14 19
15PACKAGES = "\ 20PACKAGES = "\
diff --git a/meta/recipes-devtools/gcc/gcc_5.2.bb b/meta/recipes-devtools/gcc/gcc_5.2.bb
index c4827c6443..254cd7f80c 100644
--- a/meta/recipes-devtools/gcc/gcc_5.2.bb
+++ b/meta/recipes-devtools/gcc/gcc_5.2.bb
@@ -5,3 +5,9 @@ require gcc-target.inc
5# | 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 5# | 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
6# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output 6# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
7ARM_INSTRUCTION_SET_armv4 = "arm" 7ARM_INSTRUCTION_SET_armv4 = "arm"
8
9do_configure_prepend() {
10 # Easiest way to stop bad RPATHs getting into the library since we have a
11 # broken libtool here
12 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure
13}