From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 68FA4E00B2F; Tue, 20 Jun 2017 11:46:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.214.68 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (twoerner[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B8F91E00B01 for ; Tue, 20 Jun 2017 11:46:22 -0700 (PDT) Received: by mail-it0-f68.google.com with SMTP id g184so14069841ita.0 for ; Tue, 20 Jun 2017 11:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=MXxUt1b3qU1aWIO9rf18xb2fDtakwp2lZCS+R67a3SM=; b=JqrHRSN+0kQN9WcaD6KpLsWCx1b8WJfF0DRp3HG173Pj1MvpYazsnT/K5jL9B/IoZO JDLgXrdwsS3d/eKQqjcOROOVBiu19nXalK6DGVoWihJQkVU+sI9Vm6DEDPWglZl8eHPY EkUgUJzJ4iMgpEsVOsHrixL0U/SfCLjj1KY9YzI2CXcbCNu8U8IzUugbn1dhxRIYm/wV db/D47h3eOrpbsCJTcdHfWp0c7u4SfTx0AksJP1Hfzt1kCmg/h8CjQmKzHGtGLPzVtxg 3l5VOgSAgy0d4bhIP/RmOCTb26zde6OHS0+JT5Ckwu0T/sGNytgNqB06CL+QeFpK2fyH 2vtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=MXxUt1b3qU1aWIO9rf18xb2fDtakwp2lZCS+R67a3SM=; b=NShB8zZncmLtbEjM8s5jHGqnNijBqWke/LoH1ALZOfGQ+DhX6epQlvZsopxk80q/Zw /xmzd2u/0zQRQrL0YYQbj9JYyeFTw18oOjmIvvHyG4ZRefiTiBgEe54SIBzmxnGsF2q9 giRqPupyODGuHxeisbMgGP1MsDPe7TnG78HHyjBn5jemYeQVE5N+gy5SGI9nCQtbfksF vcE8+68cXksq7vgAni727lyNJKRo73hmQhz4ujzY2BegcDRLb/EWR3oAfsgrT5L23dWz SL73QOc9TYYIxfnhQAQU79dTbcd6dFErILTG85Ogf3m3qtM6qnpocA8m3HtkzcQQ1F4w YVrA== X-Gm-Message-State: AKS2vOz+071dJWy90XmlV9COUzpzKFG51fG3rL/vhyT+ystlJAoXJmWJ pgfP6K59xWhfcEoyFz0= X-Received: by 10.36.55.143 with SMTP id r137mr4873660itr.27.1497984382099; Tue, 20 Jun 2017 11:46:22 -0700 (PDT) Received: from linux-uys3.suse ([206.248.190.95]) by smtp.gmail.com with ESMTPSA id j17sm4441664ioe.28.2017.06.20.11.46.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 11:46:21 -0700 (PDT) From: Trevor Woerner To: meta-freescale@yoctoproject.org Date: Tue, 20 Jun 2017 14:46:19 -0400 Message-Id: <20170620184619.25238-1-twoerner@gmail.com> X-Mailer: git-send-email 2.13.0 Subject: [3rdparty][PATCH] linux-wandboard: fix for gcc7 X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:46:24 -0000 Allow the linux-wandboard kernel to build successfully with gcc7. Signed-off-by: Trevor Woerner --- .../0001-fix-build-for-gcc7.patch | 99 ++++++++++++++++++++++ recipes-kernel/linux/linux-wandboard_4.1.15.bb | 1 + 2 files changed, 100 insertions(+) create mode 100644 recipes-kernel/linux/linux-wandboard-4.1.15/0001-fix-build-for-gcc7.patch diff --git a/recipes-kernel/linux/linux-wandboard-4.1.15/0001-fix-build-for-gcc7.patch b/recipes-kernel/linux/linux-wandboard-4.1.15/0001-fix-build-for-gcc7.patch new file mode 100644 index 0000000..03b09f3 --- /dev/null +++ b/recipes-kernel/linux/linux-wandboard-4.1.15/0001-fix-build-for-gcc7.patch @@ -0,0 +1,99 @@ +From 81ae0fca9b92cb9e02568a5777f83d8b8eb69104 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Tue, 20 Jun 2017 13:25:20 -0400 +Subject: [PATCH] fix build for gcc7 + +| In file included from .../include/linux/compiler.h:54:0, +| from .../include/uapi/linux/stddef.h:1, +| from .../include/linux/stddef.h:4, +| from .../include/uapi/linux/posix_types.h:4, +| from .../include/uapi/linux/types.h:13, +| from .../include/linux/types.h:5, +| from .../include/linux/mod_devicetable.h:11, +| from .../scripts/mod/devicetable-offsets.c:2: +| .../include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory +| #include gcc_header(__GNUC__) + +Upstream-Status: Submitted [https://github.com/wandboard-org/linux/pull/7] + +Signed-off-by: Trevor Woerner +--- + include/linux/compiler-gcc7.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 include/linux/compiler-gcc7.h + +diff --git a/include/linux/compiler-gcc7.h b/include/linux/compiler-gcc7.h +new file mode 100644 +index 000000000000..cdd1cc202d51 +--- /dev/null ++++ b/include/linux/compiler-gcc7.h +@@ -0,0 +1,66 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * Fixed in GCC 4.8.2 and later versions. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.12.3 + diff --git a/recipes-kernel/linux/linux-wandboard_4.1.15.bb b/recipes-kernel/linux/linux-wandboard_4.1.15.bb index 3371322..e0cb71a 100644 --- a/recipes-kernel/linux/linux-wandboard_4.1.15.bb +++ b/recipes-kernel/linux/linux-wandboard_4.1.15.bb @@ -15,6 +15,7 @@ LOCALVERSION = "-1.1.0-ga-wandboard" SRC_URI += "\ file://Fix-the-compile-issue-under-gcc6.patch \ file://Fix-gcc6-build-error-in-Vivante-driver.patch \ + file://0001-fix-build-for-gcc7.patch \ " COMPATIBLE_MACHINE = "(wandboard)" -- 2.13.0