* parsing multi-lib output for LTIB
@ 2012-09-21 15:24 Peter Barada
2012-09-24 2:20 ` Zhenqiang Chen
0 siblings, 1 reply; 2+ messages in thread
From: Peter Barada @ 2012-09-21 15:24 UTC (permalink / raw)
To: crossgcc
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"?
Does anyone have a script (or pointer to one) that can convert the
output of -print-mult-lib into the list of options necessary?
Thanks in advance!
--
Peter Barada
peter.barada@logicpd.com
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: parsing multi-lib output for LTIB
2012-09-21 15:24 parsing multi-lib output for LTIB Peter Barada
@ 2012-09-24 2:20 ` Zhenqiang Chen
0 siblings, 0 replies; 2+ messages in thread
From: Zhenqiang Chen @ 2012-09-24 2:20 UTC (permalink / raw)
To: Peter Barada; +Cc: crossgcc
On 21 September 2012 23:24, Peter Barada <peter.barada@logicpd.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-24 2:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-21 15:24 parsing multi-lib output for LTIB Peter Barada
2012-09-24 2:20 ` Zhenqiang Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).