Boost C++ Libraries: Ticket #3916: implicit gcc fortran generator omits -fPIC when buildung shared libs https://svn.boost.org/trac10/ticket/3916 <p> Checked against boost development trunk <a class="changeset" href="https://svn.boost.org/trac10/changeset/59615" title="m">r59615</a>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3916 Trac 1.4.3 Vladimir Prus Sun, 14 Feb 2010 10:07:44 GMT <link>https://svn.boost.org/trac10/ticket/3916#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3916#comment:1</guid> <description> <p> Could you expand somewhat? Given your description, I cannot understand what the problem. In fact, I don't even know what is 'implicig gcc fortran generator'. </p> <p> Thanks, Volodya </p> </description> <category>Ticket</category> </item> <item> <author>jan.boehme@…</author> <pubDate>Tue, 16 Feb 2010 09:25:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3916#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3916#comment:2</guid> <description> <p> Hi Volodya! </p> <p> Sorry for missing something. A rule like this is given: </p> <p> lib mixture : source.f csource.cpp ; </p> <pre class="wiki">bjam -a -d2 mixture link=shared </pre><p> leads to the following output: </p> <pre class="wiki">gcc.compile.fortran bin/gcc-4.4.3/debug/source.o "g++" -O0 -fno-inline -Wall -g -c -o "bin/gcc-4.4.3/debug/source.o" "source.f" gcc.compile.c++ bin/gcc-4.4.3/debug/csource.o "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC -c -o "bin/gcc-4.4.3/debug/csource.o" "csource.cpp" gcc.link.dll bin/gcc-4.4.3/debug/libmixture.so </pre><p> As you can see, only the cpp-object was compiled using "-fPIC". </p> <p> With "implicit" I want to say that the gnu fortran compiler will be used implicitly here. What if I want to use gnu for C++ only and the intel tools for fortran? I guess I would get errors caused by ambiguous generators. </p> <p> Cheers, Jan. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sun, 28 Feb 2010 07:51:23 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3916#comment:3 https://svn.boost.org/trac10/ticket/3916#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/59986" title="Use same flags for fortran compilation as for C and C++. Fixes #3916. ">[59986]</a>) Use same flags for fortran compilation as for C and C++. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3916" title="#3916: Bugs: implicit gcc fortran generator omits -fPIC when buildung shared libs (closed: fixed)">#3916</a>. </p> Ticket Vladimir Prus Sun, 28 Feb 2010 07:53:49 GMT <link>https://svn.boost.org/trac10/ticket/3916#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3916#comment:4</guid> <description> <p> Jan, as you see, I've fixed this issue. Could you try with SVN HEAD? As for your second question -- it might be possible to use intel for fortran sources, but only explicitly, for example: obj a : a.f : &lt;toolset&gt;intel ; exe main : main.cpp a ; </p> <p> This is untested code, beware. </p> <p> Thanks, Volodya </p> </description> <category>Ticket</category> </item> </channel> </rss>