From patchwork Mon Dec 19 06:39:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 88417 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1012635qgi; Sun, 18 Dec 2016 22:40:33 -0800 (PST) X-Received: by 10.99.154.9 with SMTP id o9mr26288867pge.123.1482129633636; Sun, 18 Dec 2016 22:40:33 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o5si17291595pgg.216.2016.12.18.22.40.33; Sun, 18 Dec 2016 22:40:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3E899771E8; Mon, 19 Dec 2016 06:40:26 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by mail.openembedded.org (Postfix) with ESMTP id A637477177 for ; Mon, 19 Dec 2016 06:40:06 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id c4so7057568pfb.3 for ; Sun, 18 Dec 2016 22:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4h1I1jNqmU0RaaKYYJqH8dhXzS4N/CxpWp+h7nDDi2k=; b=GC1O+OmuBlWkyitDv7OQFGMPnVbPoHlMeNBj3nf59zSzuio7G8KE72DiLcL8+KmPkU Y9d5ZlMWlixWu7KRBbUDbVJTWlXuhlW1MC/NsUo6if3pSNlnvLaRSNqnqtmTpejFzC6v xPXSIX0aQg4szmIDLGNavmUflx9qHYXx1ul8plJn59rTcm/blA69f0XhRW9Tly7ygby2 JI9+q8KoqoFHo3OKP5IRW7DpAR4Hx2sFK6YxNIlfD+wSKUozkuZLKfq0RevPBnvwFd28 GceXWK5Ly8tldLXlh38KB+MSgZQoka13HgL8EWv9uZJVN9efIL9ZgKyxg2m9GT/dfvG/ +eDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4h1I1jNqmU0RaaKYYJqH8dhXzS4N/CxpWp+h7nDDi2k=; b=hk7qS/4YPVyBO7kXHh9zzs2zHDF5cuOscLQ+jbz5MgvGt98tMG4gNTHS6ef6zwlwFo mowrxZ36DkHjISDhAfYzkl+inYctZG8Vpfhwt0oETJ6vJcnlOVyxh/2QK90pPunyH8If oGqVwAheCskm2GlafaqjwtceoRCzpAKXGNvLRDtvi4FdhCvpbO1fIrcpGuWlbT/cK8rS Zqa0HK2Ld+f1Imi7OGxv9oTz0MQ0GEREOlRUitajVMz3CJIBqMRvJiqLwlVqbSdORWDH 6SNeU+FGjRlAr5i03uh7RPBkZnqHnEd9pbfqwB6q8OegxRBh4WEKM+RMGMVeTu0XINwp RG1Q== X-Gm-Message-State: AKaTC002gdUD24h8Wc/WpyJF06vZszE6wk3HAKzA+Xd2rfgsIc8xsmDDfXPMN7zQEewYOQ== X-Received: by 10.84.170.195 with SMTP id j61mr32257845plb.13.1482129607896; Sun, 18 Dec 2016 22:40:07 -0800 (PST) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id 72sm28238304pfw.37.2016.12.18.22.40.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2016 22:40:07 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 18 Dec 2016 22:39:50 -0800 Message-Id: <20161219063957.18716-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161219063957.18716-1-raj.khem@gmail.com> References: <20161219063957.18716-1-raj.khem@gmail.com> Subject: [OE-core] [V2 03/10] grub: Fix build with glibc 2.25 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Backport relevant patch from grub git Signed-off-by: Khem Raj --- ...Use-AC_HEADER_MAJOR-to-find-device-macros.patch | 92 ++++++++++++++++++++++ meta/recipes-bsp/grub/grub2.inc | 1 + 2 files changed, 93 insertions(+) create mode 100644 meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch b/meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch new file mode 100644 index 0000000000..f95b9ef9a0 --- /dev/null +++ b/meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch @@ -0,0 +1,92 @@ +From 7a5b301e3adb8e054288518a325135a1883c1c6c Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Tue, 19 Apr 2016 14:27:22 -0400 +Subject: [PATCH] build: Use AC_HEADER_MAJOR to find device macros + +Depending on the OS/libc, device macros are defined in different +headers. This change ensures we include the right one. + +sys/types.h - BSD +sys/mkdev.h - Sun +sys/sysmacros.h - glibc (Linux) + +glibc currently pulls sys/sysmacros.h into sys/types.h, but this may +change in a future release. + +https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html +--- +Upstream-Status: Backport + + configure.ac | 3 ++- + grub-core/osdep/devmapper/getroot.c | 6 ++++++ + grub-core/osdep/devmapper/hostdisk.c | 5 +++++ + grub-core/osdep/linux/getroot.c | 6 ++++++ + grub-core/osdep/unix/getroot.c | 4 +++- + 5 files changed, 22 insertions(+), 2 deletions(-) + +Index: grub-2.00/configure.ac +=================================================================== +--- grub-2.00.orig/configure.ac ++++ grub-2.00/configure.ac +@@ -326,7 +326,8 @@ fi + + # Check for functions and headers. + AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent) +-AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h) ++AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h) ++AC_HEADER_MAJOR + + AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default + #include +Index: grub-2.00/grub-core/kern/emu/hostdisk.c +=================================================================== +--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c ++++ grub-2.00/grub-core/kern/emu/hostdisk.c +@@ -41,6 +41,12 @@ + #include + #include + ++#if defined(MAJOR_IN_MKDEV) ++#include ++#elif defined(MAJOR_IN_SYSMACROS) ++#include ++#endif ++ + #ifdef __linux__ + # include /* ioctl */ + # include +Index: grub-2.00/util/getroot.c +=================================================================== +--- grub-2.00.orig/util/getroot.c ++++ grub-2.00/util/getroot.c +@@ -35,6 +35,13 @@ + #ifdef HAVE_LIMITS_H + #include + #endif ++ ++#if defined(MAJOR_IN_MKDEV) ++#include ++#elif defined(MAJOR_IN_SYSMACROS) ++#include ++#endif ++ + #include + #include + #include +Index: grub-2.00/util/raid.c +=================================================================== +--- grub-2.00.orig/util/raid.c ++++ grub-2.00/util/raid.c +@@ -29,6 +29,12 @@ + #include + #include + ++#if defined(MAJOR_IN_MKDEV) ++#include ++#elif defined(MAJOR_IN_SYSMACROS) ++#include ++#endif ++ + #include + #include + #include diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index b69de9f340..ef893b327f 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc @@ -35,6 +35,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ file://0001-Enforce-no-pie-if-the-compiler-supports-it.patch \ file://0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch \ file://0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch \ + file://0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch \ " DEPENDS = "flex-native bison-native autogen-native"