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

2012-09-19 Thread Peter Rosin
* 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 p...@lysator.liu.se
---
 tests/deplibs-mingw.at |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Ok to push?
Or should I simply rename the LDFLAGS variable?  To my_LDFLAGS?

Cheers,
Peter

diff --git a/tests/deplibs-mingw.at b/tests/deplibs-mingw.at
index 6973c4f..dd2b8e8 100644
--- a/tests/deplibs-mingw.at
+++ b/tests/deplibs-mingw.at
@@ -31,6 +31,7 @@ cwd=`pwd`
 instdir=$cwd/inst
 libdir=$instdir/lib
 bindir=$instdir/bin
+save_LDFLAGS=$LDFLAGS
 LDFLAGS=$LDFLAGS -no-undefined

 mkdir inst inst/bin inst/lib
@@ -76,7 +77,9 @@ EOF
   cd new-libtool
   # configure might fail due to in-tree build of toplevel, or
   # missing configure flags and other reasons.
+  LDFLAGS=$save_LDFLAGS
   LT_AT_CONFIGURE([|| exit 77], [$abs_top_srcdir/configure])
+  LDFLAGS=$LDFLAGS -no-undefined
   cd ..
   LIBTOOL=new-libtool/libtool
   export LIBTOOL
--
1.7.9



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

2012-09-19 Thread Roumen Petrov

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 p...@lysator.liu.se
---
  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.



Roumen




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

2012-09-19 Thread Peter Rosin
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 p...@lysator.liu.se
 ---
   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).

So, the patch upgrades this completely bogus skip to a pass on
real MinGW.

Cheers,
Peter




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

2012-09-19 Thread Roumen Petrov

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 p...@lysator.liu.se
---
   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