From patchwork Thu Jul 14 16:37:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 72037 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp171002qga; Thu, 14 Jul 2016 09:37:58 -0700 (PDT) X-Received: by 10.66.199.72 with SMTP id ji8mr24083132pac.52.1468514277985; Thu, 14 Jul 2016 09:37:57 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id z128si4926793pfb.226.2016.07.14.09.37.57; Thu, 14 Jul 2016 09:37:57 -0700 (PDT) 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=@intel-com.20150623.gappssmtp.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 Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0EAB573169; Thu, 14 Jul 2016 16:37:54 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mail.openembedded.org (Postfix) with ESMTP id 6AB786AC4B for ; Thu, 14 Jul 2016 16:37:44 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id o80so120333666wme.1 for ; Thu, 14 Jul 2016 09:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=S8LNa/DmgqIOvGWBHxMmkqtdBMmJZ5tmUtP+tyZTeA0=; b=cSUMwzoW6l5vZ7/BYsLqzb62CwO61+Y6vz+nuWsoOQuLtycC9QBeBQ7QcFu00Vw84p WjWQKZCTs1RZWccVJ5B7s9fk7aMAQaEVJu4Hsz0O+kDyD/vr5ubfHDzgtkxO3EgW9dD2 d75pdTCN0/jxQkmYBlsTyc559wW6yIs6vGFploB0SOvxxibDcxyigy+yY8NxVgLlm7Jw /pKxdDemWOl9F0jlDnHYk8WIOZkn7lmBG8zigRMKOQXttF9vqvlpyam9euw+DHZwRCpo 7bO3rG+raQTQ1B6MjmaV6xsDqmmnt0lePjeGwVOMBPik0/CQtmACUcAoG9n5BExry2OQ sdGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=S8LNa/DmgqIOvGWBHxMmkqtdBMmJZ5tmUtP+tyZTeA0=; b=LdGN+5Eiv9qog0eX+mhhhU/i4p8oOot99PCIsyqVbRfFZmOJg7AKuiwDLYWnLTxioI MO+lTDFneDYoLVrA3n7+jaPc09bhNcYNp1JsC+4+UB8PGSAMFrZhFoxf4orY+lcRWD8L IcW66quy2vOJ7XLT8D3hbAUwgzvxcXYqDux9KJzEwyoPbvermdXIJRyv95AJGW4vJVhy Y4vsyCMYKg0TgO/obGO2z7yXtWEEt4pn/qIUaPrmHxy+IUl6zPH9cqiVkEPF0oOGpf4P X+ZXN2/AZUojbRsmmdu3wdZpMdv8jW7VogpHfe00Afcgv8p9g47uD4bAm/3bAcTrkSA7 +lAw== X-Gm-Message-State: ALyK8tKgs2uVBUVRZmwVe+ANjkC/3qJ0bIrDhTW8b0NbWKcJPgEAO52pkPncQYDqpfjl7MRN X-Received: by 10.28.184.82 with SMTP id i79mr35721220wmf.26.1468514264685; Thu, 14 Jul 2016 09:37:44 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id f187sm4832818wmf.15.2016.07.14.09.37.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Jul 2016 09:37:43 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 14 Jul 2016 17:37:40 +0100 Message-Id: <1468514260-5560-1-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.8.1 Subject: [OE-core] [PATCH] glibc: use the host locale archive in nativesdk builds 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 The nativesdk libc when used by buildtools has a hard requirement on supporting a UTF-8 locale because Python 3 needs a UTF-8 locale. However we currently only ship the C locale, which means that Python attempts to lookup the user's locale (for example, en_NZ.UTF-8) in the locale archive under it's prefix it fails and falls back to C. This the results in Python using ASCII instead of UTF-8 for file encoding, and bitbake breaks. Th obvious solution would be to ship all locales, but this would add approximately 250MB to the size of the buildtools tarball (which is currently around 30MB). Generating a binary locale archive reduces this down to 100MB, but this is still a drastic increase in footprint. If we ship a subset of locales in the tarball then there will be users whose locale isn't in the tarball, and they'll have to change their locale to an "approved" one, which isn't the best of messages to send to new users. The alternative is to tell the nativesdk libc that the locale archive isn't under it own prefix but is in fact at /usr/lib/locale/locale-archive, so the buildtools libc uses the host locale archive. The locale archive format appears to be at least fairly stable: our glibc 2.24 can read the locale archive generated by glibc 2.17 (Centos 7). [ YOCTO #9775 ] Signed-off-by: Ross Burton --- meta/recipes-core/glibc/glibc_2.24.bb | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.8.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/glibc/glibc_2.24.bb b/meta/recipes-core/glibc/glibc_2.24.bb index 456f206..4bc6443 100644 --- a/meta/recipes-core/glibc/glibc_2.24.bb +++ b/meta/recipes-core/glibc/glibc_2.24.bb @@ -129,6 +129,12 @@ do_compile () { } +# Use the host locale archive when built for nativesdk so that we don't need to +# ship a complete (100MB) locale set. +do_compile_prepend_class-nativesdk() { + echo "complocaledir=/usr/lib/locale" >> ${S}/configparms +} + require glibc-package.inc BBCLASSEXTEND = "nativesdk"