#3916 closed Bugs (fixed)
implicit gcc fortran generator omits -fPIC when buildung shared libs
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | Component: | build | |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | boost build gcc gfortran shared | Cc: |
Description
Checked against boost development trunk r59615.
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Hi Volodya!
Sorry for missing something. A rule like this is given:
lib mixture : source.f csource.cpp ;
bjam -a -d2 mixture link=shared
leads to the following output:
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
As you can see, only the cpp-object was compiled using "-fPIC".
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.
Cheers, Jan.
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 13 years ago
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 : <toolset>intel ; exe main : main.cpp a ;
This is untested code, beware.
Thanks, Volodya
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'.
Thanks, Volodya