[phobos] 32 and 64 bit libraries on Linux

Michel Fortin michel.fortin at michelf.com
Mon Jan 3 16:09:59 PST 2011


Le 2011-01-03 à 18:49, Walter Bright a écrit :

> Michel Fortin wrote:
>> And on OS X, multiple architectures are generally merged in the same library/executable file as a "fat" or "universal" binary. Use the command "lipo" to create one.
>> 
>> A naming change like this would break D for Xcode. So I'll have to release a new version and to keep it backward compatible for those who stick with older versions of DMD I'd have some detection job to do. On the other hand, creating a fat library using "lipo" wouldn't cause any disruption...
> 
> Doing 64 bit OSX is a bit down the road. I don't think Linux supports such fat libraries.

Right. But what I should have said is that changing the path for the 32 bit version can easily disrupt existing toolchains. For instance, someone who wants to link both C, C++ and D code together is likely not using DMD as the driver for the linker, which implies the use of a hard-coded path to phobos; in this case changing the library's path will break things.

An option would be to keep the 32-bit version as is, and put the 64-bit version in lib64. Or you could add a symlink lib/libphobos.a pointing to lib32/libpobos.a which would keep things working as before.

Or, on the other hand, people like me can also update the toolchain (in my case that'd be when the Mac OS X version is ready).

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/





More information about the phobos mailing list