From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23091 invoked by alias); 24 Sep 2012 02:20:02 -0000 Received: (qmail 22991 invoked by uid 22791); 24 Sep 2012 02:20:00 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vc0-f169.google.com (HELO mail-vc0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Sep 2012 02:19:47 +0000 Received: by vcbfl17 with SMTP id fl17so6362173vcb.0 for ; Sun, 23 Sep 2012 19:19:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=fzOkNUW7AWrJRpV4aFYML80mWZ7cCGGIXjVGht/Src4=; b=FMYJVGUskirqfHM1hOVFO6nvaJtUS56G1klcoY3avR61nQdCNaTMaziIpJ91ff2IWu rQlpumcCmuAumnYiMAdG6PfzFxkGDHFTd+aIgMZeO0IZcrMR+t/+eHD0le8n1aOnFk6e Ydj5txH/hYemJaABsRbQX5vcUBAJcynwv91LtWDKYqUj/pdnf76ow3FVesVJc/v3QnEF yYQJVyKOPXcQeAucTGvMxIuInz8yrbnxg9J0g0My5EnfJCbjibbRjLMHd99K3s3a/Kue GZGohejgbPuKrjq/MkMopQQTtd3N0q9KPNbRkvDpynkqzOmrrWndAJGKWsvtkPBi/ose XoMQ== MIME-Version: 1.0 Received: by 10.220.150.77 with SMTP id x13mr6631048vcv.27.1348453186755; Sun, 23 Sep 2012 19:19:46 -0700 (PDT) Received: by 10.58.133.161 with HTTP; Sun, 23 Sep 2012 19:19:46 -0700 (PDT) In-Reply-To: <505C86A0.8070304@logicpd.com> References: <505C86A0.8070304@logicpd.com> Date: Mon, 24 Sep 2012 02:20:00 -0000 Message-ID: Subject: Re: parsing multi-lib output for LTIB From: Zhenqiang Chen To: Peter Barada Cc: "crossgcc@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkxyejdODOLL4lSMD2Z3+rTHcUJohcruSnE1svYO+VgUSsUnbhnU5/4lNgIrOI2o5vE/vmP X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00103.txt.bz2 On 21 September 2012 23:24, Peter Barada wrote: > I'm trying to build using LTIB with an ARM multi-lib compiler (the > Linaru 2012.08 gnueabihf compiler), and I need to modify LTIB's > base_libs.spec to capture all the libraries necessary to install in the > target. > > For a single-library compiler its relatively easy since it uses > -print-file-name over libc.so.6, lib.c, libgcc_s.so, libstdc++.so, > libsupc++.a, and crti.o. However for a mult-lib compiler this doesn't > capture all the differing library directories so I need to parse the > output of "gcc -print-multi-lib" to determine the options necessary to > pass to gcc with -print-file-name. > > Given the output: > > peter@blitz:~/.../install/arm-linux-gnueabihf$ bin/gcc -print-multi-lib > .; > arm-linux-gnueabi;@marm@march=armv4t@mfloat-abi=soft > > What option sets would I need? > Does the above output mean both "" and "-marm -march-armv4t > -mfloat-abi-soft"? Yes. > Does anyone have a script (or pointer to one) that can convert the > output of -print-mult-lib into the list of options necessary? Please find the reference scripts in file scripts/build/libc/glibc-eglibc.sh-common from crosstool-ng upstream.(http://crosstool-ng.org/) multilibs=( $("${CT_TARGET}-gcc" -print-multi-lib 2>/dev/null) ) for multilib in "${multilibs[@]}"; do multi_dir="${multilib%%;*}" if [ "${multi_dir}" != "." ]; then CT_DoStep INFO "Building for multilib subdir='${multi_dir}'" extra_flags="$( echo "${multilib#*;}" \ |${sed} -r -e 's/@/ -/g;' \ )" extra_dir="/${multi_dir}" -Zhenqiang -- For unsubscribe information see http://sourceware.org/lists.html#faq