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 1SBOo5-0003az-2q for ptxdist@pengutronix.de; Sat, 24 Mar 2012 12:06:49 +0100 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1SBOo5-0006mI-1M for ptxdist@pengutronix.de; Sat, 24 Mar 2012 12:06:49 +0100 Date: Sat, 24 Mar 2012 12:06:49 +0100 From: Michael Olbrich Message-ID: <20120324110649.GH24724@pengutronix.de> References: <1332191692-20833-1-git-send-email-linux@bohmer.net> <1332191692-20833-4-git-send-email-linux@bohmer.net> <20120324110413.GG24724@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120324110413.GG24724@pengutronix.de> Subject: Re: [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place 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 12:04:13PM +0100, Michael Olbrich wrote: > On Mon, Mar 19, 2012 at 10:14:47PM +0100, Remy Bohmer wrote: > > # > > +# out: 'lib' or 'lib64', derived from the ld-{linux,uClibc}.so.? from the compiler toolchain > > +# > > +ptxd_get_lib_dir() { > > + local dl lib_dir extra_cppflags extra_cflags > > + compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)" > > + extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)" > > + extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)" > > + > > + dl="$(echo 'int main(void){return 0;}' | \ > > + ${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \ > > + sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')" > > + lib_dir="${dl%%/ld-*.so.*}" > > + echo "${lib_dir#/}" > > this is /lib or /lib64 etc. right? The way you use it later, you should > remove the leading '/'. Otherwise you'll get /usr//lib, and while that is > valid as path, some scripts may not match it correctly. Forget this. That's your last line. I forgot to copy it, when I played with the code. Michael -- 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