Re: :dll and linking to other libraries

Magnus Therning <[email protected]> Mon, 26 Jul 2004 14:47:03 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
On Mon, Jul 26, 2004 at 10:33:52AM +0200, Bram Moolenaar wrote:
>
>Magnus Therning wrote:
>
>> >It appears you are using Linux-specific things.  Aap tries to be
>> >portable, thus not rely on system-specific implementation of commands.
>> 
>> Well, I'd argue that part of the portability of a tool would be that it
>> adapts to the platform and its tools. On Windows it adapts and uses the
>> M$ tools, why doesn't it adapt to Linux?
>
>Aap recipes should not contain system-specific things, if possible.
>Then the same recipe runs on many systems.  The system-specific
>behavior should be restricted to a few places.
>
>Main problem with portability is all the different arguments you can
>give to a compiler.  These are not very portable.  The only sort-of
>standard that exists is what the original Unix cc accepts.  gcc and msvc
>have added lots of non-standard arguments.

Well, in this particular case the only thing that needs to be done is to
set $SHLINK to 'gcc -shared' by default. I believe this is usable for
gcc on all platforms.

>> The line
>> 
>>  LD = gcc
>> 
>> has absolutely no effect on :dll rules for me, linking is still done
>> with 'ld -shared'.
>
>Sorry, $LD is only used for normal linking.  For a shared library
>$SHLINK is used.

Hmm, yes, that seems to be the case. A little confusing that there are
only two $(SH...) variables and seven $(DLL...) variables ;-)

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
[email protected]
http://magnus.therning.org/

The average knowledge worker will outlive the average epmloying
organisation. This is the first time in history that this has happened.
     -- Peter Drucker
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBBP1HiMWTaatN+6QRAqZqAJ9fv5YHAvgUl2fJc/3w4oqrsJbL8QCdGx1o
W92QGQa4i0QZRNkA4V4JWTs=
=EeVt
-----END PGP SIGNATURE-----