[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.0

--- Comment #15 from Jonathan Wakely  ---
thanks - closing then


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #14 from Thomas Preud'homme  ---
(In reply to Jonathan Wakely from comment #13)
> This should be fixed now, please check.

It is indeed. Thanks.


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

Jonathan Wakely  changed:

   What|Removed |Added

Version|unknown |6.0

--- Comment #13 from Jonathan Wakely  ---
This should be fixed now, please check.


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #12 from Jonathan Wakely  ---
Author: redi
Date: Thu May 14 11:47:19 2015
New Revision: 223194

URL: https://gcc.gnu.org/viewcvs?rev=223194&root=gcc&view=rev
Log:
PR libstdc++/66018
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for struct
dirent.d_type.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac (AC_STRUCT_DIRENT_D_TYPE): Remove.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/acinclude.m4
trunk/libstdc++-v3/config.h.in
trunk/libstdc++-v3/configure
trunk/libstdc++-v3/configure.ac


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #11 from Jonathan Wakely  ---
It seems very intentional, not a bug. I have a patch to stop using it but I
can't regenerate the configure script because of the move to automake-1.11.6


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #10 from Thomas Preud'homme  ---
(In reply to Jonathan Wakely from comment #9)
> I think the right solution is just to stop using AC_STRUCT_DIRENT_D_TYPE
> which expands to the opendir link test.
> 
> The autoconf manual doesn't say anything about it doing a link test, I was
> only trying to find whether DIR.d_type exists :-(

It links to check which library contains opendir. I'm not sure why it searches
this though. Maybe a bug in autoconf?

Best regards,

Thomas


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #9 from Jonathan Wakely  ---
I think the right solution is just to stop using AC_STRUCT_DIRENT_D_TYPE which
expands to the opendir link test.

The autoconf manual doesn't say anything about it doing a link test, I was only
trying to find whether DIR.d_type exists :-(


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-14 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

Thomas Preud'homme  changed:

   What|Removed |Added

 CC||thopre01 at gcc dot gnu.org

--- Comment #8 from Thomas Preud'homme  ---
(In reply to Christophe Lyon from comment #6)
> Looking at libstdc++'s config.log, I noticed that GCC_NO_EXECUTABLES is set
> because the default GCC link command fails on aarch64-none-elf and
> arm-none-eabi --with-mode=thumb because librdimon.a is not used by default.

GCC_NO_EXECUTABLES is set whenever cross-compilation is done (see around line
55 in libstdc++-v3/configure.ac). This is because in such a case host headers
cannot be used.

> 
> Could it be that this opendir test is the first link test in libstc++'s
> configure for those targets? (And thus that the above problem was unnoticed
> for months?)

Not months, just a few days. The change that introduced this issue is the
addition of AC_STRUCT_DIRENT_D_TYPE in libstdc++-v3/configure.ac as part of
@222654. Commenting this directive allows the build to work.


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #7 from Christophe Lyon  ---
Setting LDFLAGS_FOR_TARGET=-specs=rdimon.specs works for me for
aarch64-none-elf.

Is it expected that we have to use such settings for the build to succeed?


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #6 from Christophe Lyon  ---
Looking at libstdc++'s config.log, I noticed that GCC_NO_EXECUTABLES is set
because the default GCC link command fails on aarch64-none-elf and
arm-none-eabi --with-mode=thumb because librdimon.a is not used by default.

Could it be that this opendir test is the first link test in libstc++'s
configure for those targets? (And thus that the above problem was unnoticed for
months?)


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-13 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #5 from kugan at gcc dot gnu.org ---
For aarch64-none-elf it fails during.

01:53:39 checking for dirent.h that defines DIR... no
01:53:39 checking for sys/ndir.h that defines DIR... no
01:53:39 checking for sys/dir.h that defines DIR... no
01:53:39 checking for ndir.h that defines DIR... no
01:53:39 checking for library containing opendir... configure: error:
Link tests are not allowed after GCC_NO_EXECUTABLES.
01:53:39 Makefile:10143: recipe for target
'configure-target-libstdc++-v3' failed
01:53:39 make[1]: *** [configure-target-libstdc++-v3] Error 1

this error comes from (in libstdc++-v3/configure.ac which was not
present in 4.9 branch)

This comes from:
# For Filesystem TS.
AC_CHECK_HEADERS([fcntl.h dirent.h sys/statvfs.h utime.h])
AC_STRUCT_DIRENT_D_TYPE
GLIBCXX_ENABLE_FILESYSTEM_TS
GLIBCXX_CHECK_FILESYSTEM_DEPS

According to the documentation:
— Macro: AC_STRUCT_DIRENT_D_TYPE
Perform all the actions of AC_HEADER_DIRENT (see Particular
Headers). Then, if struct dirent contains a d_type member, define
HAVE_STRUCT_DIRENT_D_TYPE.

and:
Macro: AC_HEADER_DIRENT
Check for the following header files. For the first one that is
found and defines `DIR', define the listed C preprocessor macro:

`dirent.h'  HAVE_DIRENT_H
`sys/ndir.h'HAVE_SYS_NDIR_H
`sys/dir.h' HAVE_SYS_DIR_H
`ndir.h'HAVE_NDIR_H

Is libstdc++-v3 supposed to ignore this or should newlib supposed to have this
defined in the appropriate header?

[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #4 from Andreas Schwab  ---
What collect2 is looking for is configured during build, see the gcc/collect-ld
script in the build directory.


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-07 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

--- Comment #3 from chrbr at gcc dot gnu.org ---
having ld in the $(prefix)/$(triplet)/bin fixes the issue.

it seems that collect2 doesn't look for $(prefix)/bin/$(triplet)-ld as before


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-07 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

clyon at gcc dot gnu.org changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #2 from clyon at gcc dot gnu.org ---
Same error for aarch64*elf targets.


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-06 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

chrbr at gcc dot gnu.org changed:

   What|Removed |Added

 CC||chrbr at gcc dot gnu.org

--- Comment #1 from chrbr at gcc dot gnu.org ---
same error building arm-none-eabi multilibs

checking for library containing opendir... configure: error: Link tests are not
allowed after GCC_NO_EXECUTABLES.
make[3]: *** [configure-target-libstdc++-v3] Error 1


[Bug libstdc++/66018] opendir configure test not working when GCC_NO_EXECUTABLES

2015-05-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-05-05
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1