libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -no-undefined on Win32


From: Evgeny Grin
Subject: Re: -no-undefined on Win32
Date: Mon, 28 Apr 2014 23:26:25 +0400


20.04.2014, 05:15, "Bob Friesenhahn" <address@hidden>:
> On Fri, 18 Apr 2014, Evgeny Grin wrote:
>
>>>  Libtool always defaults to successful compilation and link, to the
>>>  maximum extent possible.
>>  That's nice, leave it to compiler and linker. If something can be compiled 
>> and linked, it will be compiled and linked. If it can't be, then compiler or 
>> linker will fail. Why giving up before even try?
>
> The GNU/Autoconf philosophy has always been that if software
> configures successfully that there should be a very high probability
> that the sofware will compile and work.  Success at compiling on
> several platforms should indicate that it is highly likely to also
> compile on other platforms (including platforms that the package
> authors don't have access to).
>
> If the software fails to compile, or fails to work, there is
> substantial possibility that the user won't know how to solve the
> problem.

Good. But requiring "-no-undefined" for Win32 flag lower probability of 
successful compile.
It's absolutely normal that something can be compiled on one system and can't 
be on other system. According autoconf paradigm, code should be compiled if it 
use platform supported features. So "configure" checks host and target 
platforms, compiler, linker and other things and do dirty work to create 
correct configuration in makefiles, libtool, compiler wrapper etc.
But if code designed to use some platform dependent features like epoll and 
epoll is not available on target platform then compile will fail.
So let's add to libtool "-disable-epoll" flag and let libtool fail if target 
platform don't support epoll and this flag is not specified.
It's far more logical to use flags like other GNU tools (GCC, binutils) use it. 
For example, this fictional flag "-disable-epoll" must prevent epoll usage on 
platforms that support epoll so code with epoll functions will fail to compile. 
On platforms without epoll support, code with epoll function will fail to 
comple in any case.
Undefined symbols is just one of platform features.

I can repeat again, let's simplify developer work instead of complicating. 
libtool must use "-no-undefined" for win32 targets automatically.

Best Wishes,
Evgeny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]