From patchwork Mon Jul 30 10:36:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 950807 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IcR3bF+m"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41fGGG0dStz9ryt for ; Mon, 30 Jul 2018 20:36:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6B5BF882C1; Mon, 30 Jul 2018 10:36:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ed5eUixehZL9; Mon, 30 Jul 2018 10:36:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4AB3687CF4; Mon, 30 Jul 2018 10:36:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 428421C0816 for ; Mon, 30 Jul 2018 10:36:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 400E08916A for ; Mon, 30 Jul 2018 10:36:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R0L7MdTlNaXR for ; Mon, 30 Jul 2018 10:36:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5CA0188D8D for ; Mon, 30 Jul 2018 10:36:46 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id x6-v6so5346589plv.10 for ; Mon, 30 Jul 2018 03:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=er4DOPBl4Nv7ziI8fvtxFB0VAU0QEU/9HBqpp2Db4qk=; b=IcR3bF+mk8C8wGm3knrDdhr8TEc1zRHgfJYmLSsLcsHm/3WrpT3Fr0XaHdmBqglswF 9n7yO7Akhl6l1N/gVPMqnWKhQtPgbOcCnD1RW+JEYVx9Xj1bPzE+PeE6IljunZjIdE8h By21HA3E5VJiM7YDZNwr9KkYJ0TgJvHwuLP6gwxDw0/oFVDEH2hR1qT3RK+A4VfnLSZ4 +lfoH/pP4Qhxyc5g5oAjLexdSWmUI4Mkg7KZjbta8qSNmRWTuTzdojS3snXQw3BjU9zs v0WyjU0Qa26/FeN7wTIvPrq9nm792kytnBm4tpxDVWMjQSUszlbmJ8Nr5jMfrX0QCsM7 WJwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=er4DOPBl4Nv7ziI8fvtxFB0VAU0QEU/9HBqpp2Db4qk=; b=fQ0VxlDNOW2LcOYIZBu2csXc/SFrZpTVrlsbH6QgSrZ/xtcujqxwyu9K9w9wWFaTV/ ryRvMDSV8zUxmBAnvcWaRfYBBOGHYM1k/+6ODOsKFY+tjYTju9WBomBBSTc5irDFrk8Q 5S6FpwfVZI88PLZYUPlqmhbxIZR+HSdZm2QSJZ3S39/2eVwSOJ/JqwkAewFLz0ATP3jU 2z7n7q9u1YDAR7rj2DhFAF2AgHxYiSKhOytgYrxhzKa/hix7UlYXx/+IZBvbCbj+Wff9 FAf1uhrEEVxX98VZ+FyS9HQPkOGZUZHGL1cpXwsCUhBLHHUEA1trNIIkdK5oPrm8KN0/ Sm+Q== X-Gm-Message-State: AOUpUlF5mn2KNJ6fazO2S16nyTTNWCn154AXbMbyGMwu6/FJfIVHzFdO IeLntMJ7ASwi2bXBjehxtM/rUXQ7 X-Google-Smtp-Source: AAOMgpcj+SxIGJUT34txGAJ0O0uGMtSkvhcEbgba9SNnwiylBG4fabls6wJQbH3FcBa87SCA+FuzTA== X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr15856967pld.43.1532947005589; Mon, 30 Jul 2018 03:36:45 -0700 (PDT) Received: from aurora.jms.id.au ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id u13-v6sm19119167pfg.79.2018.07.30.03.36.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 03:36:45 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 30 Jul 2018 20:06:34 +0930 From: Joel Stanley To: buildroot@buildroot.org Date: Mon, 30 Jul 2018 20:06:30 +0930 Message-Id: <20180730103630.21804-1-joel@jms.id.au> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When building on a ppc64le host we see this error: build/genmatch --gimple ../../gcc/match.pd \ > tmp-gimple-match.c ../../gcc/match.pd:120:1 error: expected (, got NAME negative value by 0 gives -0, not +0. */ This was reported upstream[1] and fixed on the GCC 6 [2] and GCC 7 [3] branches: Backport from mainline 2018-01-10 Kelvin Nilsen * lex.c (search_line_fast): Remove illegal coercion of an unaligned pointer value to vector pointer type and replace with use of __builtin_vec_vsx_ld () built-in function, which operates on unaligned pointer values. The patches included in Buildroot contain just the code changes, and not the changelog, to make it easer to manage backporting. Tested on Ubuntu Cosmic ppc64le. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162 [2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=261621 [3] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262243 Signed-off-by: Joel Stanley --- .../6.4.0/0002-fix-building-on-ppc64.patch | 38 ++++++++++++++++++ .../7.3.0/0002-fix-building-on-ppc64.patch | 40 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 package/gcc/6.4.0/0002-fix-building-on-ppc64.patch create mode 100644 package/gcc/7.3.0/0002-fix-building-on-ppc64.patch diff --git a/package/gcc/6.4.0/0002-fix-building-on-ppc64.patch b/package/gcc/6.4.0/0002-fix-building-on-ppc64.patch new file mode 100644 index 000000000000..ee096cfcf1e2 --- /dev/null +++ b/package/gcc/6.4.0/0002-fix-building-on-ppc64.patch @@ -0,0 +1,38 @@ +From 765527ad3725c5f3e82ab2b8e5031120b409983d Mon Sep 17 00:00:00 2001 +From: marxin +Date: Fri, 15 Jun 2018 08:51:28 +0000 +Subject: [PATCH] Partial backport r256656 + +2018-06-15 Martin Liska + + Backport from mainline + 2018-01-10 Kelvin Nilsen + + * lex.c (search_line_fast): Remove illegal coercion of an + unaligned pointer value to vector pointer type and replace with + use of __builtin_vec_vsx_ld () built-in function, which operates + on unaligned pointer values. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Joel Stanley +--- + libcpp/lex.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index e5a0397f3099..b789686f1c49 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) + { + vc m_nl, m_cr, m_bs, m_qm; + +- data = *((const vc *)s); ++ data = __builtin_vec_vsx_ld (0, s); + s += 16; + + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); +-- +2.17.1 + diff --git a/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch b/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch new file mode 100644 index 000000000000..78a028c29a98 --- /dev/null +++ b/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch @@ -0,0 +1,40 @@ +From aa65a43516da1d48011ef621ed5988289711d99b Mon Sep 17 00:00:00 2001 +From: marxin +Date: Fri, 29 Jun 2018 09:31:30 +0000 +Subject: [PATCH] Partial backport r256656 + +2018-06-29 Martin Liska + + Backport from mainline + 2018-01-10 Kelvin Nilsen + + * lex.c (search_line_fast): Remove illegal coercion of an + unaligned pointer value to vector pointer type and replace with + use of __builtin_vec_vsx_ld () built-in function, which operates + on unaligned pointer values. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4 + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@262243 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Joel Stanley +--- + libcpp/lex.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index 097c78002cbb..e0fb9e822c44 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) + { + vc m_nl, m_cr, m_bs, m_qm; + +- data = *((const vc *)s); ++ data = __builtin_vec_vsx_ld (0, s); + s += 16; + + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); +-- +2.17.1 +