Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 73A01E00C81; Thu, 2 Jun 2016 02:18:26 -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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS 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 * [157.56.111.86 listed in list.dnswl.org] * -0.0 SPF_HELO_PASS SPF: HELO matches SPF record * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0086.outbound.protection.outlook.com [157.56.111.86]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D208AE00C55 for ; Thu, 2 Jun 2016 02:18:20 -0700 (PDT) Received: from BN3PR0301CA0081.namprd03.prod.outlook.com (10.160.152.177) by BL2PR03MB193.namprd03.prod.outlook.com (10.255.230.141) with Microsoft SMTP Server (TLS) id 15.1.501.7; Thu, 2 Jun 2016 09:18:19 +0000 Received: from BL2FFO11FD026.protection.gbl (2a01:111:f400:7c09::196) by BN3PR0301CA0081.outlook.office365.com (2a01:111:e400:401e::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.506.9 via Frontend Transport; Thu, 2 Jun 2016 09:18:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD026.mail.protection.outlook.com (10.173.161.105) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Thu, 2 Jun 2016 09:18:17 +0000 Received: from sweet.ap.freescale.net (sweet.ap.freescale.net [10.193.20.55]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u529IFOK021349; Thu, 2 Jun 2016 02:18:16 -0700 From: Zhenhua Luo To: Date: Thu, 2 Jun 2016 17:18:12 +0800 Message-ID: <1464859094-10939-1-git-send-email-zhenhua.luo@nxp.com> X-Mailer: git-send-email 2.4.11 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131093326982421000; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(230783001)(189998001)(15975445007)(6806005)(47776003)(5008740100001)(50986999)(87936001)(104016004)(50226002)(86362001)(77096005)(36756003)(586003)(4326007)(8676002)(110136002)(2351001)(229853001)(5003940100001)(19580395003)(19580405001)(33646002)(105606002)(11100500001)(50466002)(85426001)(106466001)(92566002)(2906002)(81166006)(8936002)(8666004)(48376002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB193; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD026; 1:irq47jjbiAS4Lt0VQCYRv2rRSMaJDvjRwZBmYmW+vTgwV+Oe9Zm4sEn0wFI46Nb98DifZ1UJid/3UJCtJRTt0uqHXioszwpNbDt6W85B7HZJqDaxG5TGlA2krezvXcd6gVfcHRZr7aflXW9XtAXiLLcagc8qY1/6tWPADDdeCMHpkNiFH8H3vTaqb63RmjWxgaQudK3fkIUeN/8BmEJtz3lC1GLBeMlm+41+Qzpe4jw+T0TlqLQxB0gCP4atWE+PYQj7aOgQuAm4VJ3uCVxIJD4ZiNjiObVPkQ3BYvlKM+v0q5ShmRYS/fP0qD00HABQO5svRoLDSIXPXI7V8vKLZ16fo/VFCUtiZUG/jrIws1a0mAgzt5IJ1k5ReZGc1BOqFGd1cjjB9aNEvA4hTjjTmreY+yQfqT8wrrV/nQ9fPuXlKQa0oK3GsJnn+e6k6SZ3/w73gGqaZj2LUhKTnEETiOMg888+h7QrHyUhG7NQQGNz4mRVVzixjEQJszWJdmSziCG4mB3bN4sIwqR5211/0mMFRxw2JHTM1gb3LGRHDPKUKAfDTgsDIzPt//3s0EbzBapatvCKTRtLhpWt27hr6wkVLj3az8n25J6dnM0o0ZwGybyzbjuip1gHhmHLOmt/H5pNRrfiKpVGehnHiivht+h86776T4trF4RpTn+mB7NBlyjNe8U0SI5/elQLCc2j MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: eda5feab-b1c1-472c-b8a7-08d38ac6d5aa X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB193; 2:gL/z107CFLBcMsy4khDwOpgkuHzEKm93xp7Po0sgpV6Nb4oEA7MTIa1MRo6h2M40WA9zuVZbXxmXZsTsf28u3cT9kGw+JAUrRjXWBzlDSY1U5L61pf6kXUjyZ7mX5OA2CDVsMR7aQnXqHPIGrXAz5LLHqSE9c38KTm1KEkV0FmlmCct1ZNDwkwJI+OamK0es; 3:PJfR3UKaSnnvlweRZpanR7wGde5Pq89HL4V2K6cEwABPo11sF7B8RBRW3dwOcfPTK4JMvQOoV+difJwX4lINHmojllXrsR0odKo7HGRYuPvCq+wAiE/fvYRh3HHC8iJ45bD9fsSgvGbEuZnayF0ECpRmNLtD0YOa8byR+2ttRBSD29cUO5+zn24Fmplmp1NlMlEKju8WeE7/sML+J5Dr+a18yOu66ovSB5N0GRAamjw= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB193; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB193; 25:VPo5bQtNfOv8aUVYhT1Ya6mxMERd5Jooh7s6lE7y8aW5hkKuc3Jy8UNYUBm/yEjI6+MWi60N+cY6u9lmcsIM1lmrm3MyS+HmhMQq2u1f3kl85rN67nEwznqOeKorUxRehX8FUQfsM3WQrkipPbdIHDZ+DT6EoLPRzGsQN2VxFXZJlMX43zGAsJVKgNNpUjFL4A4CSttI7rJUd0Xza7sbkry/gMHw+/SGhaLwm8jpPXQWR2+zG6z9lLr3zhvAIDmTgi3K8P2WmO0Ub90fE9cSHLkD1MIzEFWGLE2regtZV+RTGqfKjlZDfCa49c6ZlEfWmjXT/3oTivFy6lyqPRctLi/amQix8RkLfnAlTaaMLZRNc7FRVrjtAXiVRWujpGnhk/I/+Rlu5omrjKzkvEScRS4akJoLhxKUy/po/iBJQTOXpCAVbzRMGU4MfJ07+GoPhzgjtKY3HY4iyh465/QJfM1rUmV9oZQ7AZcdTCVNgTKvao09LjEt9Vymu1vlcxTuvvOq9KXNrqj2OxKs2ZxFa4s4USl9YTaBlfhAJZKgbicZFShNFOKQMbqN3gVaW3KJ/gW0JeiYBjbcDx5UrWNeD8rqdqm/sNwR6oWq4yJyQ6PZnCaiwaft51iJHa5opuMqkMOQGRTQpGnMIpUEi8XfonOzOZyo3mCqFQiA+RPmyC+TunEMej6Q/J4RJ1lkMsl1rYmzsJAk8vuxQpzJRfjS3bs+i+Awx47Qk8vr32u3wATl7HgQeHNFhI3VU2jMiwFVTmCErvZ5NQFJ9XdpND83OFOh/O1t2lUwzToM4rD6mv5AFdbWSIeGhlLX4qRcS1KsCQ3oGn3T4RwRR5e/ZIyuHg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(22074186197030)(185117386973197)(101931422205132)(183786458502308)(46150409022019); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(13023025)(13024025)(8121501046)(13015025)(13017025)(13018025)(3002001)(10201501046)(6055026); SRVR:BL2PR03MB193; BCL:0; PCL:0; RULEID:(400006); SRVR:BL2PR03MB193; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB193; 4:4iXA7HQM3GhRIyzOptuNDFNqsp1zWmZxjc83JUR+TQ8556uiSU8BE85V8nE469C/4NDjaqshQBLbaYxJ7jLM8QrhM43TasExWu7uSmddxAayNwNjetONkgg67cMZlIWtLnb5qTo3qLYdUDWPSRPrsMBpUdnrVaAw3lG/9vy5gTmBG8Bz+kDJdORKSBRzeuR0heJbofktAc+JuFvlt8SmGb+CzOElFZznAwgfG0Jak0FQscqts4mKIZ20LiPRvxxk33rVEbG+WeX3fQN+hoNaKcBHKF1XsaA6rnGqizYIG4vCoaSB0+qNJzr9HYra9Kw5YDw3gOUkGBSOy1SKHvu8oqgSg/IbHbu1A4ltL9F4Ku+fNcmT5Eh+fx4lZe2zFY74/4xqD6TX+rjqOA1+OhN+JC1hdvOVaBoiPbmv8AVZdM4RxmtEFFcqGpqltWZrF7smjy/flybYrFWmZbvBTycFHx19uebvTUx6ismKR0QKoO1XR2BFZxS4VtTV28ldPmd0PYipeP5/atW1dhCiKYkR8ypYQpiV/y7w4rbImmJuCajdXjW2RTEUfXyLtCQRPunuNpXpXH8tojJktG2t0Z3furIudD1ntVxlXaffQWEhVTfSbmKZy07SdjFrQluZIYb28zP/Egp+Xcgepyi1awAORJwYRwqvnCE7RbY+xg2ZDEo= X-Forefront-PRVS: 0961DF5286 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB193; 23:Yqb6erpYC9fktBdEPIslEYmjHqpYKmFLOaAg7s0WN+?= =?us-ascii?Q?IrTCOJeSBWdiwseySaeVp4myR2ClAj4UBSDOQc08vXs1+GW5YycL5zcDb13K?= =?us-ascii?Q?VLGbSOj4dEjbh1wXIJ3V2cPq7rPmEs2aQznKiiWzT47GFRzGegVRrlFlDXdP?= =?us-ascii?Q?73HJgzHZvIpf6lkRGxn0EiDV9CeGXRlb8oeRaXkL9eTYYbwbpbpbCUAwR/pS?= =?us-ascii?Q?2geTR5yDtIZAo26y5hdE3Nm1VnSz8MhMaeLCFKykGtTkhIZcbKMVxG0xNeLC?= =?us-ascii?Q?hwyucy22sfHsjL4C8kAZiZwjCz/rg2ZxIniGzNZl7KxI72mnS8dI66WlwENt?= =?us-ascii?Q?e8VqzP0+tAvyQ+mtTPCQwo6htKcc31paVTqW1aisAb2k8EIOqKiCFy+MNb4j?= =?us-ascii?Q?cYkj+JdpPzycbal5/qOnnGxSUwyLN2+PGI8DTl4U2IK37vpfrYW537gTjVNu?= =?us-ascii?Q?zh/t/x1oY/ZgQ5YOsNXz9LdY/ZNoAbQjQBOZpRu1SvpC5jL1Hosx7IogtIJB?= =?us-ascii?Q?cqHAm27mE/gE8vtAAaCKLdo9q+3mue9Tg6ayGTDhTN1lJfhDMY5HTCzeU/dW?= =?us-ascii?Q?vFP8fuJekwzvy5EFYmJ5nuCCsbhXmLn3nsKYtu45jpTXYUnhcfcRBoAl+vPE?= =?us-ascii?Q?1nDOTxcEDIE1tarP120nTGM9jU5f87/iCAFEsr752PNZFA3bbn0DYwOefJOb?= =?us-ascii?Q?1FnKLsHXvHXmT0rTB9F0x3vuXzh1JulM83h9y0hgrCel0HVMGKIYTE+8/65v?= =?us-ascii?Q?WIozPwqMBPGzOSDnqQaQnj/zzCDPuyXfWEKMOVpFxUZYT1fRQpm0zxs7jYnu?= =?us-ascii?Q?ma74DHli3n9feLJUl9SyfPryH2n5XRf2zqakGt00co9ajVNMkjHXDe840LsS?= =?us-ascii?Q?QnYZieEDhQ5Y5K12gqgrTDJJJVHrmvnE376tA2Ocy8v0n4Pvkkyl2C2HjYyU?= =?us-ascii?Q?yoBbZZuucXi/xuFzj9kHyMxtEuR2is9EPYsvHksUuQ5O+PfL6PwSlTcSL155?= =?us-ascii?Q?D00kuOPkdTxQSVucZ7SHC9rDedboKjtUsyvH0k8MKkW/nbhwqHhRUWuIKjgL?= =?us-ascii?Q?uNdOvN8blcqpQnrA2E5r9YuqBeqHJpN7ab4dxC9/PaoQu0ww=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB193; 5:uPjOJmuDYLFPbH1Q4NiGTcQazKbnYjw06hf3meIgM8xZTTTyxrTbW7clPnj31TSqgFlbX8dhSDv7mn3MlygaMNLrTWllOZPLdGhW1HEyldyAVrQZ6qLHjMZpg8xOylJp/oFEMdkas1jC2Lm3S7yUJ76FJg6tkU/3hlULNalE8ms=; 24:I6ZT8Nrp36Mrv+LxLjjf0TphrefZbr+xB8dxljHJWUGoRjmG6gZ1SpQ+iFxnDdgDSK1MLOI+kHXUl5vXVrX2czendV2Ncn5IVk6ZzePk07w=; 7:w+vXpOK+8ULvksJ5uEHBM8/sUfKZoDaU+rytcVbmZlk70kL1HGTQ+catgYb5tLv5tU4UfABS8RIfW/DT/7Bj42Fv3EyvsAjv+QXpLqHR3dwKAgwT5mxgEpcaEDP7LmzgdQ8QJ8Ne/d8m9R++YLOXV1fYnmesmyeybgtdlZwZCHTqDKIt/3pFaXIeQvHHJjpa SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2016 09:18:17.9768 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB193 Subject: [meta-fsl-ppc][PATCH 1/2] linux-qoriq: fix build issue under gcc6 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: Thu, 02 Jun 2016 09:18:26 -0000 Content-Type: text/plain Signed-off-by: Zhenhua Luo --- .../files/fix-the-compile-issue-under-gcc6.patch | 103 +++++++++++++++++++++ .../files/module-remove-MODULE_GENERIC_TABLE.patch | 77 +++++++++++++++ recipes-kernel/linux/linux-qoriq_3.12.bb | 2 + 3 files changed, 182 insertions(+) create mode 100644 recipes-kernel/linux/files/fix-the-compile-issue-under-gcc6.patch create mode 100644 recipes-kernel/linux/files/module-remove-MODULE_GENERIC_TABLE.patch diff --git a/recipes-kernel/linux/files/fix-the-compile-issue-under-gcc6.patch b/recipes-kernel/linux/files/fix-the-compile-issue-under-gcc6.patch new file mode 100644 index 0000000..910ef18 --- /dev/null +++ b/recipes-kernel/linux/files/fix-the-compile-issue-under-gcc6.patch @@ -0,0 +1,103 @@ +Fix the compile issue under gcc6 + +Fix the following build error: +| .../include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc6.h: No such file or directory +| #include gcc_header(__GNUC__) + +Signed-off-by: Zhenhua Luo + +Upstream-Status: Pending +--- + arch/powerpc/kernel/Makefile | 2 -- + include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 66 insertions(+), 2 deletions(-) + create mode 100644 include/linux/compiler-gcc6.h + +diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile +index c326675..45f0494 100644 +--- a/arch/powerpc/kernel/Makefile ++++ b/arch/powerpc/kernel/Makefile +@@ -4,8 +4,6 @@ + + CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' + +-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror +- + ifeq ($(CONFIG_PPC64),y) + CFLAGS_prom_init.o += $(NO_MINIMAL_TOC) + endif +diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h +new file mode 100644 +index 0000000..cdd1cc2 +--- /dev/null ++++ b/include/linux/compiler-gcc6.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.5.0 + diff --git a/recipes-kernel/linux/files/module-remove-MODULE_GENERIC_TABLE.patch b/recipes-kernel/linux/files/module-remove-MODULE_GENERIC_TABLE.patch new file mode 100644 index 0000000..5a67155 --- /dev/null +++ b/recipes-kernel/linux/files/module-remove-MODULE_GENERIC_TABLE.patch @@ -0,0 +1,77 @@ +module: remove MODULE_GENERIC_TABLE + +MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the +work directly. This also removes a wart introduced in the last patch, +where the alias is defined to be an unknown struct type "struct +type##__##name##_device_id" instead of "struct type##_device_id" (it's +an extern so GCC doesn't care, but it's wrong). + +The other user of MODULE_GENERIC_TABLE (ISAPNP_CARD_TABLE) is unused, +so delete it. + + + +Signed-off-by: Rusty Russell +Signed-off-by: Zhenhua Luo + +Upstream-Status: Backport +--- + include/linux/isapnp.h | 4 ---- + include/linux/module.h | 19 ++++++++----------- + 2 files changed, 8 insertions(+), 15 deletions(-) + +diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h +index e2d28b0..3c77bf9 100644 +--- a/include/linux/isapnp.h ++++ b/include/linux/isapnp.h +@@ -56,10 +56,6 @@ + #define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \ + { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) } + +-/* export used IDs outside module */ +-#define ISAPNP_CARD_TABLE(name) \ +- MODULE_GENERIC_TABLE(isapnp_card, name) +- + struct isapnp_card_id { + unsigned long driver_data; /* data private to the driver */ + unsigned short card_vendor, card_device; +diff --git a/include/linux/module.h b/include/linux/module.h +index 54aef1b..a9f6812 100644 +--- a/include/linux/module.h ++++ b/include/linux/module.h +@@ -83,15 +83,6 @@ void sort_extable(struct exception_table_entry *start, + void sort_main_extable(void); + void trim_init_extable(struct module *m); + +-#ifdef MODULE +-#define MODULE_GENERIC_TABLE(gtype,name) \ +-extern const struct gtype##_id __mod_##gtype##_table \ +- __attribute__ ((unused, alias(__stringify(name)))) +- +-#else /* !MODULE */ +-#define MODULE_GENERIC_TABLE(gtype,name) +-#endif +- + /* Generic info of form tag = "info" */ + #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) + +@@ -142,8 +133,14 @@ extern const struct gtype##_id __mod_##gtype##_table \ + /* What your module does. */ + #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) + +-#define MODULE_DEVICE_TABLE(type,name) \ +- MODULE_GENERIC_TABLE(type##__##name##_device, name) ++#ifdef MODULE ++/* Creates an alias so file2alias.c can find device table. */ ++#define MODULE_DEVICE_TABLE(type, name) \ ++ extern const struct type##_device_id __mod_##type##__##name##_device_table \ ++ __attribute__ ((unused, alias(__stringify(name)))) ++#else /* !MODULE */ ++#define MODULE_DEVICE_TABLE(type, name) ++#endif + + /* Version of form [:][-]. + Or for CVS/RCS ID version, everything but the number is stripped. +-- +2.5.0 + diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bb b/recipes-kernel/linux/linux-qoriq_3.12.bb index 110d7ce..744aa4e 100644 --- a/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/recipes-kernel/linux/linux-qoriq_3.12.bb @@ -4,5 +4,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=sdk-v1.9.x \ file://modify-defconfig-t1040-nr-cpus.patch \ file://net-sctp-CVE-2014-0101.patch \ file://0001-powerpc-Align-TOC-to-256-bytes.patch \ + file://fix-the-compile-issue-under-gcc6.patch \ + file://module-remove-MODULE_GENERIC_TABLE.patch \ " SRCREV = "43cecda943a6c40a833b588801b0929e8bd48813" -- 2.4.11