]> https://gitweb.dealii.org/ - dealii-svn.git/commit
Remove -static from the linker flags when using static libraries. The svn log doesn...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Oct 2008 17:15:48 +0000 (17:15 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Oct 2008 17:15:48 +0000 (17:15 +0000)
commit732494b6afcc14a0a9b99e9942369aae61662520
treeeda27ea630f7f9d04d55ca475b18032075645822
parent4713c57b42ebc87f3639132b7902842a155fe6b3
Remove -static from the linker flags when using static libraries. The svn log doesn't give much of an indication as to why it was there (Ralf commented that it was necessary but not why), but from reading through the gcc documentation I believe it has a different purpose than for example -shared: -shared needs to be given on the command line if we link object files into a shared library. On the other hand, we link into a static library using 'ar', and when we link *with* a static library we simply list it on the command line. -static, on the other hand, when given on the command line, has the effect to that a flag like -lbase should refer to libbase.a even if libbase.so is available. Since we don't really care which system libraries are being used we really have no business specifying this flag at all.

The underlying reason for the change is that with the proliferation of libraries we link with there are cases where a system library is only available as a shared lib. The current case was that with MPI the compiler passes -lmpi_cxx to the linker but mpi_cxx only exists as libmpi_cxx.so and consequently the link fails. This is unnecessary since all we wanted to ensure is that the *deal.II* libraries are used in their static form.

git-svn-id: https://svn.dealii.org/trunk@17397 0785d39b-7218-0410-832d-ea1e28bc413d
deal.II/configure
deal.II/configure.in

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.