From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mediacenter.hi.pengutronix.de ([2001:6f8:1178:2::65]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SBlCk-00045r-Sy for ptxdist@pengutronix.de; Sun, 25 Mar 2012 13:01:46 +0200 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1SBlCk-0006oA-RZ for ptxdist@pengutronix.de; Sun, 25 Mar 2012 13:01:46 +0200 Date: Sun, 25 Mar 2012 13:01:46 +0200 From: Michael Olbrich Message-ID: <20120325110146.GD27119@pengutronix.de> References: <1332616028-32312-1-git-send-email-linux@bohmer.net> <1332616028-32312-2-git-send-email-linux@bohmer.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1332616028-32312-2-git-send-email-linux@bohmer.net> Subject: Re: [ptxdist] [PATCH 2/8 v3] [x86_64, multilib] Remove all 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: , 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 On Sat, Mar 24, 2012 at 08:07:02PM +0100, Remy Bohmer wrote: > 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 > --- > v2: no changes since v1 > v3: rebase of v2 (dropped some changes since they are in mainline already) > > rules/glibc.make | 23 +++++++++++------------ > rules/post/install.make | 18 ++++++------------ > scripts/install_copy_toolchain.sh | 2 +- > 3 files changed, 18 insertions(+), 25 deletions(-) > > diff --git a/rules/glibc.make b/rules/glibc.make > index 2de7a13..0d110ef 100644 > --- a/rules/glibc.make > +++ b/rules/glibc.make > @@ -104,33 +104,32 @@ 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 > - @$(call install_copy_toolchain_usr, glibc, bin/locale) > + @$(call install_copy_toolchain_lib, glibc, bin/locale) > endif This breaks with my toolchain: [...] install_copy_toolchain_lib: bin/locale not found [...] I guess, in your toolchain this is in lib[64]/bin because you need on for each. Michael > > ifdef PTXCONF_GLIBC_I18N_BIN_LOCALEDEF > - @$(call install_copy_toolchain_usr, glibc, bin/localedef) > + @$(call install_copy_toolchain_lib, glibc, bin/localedef) > endif > > ifdef PTXCONF_GLIBC_I18N_RAWDATA > diff --git a/rules/post/install.make b/rules/post/install.make > index 190ec28..cfc73a4 100644 > --- a/rules/post/install.make > +++ b/rules/post/install.make > @@ -300,18 +300,15 @@ install_script_replace = \ > # > # $1: xpkg label > # $2: source > -# $3: destination > -# $4: strip (y|n) default is to strip > +# $3: strip (y|n) default is to strip > # > install_copy_toolchain_lib = \ > XPKG=$(subst _,-,$(strip $(1))); \ > LIB="$(strip $2)"; \ > - DST="$(strip $3)"; \ > - STRIP="$(strip $4)"; \ > - test "$${DST}" != "" && DST="-d $${DST}"; \ > + STRIP="$(strip $3)"; \ > $(call install_check, install_copy_toolchain_lib); \ > ${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)" \ > - $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l "$${LIB}" $${DST} -s "$${STRIP}" > + $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l "$${LIB}" -s "$${STRIP}" > > # > # install_copy_toolchain_dl > @@ -331,18 +328,15 @@ install_copy_toolchain_dl = \ > # > # $1: xpkg label > # $2: source > -# $3: destination > -# $4: strip (y|n) default is to strip > +# $3: strip (y|n) default is to strip > # > install_copy_toolchain_usr = \ > XPKG=$(subst _,-,$(strip $(1))); \ > LIB="$(strip $2)"; \ > - DST="$(strip $3)"; \ > - STRIP="$(strip $4)"; \ > - test "$${DST}" != "" && DST="-d $${DST}"; \ > + STRIP="$(strip $3)"; \ > $(call install_check, install_copy_toolchain_other); \ > ${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)" \ > - $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -u "$${LIB}" $${DST} -s "$${STRIP}" > + $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -u "$${LIB}" -s "$${STRIP}" > > # > # install_link > diff --git a/scripts/install_copy_toolchain.sh b/scripts/install_copy_toolchain.sh > index 7b91fc4..44c399a 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,/bin,} ""; do > tmp="${lib_dir%${prefix}}" > if test "${lib_dir}" != "${tmp}"; then > break > -- > 1.7.5.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de