On Linux, when generating a shared library and the file extension given to "-of" is not "so", dmd always replaces it with "so".
i.e.
$ dmd -shared -oflibfoo.so.0.2.6 foo.o
generates "libfoo.so.0.2.so" when expected "libfoo.so.0.2.6"
"release" version number is incorrectly replaced by "so"
Comment #1 by andrej.mitrovich — 2013-01-13T08:15:11Z
My guess is this is to blame in dmars.c:
// None of that a.out stuff. Use explicit exe file name, or
// generate one from name of first source file.
global.params.exefile = FileName::forceExt(global.params.exefile, global.dll_ext)->toChars();
If the only thing wanted is to replace "a.out" with "a.so", then `forceExt` should check the extension before attempting to replace it.
@Walter what's your take?