{"id":809355,"url":"http://patchwork.ozlabs.org/api/patches/809355/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/patch/20170903210043.19105-1-camh@xdna.net/","project":{"id":27,"url":"http://patchwork.ozlabs.org/api/projects/27/?format=json","name":"Buildroot development","link_name":"buildroot","list_id":"buildroot.buildroot.org","list_email":"buildroot@buildroot.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170903210043.19105-1-camh@xdna.net>","list_archive_url":null,"date":"2017-09-03T21:00:43","name":"[v2,1/1] toolchain: detect external glibc in merged /usr","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"735710399e542ec06fe4560901083820bceb7b72","submitter":{"id":20727,"url":"http://patchwork.ozlabs.org/api/people/20727/?format=json","name":"Cam Hutchison","email":"camh@xdna.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/buildroot/patch/20170903210043.19105-1-camh@xdna.net/mbox/","series":[{"id":1274,"url":"http://patchwork.ozlabs.org/api/series/1274/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/list/?series=1274","date":"2017-09-03T21:00:43","name":"[v2,1/1] toolchain: detect external glibc in merged /usr","version":2,"mbox":"http://patchwork.ozlabs.org/series/1274/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/809355/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/809355/checks/","tags":{},"related":[],"headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=xdna.net header.i=@xdna.net header.b=\"L7gkyzf/\";\n\tdkim-atps=neutral"],"Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xlll553LDz9t24\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  4 Sep 2017 07:01:21 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id ABC2185914;\n\tSun,  3 Sep 2017 21:01:14 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id YUeyJDpK-KpE; Sun,  3 Sep 2017 21:01:12 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9A4EA859E7;\n\tSun,  3 Sep 2017 21:01:12 +0000 (UTC)","from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 09C3C1C16B8\n\tfor <buildroot@lists.busybox.net>;\n\tSun,  3 Sep 2017 21:01:11 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 039B786121\n\tfor <buildroot@lists.busybox.net>;\n\tSun,  3 Sep 2017 21:01:11 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 1LVuQINwz4SX for <buildroot@lists.busybox.net>;\n\tSun,  3 Sep 2017 21:01:10 +0000 (UTC)","from mail-lf0-f50.google.com (mail-lf0-f50.google.com\n\t[209.85.215.50])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 256558609F\n\tfor <buildroot@buildroot.org>; Sun,  3 Sep 2017 21:01:10 +0000 (UTC)","by mail-lf0-f50.google.com with SMTP id y128so14184462lfd.4\n\tfor <buildroot@buildroot.org>; Sun, 03 Sep 2017 14:01:10 -0700 (PDT)","from xdna.net (107-220-181-180.cpe.skymesh.net.au.\n\t[180.181.220.107]) by smtp.gmail.com with ESMTPSA id\n\ts66sm876235lfi.48.2017.09.03.14.01.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 03 Sep 2017 14:01:07 -0700 (PDT)"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"from auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=xdna.net; s=google; \n\th=from:to:cc:subject:date:message-id;\n\tbh=EL1xyYVbgklMa010Pe+p0cXpautShvf6zlv3vLKsNZY=;\n\tb=L7gkyzf//4H+MNjijMcRlJiJmL3pWfu98jJRHG8g188BfwOVcTCPqg3zXKd51P01SQ\n\thO8EaM9fRCmfr7YPNv6vI5LYBZHJYfP4fSWymyfnHnQKJ/mjmc+1goneafuMLjNdZ7Ba\n\tT5rsMn8YrAndeBdpwc/IMd8rve8VHobzDfvW8=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=EL1xyYVbgklMa010Pe+p0cXpautShvf6zlv3vLKsNZY=;\n\tb=oYNQVQoV/xdDrEU0mKIngqClHesNuQMbo8+mlvcjaiZYnK8OQ7ckCNAFWPW2l/mw+K\n\tYA901vPMWs077+7JOTWf8pu1HhSHFHGNhSK/PMcETK0i6K+baMaO03KxY629SWur36iy\n\tLQ9qzSQKkQrXf/RGhti1Mw3lMOSboSM0FZKsxhGgMvP6f0vGomn9pY/MoRfxUMfQ24+Z\n\tab/jRZ3cIWtjXamLhHWQx0xAendHHqEsRLy4t/zKBblEWe+FH7BR4bKPdo00Y5EiT7kq\n\tXamDf2Oue1tL0OBDdFkSf8EBxKEofDs79mWyBTO7r4O+rjTDANtL4TNFq4gFweKVZdbq\n\t/gzA==","X-Gm-Message-State":"AHPjjUhh1vWDKeBvREf9axiYOohvos8CpcCdB8Y4XmgmeMVrdnF0J0aY\n\t1LXkxbG1t1VUeLVHf88sug==","X-Google-Smtp-Source":"ADKCNb7NgTTmw0aQM3PVLx2/2bgeIzf3yU3Q7yL+ye+cV9fG2GtRjfArqZXylkwsczSlYVUnX30Rkw==","X-Received":"by 10.25.21.96 with SMTP id l93mr746903lfi.160.1504472467813;\n\tSun, 03 Sep 2017 14:01:07 -0700 (PDT)","From":"Cam Hutchison <camh@xdna.net>","To":"buildroot@buildroot.org","Date":"Mon,  4 Sep 2017 07:00:43 +1000","Message-Id":"<20170903210043.19105-1-camh@xdna.net>","X-Mailer":"git-send-email 2.11.0","Cc":"Cam Hutchison <camh@xdna.net>,\n\tThomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\t\"Yann E. MORIN\" <yann.morin.1998@free.fr>,\n\tThomas De Schampheleire <thomas.de_schampheleire@nokia.com>","Subject":"[Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in\n\tmerged /usr","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"},"content":"When using an external toolchain that was built with Buildroot and a\nmerged /usr, the dynamic linker is actually in /usr/lib.\n\nBut the check_glibc macro limits the depth it is looking for the dynamic\nlinker, and misses it when it is in /usr/lib because it is too deep.\n\nWe could fix that in two ways: increase the depth in which we look\nfor it, or follow symlinks. We choose the second solution.\n\nSigned-off-by: Cam Hutchison <camh@xdna.net>\nCc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nCc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>\nCc: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n---\nChanges v1 -> v2:\n  - Reworded commit message (suggested by Yann)\n\n toolchain/helpers.mk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk\nindex e9e36d2069..63ef6fb4b0 100644\n--- a/toolchain/helpers.mk\n+++ b/toolchain/helpers.mk\n@@ -227,7 +227,7 @@ check_glibc_rpc_feature = \\\n #\n check_glibc = \\\n \tSYSROOT_DIR=\"$(strip $1)\"; \\\n-\tif test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \\\n+\tif test `find -L $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \\\n \t\techo \"Incorrect selection of the C library\"; \\\n \t\texit -1; \\\n \tfi; \\\n","prefixes":["v2","1/1"]}