Re: Libtool does not generate shared libraries when cross compiling x86/64 -> sparc64 using fujitsu compiler
Harald Servat <[email protected]>
| Newsgroups | gmane.comp.gnu.libtool.general |
|---|---|
| Message-ID | <[email protected]> |
On 02/02/2016 07:02 PM, Mike Frysinger wrote: > On 02 Feb 2016 17:51, Harald Servat wrote: >> we want to use libtool on a system on which we have to cross-compile >> from intel x86/64 to sparc/64 using the Fujitsu compiler (fccpx). >> Unfortunately, I'm unable to get libtool (version 2.4.2) to generate >> shared libraries. >> >> I have written a very small libtool + autotools example and run the >> following but I'm always getting the output shown below the commands. >> Note, that the same works fine in a linux/x86-64 and I don't have to add >> --enable-shared in that case, so I guess I don't need --enable-shared >> either in these tests. >> >> COMMANDS: >> >> ./configure --prefix=/tmp/test CC=fccpx --host=x86_64 >> ./configure --prefix=/tmp/test CC=fccpx --host=x86-64 --target=sparc64 >> ./configure --prefix=/tmp/test CC=fccpx --host=x86_64 >> --target=sparc64-linux > > your flags are incorrect. you want --build=x86_64-linux-gnu and > --host=sparc64-linux-gnu. please read this doc for more info: > https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html > -mike > Thank you for the pointer Mike. we have found that ./configure --prefix=/tmp/test CC=fccpx --build=x86_64-linux-gnu --host=sparc64-linux-gnu did not work. See: ... checking whether the fccpx linker (/usr/bin/ld -m elf64_sparc) supports shared libraries... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... unsupported checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... yes checking whether a program can dlopen itself... cross checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... no However, the system support suggested to add the flag -Xg into the Fujitsu compiler and we found that the following configure did work. ./configure --prefix=/tmp/test CC=fccpx --host=x86-linux CFLAGS="-Xg" checking whether the fccpx linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... fccpx: warning: -print-search-dirs is unrecognized option. This option is passed to the linker. usage: fccpx [options] files. GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... yes checking whether a program can dlopen itself... cross checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes So that works for the small test example I generated. However, when passing the same flags to the application we want to build, then the libtool still claims it does not support shared libraries. So there are couple of questions then: any idea on why this larger case the addition of CFLAGS and --host does allow libtool to generate shared libraries? And, I don't have direct access to the system, but can I do something to improve the support on this system? Best, WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received. http://www.bsc.es/disclaimer _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool