From patchwork Sat Nov 2 21:37:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Vasic X-Patchwork-Id: 288022 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id A73692C009F for ; Sun, 3 Nov 2013 08:38:18 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A1B9F8B912; Sat, 2 Nov 2013 21:38:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DAGXT6zZhnXj; Sat, 2 Nov 2013 21:38:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 26EAF8B90D; Sat, 2 Nov 2013 21:38:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F1E8C1BFA59 for ; Sat, 2 Nov 2013 21:38:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ED0A18C42B for ; Sat, 2 Nov 2013 21:38:15 +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 I2DQhdHpUn-K for ; Sat, 2 Nov 2013 21:38:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2D8E88C3EC for ; Sat, 2 Nov 2013 21:38:15 +0000 (UTC) Received: by mail-ea0-f173.google.com with SMTP id g10so2696685eak.18 for ; Sat, 02 Nov 2013 14:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZS/OjZCra8VX61ZVXc3TcICCoEiU/mA2STccxBCq0eg=; b=ypZsUEaCnxihRiOZX1LrS6mHi3NYfIGUFiYYCKPxNBCPu04ZYBUUqTKomlKfLiy1Xa 7Kl+fNxp0Q/AOZrbH48x7GmG2Ke5brGAdA5bFf4Oq3fLVGDHmfRjkkK+x/J5ZZqqDcPI e0UWbpROPNZQu+flGFAHr7jikt4Nj2N9gLVMGUaMebuWV7RSJKBHKwSJiqD/8BXKCbU2 tUw1Lns6Ftd0eHqm01C9mCzdoQ418EVhOka+jKrnvXXPY5NA93TIteBQm0txtUMqCL4w frUwpwajzP86R9m6G4+z/+cizNqE/tI43Ns0m9IM3uhZKR316movidIPxMvTWBtDigXi q0BQ== X-Received: by 10.14.149.13 with SMTP id w13mr10057eej.134.1383428293665; Sat, 02 Nov 2013 14:38:13 -0700 (PDT) Received: from localhost.localdomain (95-178-158-12.dsl.optinet.hr. [95.178.158.12]) by mx.google.com with ESMTPSA id w6sm25271044eeo.12.2013.11.02.14.38.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Nov 2013 14:38:13 -0700 (PDT) From: Stanislav Vasic To: buildroot@busybox.net Date: Sat, 2 Nov 2013 22:37:16 +0100 Message-Id: <1383428236-3842-1-git-send-email-svlasic@gmail.com> X-Mailer: git-send-email 1.8.3.2 Cc: Stanislav Vasic Subject: [Buildroot] [PATCH 1/1] Option to copy Linaro gconv libs to target X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch adds an option for external Linaro toolchains which allows buildroot to copy gconv libs to target. Also exports GCONV_PATH if folder exists on target. That is needed because some programs (eg. XBMC) dont see gconv libs if GCONV_PATH is not exported. Signed-off-by: Stanislav Vasic --- system/skeleton/etc/profile | 6 ++++++ toolchain/helpers.mk | 12 ++++++++++++ toolchain/toolchain-external/Config.in | 6 ++++++ toolchain/toolchain-external/toolchain-external.mk | 4 ++++ 4 files changed, 28 insertions(+) diff --git a/system/skeleton/etc/profile b/system/skeleton/etc/profile index 31d3180..d7fef65 100644 --- a/system/skeleton/etc/profile +++ b/system/skeleton/etc/profile @@ -8,6 +8,12 @@ export PATH=\ /usr/bin/X11:\ /usr/local/bin +# If gconv folder exists, export GCONV_PATH + +if [ -d /usr/lib/gconv ]; then + export GCONV_PATH = /usr/lib/gconv +fi + # If running interactively, then: if [ "$PS1" ]; then diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index a8944ce..a778cef 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -83,6 +83,18 @@ copy_toolchain_lib_root = \ \ echo -n +# Function for Linaro toolchains (EABIhf) that copies gconv libs to target +# Expects 1 param: +# $1: toolchain root +copy_toolchain_gconv = \ + BASE_DIR="$(strip $1)"; \ + if [ -d $${BASE_DIR}usr/lib/arm-linux-gnueabihf/gconv ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/gconv ; \ + cp -r $${BASE_DIR}usr/lib/arm-linux-gnueabihf/gconv/* $(TARGET_DIR)/usr/lib/gconv ; \ + fi; \ + \ + echo -n + # # Copy the full external toolchain sysroot directory to the staging # dir. The operation of this function is rendered a little bit diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in index 48b5865..fc328b1 100644 --- a/toolchain/toolchain-external/Config.in +++ b/toolchain/toolchain-external/Config.in @@ -864,6 +864,12 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL bool select BR2_TOOLCHAIN_USES_MUSL +config BR2_TOOLCHAIN_EXTERNAL_LINARO_GCONV + bool "Copy GCONV libraries to target" + depends on BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07 \ + || BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08 \ + || BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_09 + if BR2_TOOLCHAIN_EXTERNAL_CUSTOM choice diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index d41cc7c..c1a3dc7 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -496,6 +496,10 @@ define TOOLCHAIN_EXTERNAL_INSTALL_CORE echo "Could not find gdbserver in external toolchain" ; \ exit 1 ; \ fi ; \ + fi; \ + if test "$(BR2_TOOLCHAIN_EXTERNAL_LINARO_GCONV)" = "y" ; then \ + $(call MESSAGE,"Copying external toolchain gconv to target...") ; \ + $(call copy_toolchain_gconv,$${SYSROOT_DIR}) ; \ fi endef