Re: [arch-general] Link against system libs
On 7 April 2017 at 06:07, Neven Sajko wrote: > GCC 6 builds Archlinux. It's in the base-devel group btw, along with other packages generally required for building: https://www.archlinux.org/groups/x86_64/base-devel/ Also, you might want to read the makepkg page on wiki.archlinux.org. And you can use asp https://aur.archlinux.org/packages/asp-git/ for downloading the official repo buildscripts.
Re: [arch-general] Link against system libs
GCC 6 builds Archlinux.
Re: [arch-general] Link against system libs
On 6 April 2017 at 14:13, Wolfgang Mader wrote: > If this compiler is a c++ one, it does its specific name mangling. Thus, > linking against these libs should only be possible for binaries compiled with > the same c++ compiler. However, arch ships gcc6, gcc5, and clang. Does it also > ship libraries for all these compilers or how is it possible for binaries > complied by these different compilers to link successfully? > > Best, > Wolfgang All compilers you mentioned are for the most part ABI compatible, ie. they use the same name mangling.
Re: [arch-general] Link against system libs
Also, I forgot to add some literature on the subject, too. [0], [1], [2] cheers! mar77i [0] https://linux.die.net/man/8/ld-linux [1] http://www.linuxjournal.com/node/6463/print [2] http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
Re: [arch-general] Link against system libs
On Thu, Apr 6, 2017 at 2:13 PM, Wolfgang Mader wrote: > Arch ships with a lot of libraries of which .a and .so are stored in /usr/lib > and beyond. These libraries are compiled by some compiler, the compiler by > which the entire arch linux distribution packages are compiled with. By the > way, which one is this and where can I find that information. > > If this compiler is a c++ one, it does its specific name mangling. Thus, > linking against these libs should only be possible for binaries compiled with > the same c++ compiler. However, arch ships gcc6, gcc5, and clang. Does it also > ship libraries for all these compilers or how is it possible for binaries > complied by these different compilers to link successfully? All of a program's interactions with the operating system as well as the subordinate interactions between different units of code and data are subject to the linker and loader. The file format as well as interaction "platform" which Arch uses is called ELF. Both GCC and LLVM produce valid ELF binaries as well as libraries which are normally used with Linux. The kernel build configuration offers other formats too, though. Essentially, you can have units produced by different compilers and even on different machines, but then go run them together without problems because organizing the different units at the many different layers that accumulated here is better not left up to the compiler itself, but rather this formal definition of how things interact with each other. cheers! mar77i
[arch-general] Link against system libs
Hi all, I have a general question about linking in C++ with which you can probably clarify for me. Arch ships with a lot of libraries of which .a and .so are stored in /usr/lib and beyond. These libraries are compiled by some compiler, the compiler by which the entire arch linux distribution packages are compiled with. By the way, which one is this and where can I find that information. If this compiler is a c++ one, it does its specific name mangling. Thus, linking against these libs should only be possible for binaries compiled with the same c++ compiler. However, arch ships gcc6, gcc5, and clang. Does it also ship libraries for all these compilers or how is it possible for binaries complied by these different compilers to link successfully? Best, Wolfgang signature.asc Description: This is a digitally signed message part.