Bug 35915 - [4.4 Regression] atomic.cc:31:20: error: stdint.h: No such file
Summary: [4.4 Regression] atomic.cc:31:20: error: stdint.h: No such file
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Andreas Tobler
URL:
Keywords:
Depends on: 448 35221
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-12 17:45 UTC by John David Anglin
Modified: 2008-04-20 21:00 UTC (History)
3 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed: 2008-04-14 19:37:17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2008-04-12 17:45:48 UTC
libtool: compile:  /test/gnu/gcc/objdir/./gcc/xgcc -shared-libgcc -B/test/gnu/gc
c/objdir/./gcc -nostdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc+
+-v3/src -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/
opt/gnu/gcc/gcc-4.4.0/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.4.0/hppa2.
0w-hp-hpux11.11/lib/ -isystem /opt/gnu/gcc/gcc-4.4.0/hppa2.0w-hp-hpux11.11/inclu
de -isystem /opt/gnu/gcc/gcc-4.4.0/hppa2.0w-hp-hpux11.11/sys-include -I/test/gnu
/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/
test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/g
cc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings 
-Wcast-qual -fdiagnostics-show-location=once -g -O2 -x c++ -std=gnu++0x -c ../..
/../../gcc/libstdc++-v3/src/atomic.cc  -fPIC -DPIC -o .libs/atomic.o
../../../../gcc/libstdc++-v3/src/atomic.cc:31:20: error: stdint.h: No such file 
or directory
../../../../gcc/libstdc++-v3/src/atomic.cc:55: warning: unused parameter '__x'
../../../../gcc/libstdc++-v3/src/atomic.cc:73: warning: unused parameter '__x'
../../../../gcc/libstdc++-v3/src/atomic.cc: In function 'volatile std::atomic_fl
ag* std::__atomic_flag_for_address(const volatile void*)':
../../../../gcc/libstdc++-v3/src/atomic.cc:106: error: 'uintptr_t' was not decla
red in this scope
../../../../gcc/libstdc++-v3/src/atomic.cc:106: error: expected ';' before '__u'
../../../../gcc/libstdc++-v3/src/atomic.cc:107: error: '__u' was not declared in
 this scope
../../../../gcc/libstdc++-v3/src/atomic.cc: At global scope:
../../../../gcc/libstdc++-v3/src/atomic.cc:104: warning: unused parameter '__z'
make[4]: *** [atomic.lo] Error 1
Comment 1 Paolo Carlini 2008-04-13 09:39:46 UTC
CC-ing Benjamin...
Comment 2 Benjamin Kosnik 2008-04-14 19:37:17 UTC
Ah. Well, I see that this is the second time I broke stuff on stdint.h.

I must fix this correctly, apparently. 

Mine...
Comment 3 Andreas Tobler 2008-04-14 19:42:31 UTC
happens on sparc-solaris2.8 as well. sparc-solaris2.10 is not affected.
Comment 4 Benjamin Kosnik 2008-04-15 19:21:01 UTC
Sorry about the delay folks. Trying to track down some config issues, and so far failing to get a local xcompiler up so I can test locally a config w/o stdint.h provided.

Goal is to use GCC_HEADER_STDINT(gstdint.h) to construct a stdint.h that works when stdint.h is not found. When stdint.h is found, do nothing.

-benjamin
Comment 5 Benjamin Kosnik 2008-04-15 19:31:07 UTC
Sorry about the delay folks. Trying to track down some config issues, and so far failing to get a local xcompiler up so I can test locally a config w/o stdint.h provided.

Goal is to use GCC_HEADER_STDINT(gstdint.h) to construct a stdint.h that works when stdint.h is not found. When stdint.h is found, do nothing.

-benjamin
Comment 6 Andreas Tobler 2008-04-16 18:12:36 UTC
I have a patch in testing. Looks ok so far.
One question, is it ok to place gstdint.h into the include directory? And not like others in the toplevel build dir?

Index: configure.ac
===================================================================
--- configure.ac        (revision 134344)
+++ configure.ac        (working copy)
@@ -147,6 +147,8 @@
   GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
   GLIBCXX_CHECK_STDLIB_SUPPORT

+  GCC_HEADER_STDINT(include/gstdint.h) 
+
   # For showmanyc_helper().
   AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
   GLIBCXX_CHECK_POLL
Index: src/atomic.cc
===================================================================
--- src/atomic.cc       (revision 134344)
+++ src/atomic.cc       (working copy)
@@ -28,7 +28,7 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.

-#include <stdint.h>
+#include "gstdint.h"
 #include <cstdatomic>

 #define LOGSIZE 4
Comment 7 Benjamin Kosnik 2008-04-16 18:39:18 UTC
Hey Andreas. This is fine for the time being. 

If (include/gstdint.h) ends up being a problem (as include directory may not exist when being output?), you can just do (gstdint.h) and then add a special rule in include/Makefile.am for host_headers_noist to copy from  builddir to include dir.

Comment 8 Benjamin Kosnik 2008-04-16 18:52:44 UTC
in configure.ac please put 

GCC_STDINT

out of native/cross bit of configure, and run unconditionally like so:

GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])

GCC_HEADER_STDINT(include/gstdint.h)
Comment 9 Andreas Tobler 2008-04-16 20:56:54 UTC
Patch is here, the changes from comment #8 are included.

http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01320.html
Comment 10 Andreas Tobler 2008-04-16 21:30:53 UTC
Subject: Bug 35915

Author: andreast
Date: Wed Apr 16 21:30:11 2008
New Revision: 134368

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134368
Log:
2008-04-16  Andreas Tobler  <a.tobler@schweiz.org>

	PR libstdc++/35915
	* configure.ac: Use GCC_HEADER_STDINT.
	* src/atomic.cc: Include gstdint.h
	* configure: Regenerate.
	* Makefile.in: Likewise.
	* doc/Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.
	* aclocal.m4: Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/Makefile.in
    trunk/libstdc++-v3/aclocal.m4
    trunk/libstdc++-v3/configure
    trunk/libstdc++-v3/configure.ac
    trunk/libstdc++-v3/doc/Makefile.in
    trunk/libstdc++-v3/include/Makefile.in
    trunk/libstdc++-v3/libmath/Makefile.in
    trunk/libstdc++-v3/libsupc++/Makefile.in
    trunk/libstdc++-v3/po/Makefile.in
    trunk/libstdc++-v3/src/Makefile.in
    trunk/libstdc++-v3/src/atomic.cc
    trunk/libstdc++-v3/testsuite/Makefile.in

Comment 11 Andreas Tobler 2008-04-20 21:00:33 UTC
Compilation issues fixed. Both, on sparc and hpux. Confirmed myself.
We need to investigate the results of the atomic tests under HPUX. But if not satisfying, we will open a new PR.