This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug build/13966] Some elf tests fail with "fatal error: cstdio: No such file or directory" on trunk


http://sourceware.org/bugzilla/show_bug.cgi?id=13966

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-04-19 20:00:46 UTC ---
On Tue, 10 Apr 2012, carlos_odonell at mentor dot com wrote:

> I don't know how this worked in the past.
> 
> Compiling a C++ application with -nostdinc is not going to work.

If you don't use --with-headers - if you use your system's default kernel 
headers - then you don't get -nostdinc used, so don't see this.  (And 
that also covers the case of building a cross compiler and preinstalling 
the kernel headers into its default sysroot.)

There is code in configure.in that tries to locate the compiler's internal 
directories - including the C++ ones - for the case where -nostdinc is 
used.  So if it's not working in a particular case, I'd investigate, on 
the affected system, what is wrong with this configure code and how it 
needs to be fixed to find the right directories for C++ headers.

# if using special system headers, find out the compiler's sekrit
# header directory and add that to the list.  NOTE: Only does the right
# thing on a system that doesn't need fixincludes.  (Not presently a problem.)
if test -n "$sysheaders"; then
  SYSINCLUDES=-nostdinc
  for d in include include-fixed; do
    i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" &&
    SYSINCLUDES="$SYSINCLUDES -isystem $i"
  done
  SYSINCLUDES="$SYSINCLUDES \
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
  if test -n "$CXX"; then
    CXX_SYSINCLUDES=
    cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
    cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
    for d in include "$cxxmachine/include"; do
      i=../../../../$d/c++/$cxxversion
      cxxheaders=`$CXX -print-file-name="$i"` &&
      test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
      CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
    done
  fi
fi
AC_SUBST(SYSINCLUDES)
AC_SUBST(CXX_SYSINCLUDES)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]