From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Remy Bohmer Date: Wed, 28 Mar 2012 21:05:01 +0200 Message-Id: <1332961505-16641-2-git-send-email-linux@bohmer.net> In-Reply-To: <1332961505-16641-1-git-send-email-linux@bohmer.net> References: <1332961505-16641-1-git-send-email-linux@bohmer.net> Subject: [ptxdist] [PATCH 2/6 v5] [x86_64, multilib] Remove hardcoded paths from glibc.make Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de, Michael Olbrich These hardcoded paths do not work for a multilib environment where libraries are typically installed in /lib64 for x86-64 instead of /lib All correct paths can be found by interrogating the compiler toolchain for the location of these files. Signed-off-by: Remy Bohmer --- v5: - dropped changes to installation of /bin/locale{,def}. Notice that this still works on x86_64 and multilib, since binaries are always installed in /bin,/usr/bin only libraries can be installed in different locations on multilib (/lib,/usr/lib,/lib64,/usr/lib64). So, I will not create a new patch to remove the /bin/locale hardcoded paths. - reverted changes to rules/post/install.make, notice that there is now an empty argument before the 'no-stripping' 'n' rules/glibc.make | 19 +++++++++---------- scripts/install_copy_toolchain.sh | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/rules/glibc.make b/rules/glibc.make index 2de7a13..d2c5519 100644 --- a/rules/glibc.make +++ b/rules/glibc.make @@ -104,25 +104,24 @@ ifdef PTXCONF_GLIBC_NSL endif ifdef PTXCONF_GLIBC_GCONF_BASE - @$(call install_copy, glibc, 0, 0, 0755, /usr/lib/gconv) - @$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules, /usr/lib/gconv, n) + @$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules,, n) endif ifdef PTXCONF_GLIBC_GCONV_DEF - @$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so, /usr/lib/gconv) - @$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so, /usr/lib/gconv) + @$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so) + @$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so) endif ifdef PTXCONF_GLIBC_GCONV_UTF - @$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so, /usr/lib/gconv) - @$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so, /usr/lib/gconv) - @$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so, /usr/lib/gconv) - @$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so, /usr/lib/gconv) + @$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so) + @$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so) + @$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so) + @$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so) endif ifdef PTXCONF_GLIBC_GCONV_ZH - @$(call install_copy_toolchain_lib, glibc, gconv/GBBIG5.so, /usr/lib/gconv) - @$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so, /usr/lib/gconv) + @$(call install_copy_toolchain_lib, glibc, gconv/GBBIG5.so) + @$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so) endif ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE diff --git a/scripts/install_copy_toolchain.sh b/scripts/install_copy_toolchain.sh index 7b91fc4..0f21fce 100755 --- a/scripts/install_copy_toolchain.sh +++ b/scripts/install_copy_toolchain.sh @@ -101,7 +101,7 @@ ptxd_split_lib_prefix_sysroot_eval() { lib_dir="${lib_path%/${lib}}" # abs path to that lib # try to identify sysroot part of that path - for prefix in {/usr,}/lib{64,32,}{/tls,} ""; do + for prefix in {/usr,}/lib{64,32,}{/tls,/gconv,} ""; do tmp="${lib_dir%${prefix}}" if test "${lib_dir}" != "${tmp}"; then break -- 1.7.5.4 -- ptxdist mailing list ptxdist@pengutronix.de