* [PATCH 0/2] gcc: backport patch to fix miscompilation problem on mips64
@ 2017-11-08 2:33 Chen Qi
2017-11-08 2:33 ` [PATCH 1/2] systemd: remove useless options for mips64 Chen Qi
2017-11-08 2:33 ` [PATCH 2/2] gcc: backport patch to fix miscompilation on mips64 Chen Qi
0 siblings, 2 replies; 3+ messages in thread
From: Chen Qi @ 2017-11-08 2:33 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 2e1eb9ab12802d52465e6ae636c3f6a40ffb098c:
bitbake: tests/fetch: Add ftp test url (2017-11-07 15:02:19 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/bug12266
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/bug12266
Chen Qi (2):
systemd: remove useless options for mips64
gcc: backport patch to fix miscompilation on mips64
meta/recipes-core/systemd/systemd_234.bb | 3 --
meta/recipes-devtools/gcc/gcc-7.2.inc | 1 +
.../gcc-7.2/0001-PR-rtl-optimization-81803.patch | 52 ++++++++++++++++++++++
3 files changed, 53 insertions(+), 3 deletions(-)
create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] systemd: remove useless options for mips64
2017-11-08 2:33 [PATCH 0/2] gcc: backport patch to fix miscompilation problem on mips64 Chen Qi
@ 2017-11-08 2:33 ` Chen Qi
2017-11-08 2:33 ` [PATCH 2/2] gcc: backport patch to fix miscompilation on mips64 Chen Qi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Qi @ 2017-11-08 2:33 UTC (permalink / raw)
To: openembedded-core
Looking back the history, we had problem with systemd on qemumips64
which is also related to compilation flags. We solved that by using
tweaking FULL_OPTIMIZATION for mips64 to have "-fno-tree-switch-conversion
-fno-tree-tail-merge".
Now systemd has been upgraded to 234, and we don't have the above problem
any more, thus removing these flags.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/systemd/systemd_234.bb | 3 ---
1 file changed, 3 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 36fd3f8..971226f 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -158,9 +158,6 @@ CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', ''
# disable problematic GCC 5.2 optimizations [YOCTO #8291]
FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-# Avoid login failure on qemumips64 when pam is enabled
-FULL_OPTIMIZATION_append_mips64 = " -fno-tree-switch-conversion -fno-tree-tail-merge"
-
COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] gcc: backport patch to fix miscompilation on mips64
2017-11-08 2:33 [PATCH 0/2] gcc: backport patch to fix miscompilation problem on mips64 Chen Qi
2017-11-08 2:33 ` [PATCH 1/2] systemd: remove useless options for mips64 Chen Qi
@ 2017-11-08 2:33 ` Chen Qi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Qi @ 2017-11-08 2:33 UTC (permalink / raw)
To: openembedded-core
Backport a patch to fix miscompilation on mips64.
We've observed strange behaviour of `systemctl status <xxx> on qemumips64.
The output of the command is like `systemctl show <xxx>', which is incorrect.
The problem is due to the miscompilation of gcc for mips64 platform, thus
backporting patch from upstream to fix this problem.
[YOCTO #12266]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-devtools/gcc/gcc-7.2.inc | 1 +
.../gcc-7.2/0001-PR-rtl-optimization-81803.patch | 52 ++++++++++++++++++++++
2 files changed, 53 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-devtools/gcc/gcc-7.2.inc
index 5883bc6..ebed5b9 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
@@ -78,6 +78,7 @@ SRC_URI = "\
${BACKPORTS} \
"
BACKPORTS = "\
+ file://0001-PR-rtl-optimization-81803.patch \
"
SRC_URI[md5sum] = "ff370482573133a7fcdd96cd2f552292"
SRC_URI[sha256sum] = "1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a"
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch b/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
new file mode 100644
index 0000000..292e734
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
@@ -0,0 +1,52 @@
+From 5cbb8e6b1122092b3eaabd4270b2f316aa40407c Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 31 Oct 2017 18:27:52 +0000
+Subject: [PATCH] PR rtl-optimization/81803 * lra-constraints.c
+ (curr_insn_transform): Also reload the whole register for a strict subreg
+ no wider than a word if this is for a WORD_REGISTER_OPERATIONS target.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254275 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+
+This patch removes changes to Changelog from the original patch upstream. This is
+because we are backporting a patch to a stable version, making changes to Changelog,
+especially up '* GCC 7.2.0 released.', feels a little weird.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ gcc/lra-constraints.c | 11 ++++++++---
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
+index a423f069836..3758409bb9c 100644
+--- a/gcc/lra-constraints.c
++++ b/gcc/lra-constraints.c
+@@ -4207,8 +4207,9 @@ curr_insn_transform (bool check_only_p)
+ reg = SUBREG_REG (*loc);
+ byte = SUBREG_BYTE (*loc);
+ if (REG_P (reg)
+- /* Strict_low_part requires reload the register not
+- the sub-register. */
++ /* Strict_low_part requires reloading the register and not
++ just the subreg. Likewise for a strict subreg no wider
++ than a word for WORD_REGISTER_OPERATIONS targets. */
+ && (curr_static_id->operand[i].strict_low
+ || (!paradoxical_subreg_p (mode, GET_MODE (reg))
+ && (hard_regno
+@@ -4219,7 +4220,11 @@ curr_insn_transform (bool check_only_p)
+ && (goal_alt[i] == NO_REGS
+ || (simplify_subreg_regno
+ (ira_class_hard_regs[goal_alt[i]][0],
+- GET_MODE (reg), byte, mode) >= 0)))))
++ GET_MODE (reg), byte, mode) >= 0)))
++ || (GET_MODE_PRECISION (mode)
++ < GET_MODE_PRECISION (GET_MODE (reg))
++ && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
++ && WORD_REGISTER_OPERATIONS)))
+ {
+ /* An OP_INOUT is required when reloading a subreg of a
+ mode wider than a word to ensure that data beyond the
+--
+2.13.0
+
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-08 2:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 2:33 [PATCH 0/2] gcc: backport patch to fix miscompilation problem on mips64 Chen Qi
2017-11-08 2:33 ` [PATCH 1/2] systemd: remove useless options for mips64 Chen Qi
2017-11-08 2:33 ` [PATCH 2/2] gcc: backport patch to fix miscompilation on mips64 Chen Qi
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.