From patchwork Mon Apr 1 00:22:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Mendoza-Jonas X-Patchwork-Id: 1072127 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="B17LGANm"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="7JSlkmHy"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44XY2L11sMz9sQw for ; Mon, 1 Apr 2019 11:22:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 226E022739; Mon, 1 Apr 2019 00:22:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QWZJbrx4VJAB; Mon, 1 Apr 2019 00:22:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9D02B2274E; Mon, 1 Apr 2019 00:22:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B6C4A1BF404 for ; Mon, 1 Apr 2019 00:22:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B1CA58608B for ; Mon, 1 Apr 2019 00:22:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t-5QikAsIrE9 for ; Mon, 1 Apr 2019 00:22:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by whitealder.osuosl.org (Postfix) with ESMTPS id 37EC085C10 for ; Mon, 1 Apr 2019 00:22:22 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id EF5EC20D2D; Sun, 31 Mar 2019 20:22:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 31 Mar 2019 20:22:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=fm2; bh=ePXjSp0RZddVI lxgadsHw0p2pE0U7F5mp1cyp36XazE=; b=B17LGANmn8VjW2aJRs/mqiYJkY0mX fXcS+Gtf9bUQhk1yXjAmivgy2A23MiKxSD9sm5s+Bigy2b1q5jT7PqYMEOwS5y+A AxEMPOablQyDflV2cpK4e7ZAn+MwfX6tQ5VTW1vP/sI11+aG3X2Nb73RUo1nPncQ O9EprYvIFjW8rmkrBQnA7TvtHukc8s54Ml0z4wz01T00MPP3zuiycSXNm91Jb1gi dJo20lMdFJrs9alIgiT6KfzdKfqueRK74XGKBnsrxoMu8gInq8A8uKQFbZhJwtJg LzWY0WbA8LlLgw3O3gDJguYruViN+ycQ65yZIZoZQIuzz3ycCRV5RMWzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ePXjSp0RZddVIlxga dsHw0p2pE0U7F5mp1cyp36XazE=; b=7JSlkmHyp2dgQnANKAqyTrL9bfDMj38B0 2zFAOvhcjH10Al2TkZXyDUuEDa0Ma/nNaceDXehRT9eUEQvxjncYlQvMHEryeJN0 K0MozQ46M56pqXrnmaZjYZVUpO/uMmOASK77TT0nZ+YETTxbQRe9S28bTqTqT2Vo 2T1PPVzOW14eNvAEalgkBBJAXI20/Xq6MSMqCewiq9bbLjslTAzCUD45tKrdcTPy P8U1+QDqi8gWy4CgBxFRnRUC6Y94rNmSAjPtOnWsf8969DbrimDhTZqqsXBqMr5p 2WMTKs+kN0wB974/z2fJhoNTbAErDgn+0lOckmkmvVIYdNHHcfN7A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrleefgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghlucfo vghnughoiigrqdflohhnrghsuceoshgrmhesmhgvnhguohiirghjohhnrghsrdgtohhmqe enucffohhmrghinhepshhouhhrtggvfigrrhgvrdhorhhgnecukfhppeduvddvrdelledr kedvrddutdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhesmhgvnhguohiirghjoh hnrghsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from v4.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 671BBE452E; Sun, 31 Mar 2019 20:22:18 -0400 (EDT) From: Samuel Mendoza-Jonas To: buildroot@buildroot.org Date: Mon, 1 Apr 2019 11:22:08 +1100 Message-Id: <20190401002208.16062-1-sam@mendozajonas.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] make: Include patch for gl_lstat support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Mendoza-Jonas , Joel Stanley Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Include upstream commit 193f1e8 "glob: Do not assume glibc glob internals". Without this if building glibc with host-make it will fail with a segfault in make: >>> glibc glibc-2.28-69-g1e5c5303a522764d7e9d2302a60e4a32cdb902f1 Building PATH="/scratch/builds/host-make/host/bin:/scratch/builds/host-make/host/sbin:/home/sam/bin:/home/sam/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" /scratch/builds/host-make/host/bin/host-make -j25 -C /scratch/builds/host-make/build/glibc-glibc-2.28-69-g1e5c5303a522764d7e9d2302a60e4a32cdb902f1/build /scratch/builds/host-make/host/bin/host-make -r PARALLELMFLAGS="" -C /scratch/builds/host-make/build/glibc-glibc-2.28-69-g1e5c5303a522764d7e9d2302a60e4a32cdb902f1 objdir=`pwd` all Segmentation fault (core dumped) Signed-off-by: Samuel Mendoza-Jonas --- This also applies to the 2019.02 branch. ...b-Do-not-assume-glibc-glob-internals.patch | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 package/make/0001-glob-Do-not-assume-glibc-glob-internals.patch diff --git a/package/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/package/make/0001-glob-Do-not-assume-glibc-glob-internals.patch new file mode 100644 index 0000000000..236a936d5b --- /dev/null +++ b/package/make/0001-glob-Do-not-assume-glibc-glob-internals.patch @@ -0,0 +1,67 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 24 Sep 2017 09:12:58 -0400 +Subject: [PATCH] glob: Do not assume glibc glob internals. + +It has been proposed that glibc glob start using gl_lstat, +which the API allows it to do. GNU 'make' should not get in +the way of this. See: +https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html + +* dir.c (local_lstat): New function, like local_stat. +(dir_setup_glob): Use it to initialize gl_lstat too, as the API +requires. +--- + dir.c | 29 +++++++++++++++++++++++++++-- + 1 file changed, 27 insertions(+), 2 deletions(-) + +diff --git a/dir.c b/dir.c +index adbb8a9..c343e4c 100644 +--- a/dir.c ++++ b/dir.c +@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf) + } + #endif + ++/* Similarly for lstat. */ ++#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) ++# ifndef VMS ++# ifndef HAVE_SYS_STAT_H ++int lstat (const char *path, struct stat *sbuf); ++# endif ++# else ++ /* We are done with the fake lstat. Go back to the real lstat */ ++# ifdef lstat ++# undef lstat ++# endif ++# endif ++# define local_lstat lstat ++#elif defined(WINDOWS32) ++/* Windows doesn't support lstat(). */ ++# define local_lstat local_stat ++#else ++static int ++local_lstat (const char *path, struct stat *buf) ++{ ++ int e; ++ EINTRLOOP (e, lstat (path, buf)); ++ return e; ++} ++#endif ++ + void + dir_setup_glob (glob_t *gl) + { + gl->gl_opendir = open_dirstream; + gl->gl_readdir = read_dirstream; + gl->gl_closedir = free; ++ gl->gl_lstat = local_lstat; + gl->gl_stat = local_stat; +- /* We don't bother setting gl_lstat, since glob never calls it. +- The slot is only there for compatibility with 4.4 BSD. */ + } + + void +-- +2.21.0 +