Re: [PATCH] tests: don't feed -no-undefined to the linker during, configure.

Roumen Petrov <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
Peter Rosin wrote:
> On 2012-09-19 21:25, Roumen Petrov wrote:
>> Peter Rosin wrote:
>>> * tests/deplibs-mingw.at: Restore LDFLAGS for the configure run so that
>>> the linker does not see -no-undefined. Makes the test pass instead of
>>> skip on MinGW.
>>>
>>> Signed-off-by: Peter Rosin <[email protected]>
>>> ---
>>>    tests/deplibs-mingw.at |    3 +++
>>>    1 files changed, 3 insertions(+), 0 deletions(-)
>>>
>>> Ok to push?
>> No idea. It pass to me with git code , cross build, tested in emulated environment.
> It's strange that you get a pass, if you have mingw.
>
> Note that the test is a bit weird in that it passes instead
> of skips on $host_os != mingw*, so are you sure you even get
> into the inner configure with your setup? Because if you do,
> your compiler must accept -no-undefined and that seems
> unlikely to me.
>
> Anyway, in my non-cross, non-emulated setup, the test skips on
> line 79:
>
> LT_AT_CONFIGURE([|| exit 77], ["$abs_top_srcdir"/configure])
>
> where configure bombs out with the compiler not being able to
> create executables (due to gcc not understanding -no-undefined).
I see my regular test are based on 3.4.5, sometime with 4.4 .
I just tested with 4.6 and configure "bombs".


So with oldest version gcc just warn as config.log show
..................
configure:3695: i386-mingw32msvc-gcc --version >&5
i386-mingw32msvc-gcc (GCC) 3.4.5 (mingw special)
..........
configure:3726: checking whether the C compiler works
configure:3748: i386-mingw32msvc-gcc -O2 -fno-strict-aliasing -Wall 
-L/opt/mingw/lib -no-undefined conftest.c  >&5
i386-mingw32msvc-gcc: unrecognized option `-no-undefined'
configure:3752: $? = 0
configure:3800: result: yes
..................


> So, the patch upgrades this completely bogus skip to a pass on
> real MinGW.
With newer gcc versions only. Probably behavior is changed in 4.5.

So patch is required.


> Cheers,
> Peter
>

Roumen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.