[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-07 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #10 from Oleg Endo  ---
Sorry for the trouble, but Joseph has a point here ...
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00414.html

Could you guys please try moving the problematic header includes in sh.c below
the #include "config.h" and report your findings?  Thanks.


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-05 Thread jbg...@lug-owl.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #9 from Jan-Benedict Glaw  ---
> Could you please try to add an
> 
> #include 
> 
> before the C++ includes and see if it resolves some of the errors/changes
> anything?  It's probably not going to be the final fix for the problem, but
> might give some clues.

I've added it there, though it might take a while until that target is built
again on that host. (Just for the notes: The host is AIX 7 on PPC, using GCC,
thus it's not the somewhat more usual Linux-based building...)


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-05 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #8 from Oleg Endo  ---
(In reply to Jan-Benedict Glaw from comment #7)
> I'm not 100% sure, but I guess this fix breaks building GCC on
> gcc111.fsffrance.org .  All build details can be found here:
> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=218196


Looks like an include order problem of C system includes and C++ stdlib
includes, probably caused by specific clib / C++ stdlib versions or
combinations on the system.

Could you please try to add an

#include 

before the C++ includes and see if it resolves some of the errors/changes
anything?  It's probably not going to be the final fix for the problem, but
might give some clues.


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-05 Thread jbg...@lug-owl.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #7 from Jan-Benedict Glaw  ---
I'm not 100% sure, but I guess this fix breaks building GCC on
gcc111.fsffrance.org .  All build details can be found here:
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=218196


The actual error message is:

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common 
-DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc
-I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-latest/include
-I/opt/cfarm/mpfr-latest/include -I/opt/cfarm/mpc-latest/include 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o sh.o -MT sh.o -MMD -MP -MF
./.deps/sh.TPo /home/jbglaw/repos/gcc/gcc/config/sh/sh.c
In file included from /home/jbglaw/repos/gcc/gcc/system.h:262:0,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/unistd.h:201:41: error: declaration of C function 'off64_t
lseek64(int, off64_t, int)' conflicts with
 extern off64_t lseek64(int, off64_t, int);
 ^
/usr/include/unistd.h:199:14: error: previous declaration 'off_t lseek64(int,
off_t, int)' here
 extern off_t lseek(int, off_t, int);
  ^
In file included from /usr/include/unistd.h:844:0,
 from /home/jbglaw/repos/gcc/gcc/system.h:262,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/sys/lockf.h:64:39: error: declaration of C function 'int
lockf64(int, int, off64_t)' conflicts with
  extern int lockf64 (int, int, off64_t);
   ^
/usr/include/sys/lockf.h:62:13: error: previous declaration 'int lockf64(int,
int, off_t)' here
  extern int lockf (int, int, off_t);
 ^
In file included from /home/jbglaw/repos/gcc/gcc/system.h:262:0,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/unistd.h:917:38: error: declaration of C function 'int
ftruncate64(int, off64_t)' conflicts with
  extern int  ftruncate64(int, off64_t);
  ^
In file included from /home/jbglaw/repos/gcc/gcc/system.h:262:0,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/unistd.h:915:14: error: previous declaration 'int ftruncate64(int,
off_t)' here
  extern int  ftruncate(int, off_t);
  ^
In file included from /home/jbglaw/repos/gcc/gcc/system.h:262:0,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/unistd.h:974:46: error: declaration of C function 'int
truncate64(const char*, off64_t)' conflicts with
  extern int  truncate64(const char *, off64_t);
  ^
In file included from /home/jbglaw/repos/gcc/gcc/system.h:262:0,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/unistd.h:972:14: error: previous declaration 'int truncate64(const
char*, off_t)' here
  extern int  truncate(const char *, off_t);
  ^
In file included from /home/jbglaw/repos/gcc/gcc/system.h:262:0,
 from /home/jbglaw/repos/gcc/gcc/config/sh/sh.c:27:
/usr/include/unistd.h:993:54: error: declaration of C function 'ssize_t
pread64(int, void*, size_t, off64_t)' conflicts with
  extern ssize_t  pread64(int, void *, size_t, off64_t);
  ^
/usr/include/unistd.h:990:18: error: previous declaration 'ssize_t pread64(int,
void*, size_t, off_t)' here
  extern ssize_t  pread(int, void *, size_t, off_t);
  ^
/usr/include/unistd.h:994:61: error: declaration of C function 'ssize_t
pwrite64(int, const void*, size_t, off64_t)' conflicts with
  extern ssize_t  pwrite64(int, const void *, size_t, off64_t);
 ^
/usr/include/unistd.h:991:18: error: previous declaration 'ssize_t
pwrite64(int, const void*, size_t, off_t)' here
  extern ssize_t  pwrite(int, const void *, size_t, off_t);
  ^
/usr/include/unistd.h:1079:38: error: declaration of C function 'off64_t
fclear64(int, off64_t)' conflicts with
  extern off64_t fclear64(int, off64_t);
  ^
/usr/include/unistd.h:1076:15: error: previous declaration 'off_t fclear64(int,
off_t)' here
  extern off_t fclear(int, off_t);
   ^
/usr/include/unistd.h:1080:53: error: declaration of C function 'int
fsync_range64(int, int, off64_t, off64_t)' conflicts with
  extern int fsync_range64(int, int, off64_t, off64_t);
 ^
/usr/include/unistd.h:1077:13: e

[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

Oleg Endo  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Oleg Endo  ---
Fixed on trunk, 4.9 and 4.8.


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #5 from Oleg Endo  ---
Author: olegendo
Date: Sat May  3 08:21:24 2014
New Revision: 210030

URL: http://gcc.gnu.org/viewcvs?rev=210030&root=gcc&view=rev
Log:
Back port from mainline
PR target/61026
* config/sh/sh.c: Include stdlib headers before everything else.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/sh/sh.c


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #4 from Oleg Endo  ---
Author: olegendo
Date: Sat May  3 08:17:43 2014
New Revision: 210029

URL: http://gcc.gnu.org/viewcvs?rev=210029&root=gcc&view=rev
Log:
Back port from mainline
PR target/61026
* config/sh/sh.c: Include stdlib headers before everything else.


Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/sh/sh.c


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #3 from Oleg Endo  ---
Author: olegendo
Date: Sat May  3 07:51:02 2014
New Revision: 210028

URL: http://gcc.gnu.org/viewcvs?rev=210028&root=gcc&view=rev
Log:
PR target/61026
* config/sh/sh.c: Include stdlib headers before everything else.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.c


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-03 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

Oleg Endo  changed:

   What|Removed |Added

 Target||sh*-*-*
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-05-03
 CC||olegendo at gcc dot gnu.org
 Ever confirmed|0   |1


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-01 Thread joel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

Joel Sherrill  changed:

   What|Removed |Added

 CC||joel at gcc dot gnu.org

--- Comment #2 from Joel Sherrill  ---
Created attachment 32721
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32721&action=edit
Fix for gcc 4.8.2


[Bug target/61026] sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).

2014-05-01 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026

--- Comment #1 from Jonathan Wakely  ---
I think the C++ headers (,  and ) need to be
included before the GCC headers that poison malloc. The actual culprit is
 but there's no guarantee the others don't use malloc.