This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,build] Build libgfortran and libgomp as DLL on win32


>> For symbol versioning, configure checks that -shared
>> -Wl,--version-script is supported, and finds that it is. So, it's
>> passed as linker flags (e.g.,
>> -Wl,--version-script=$(srcdir)/gfortran.map). I don't know how to
>> check the resulting DLL to see if symbol versioning is indeed present,
>> but if you tell me how to do it, I will.
>
> This seems wrong.  There is no such thing as symbol versioning on PE so
> this test should fail.

Well, maybe --version-script is a no-op, but it's accepted by the linker.

> IMO the best user experience would be achieved by assuming the user has
> pthreads-win32 and adding -lpthreadGC2 via the specs file when -fopenmp
> is specified.  If the user doesn't have the pthread library installed
> they get a link error, but that's better than the alternative where the
> user has to specify "-fopenmp -lpthreadGC2".

There is no need to use -lpthreadGC2: -fopenmp gives -lpthread to the
linker, and libpthread.a implies that pthreadGC2.dll comes into play.
You never have to specify -lpthreadGC2.

>> OK, well, I've expanded my patch to also allow building DLLs for
>> libssp and libstdc++-v3. Please find attached the new patch and
>> ChangeLog. Build maintainers, OK to commit?
>
> I think this issue is a lot more involved than simply adding
> -no-undefined.  What about __declspec(dllimport) in the libstdc++
> headers?  Otherwise you rely on auto-import which has its own problems.

OK, I then withdraw the updated patch. I'll let C++ or mingw
maintainers deal with it.

Thanks,
FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]