On 11/8/05, Christian Joensson <[EMAIL PROTECTED]> wrote:
> On 11/8/05, Jakub Jelinek <[EMAIL PROTECTED]> wrote:
> > On Tue, Nov 08, 2005 at 05:00:43PM +0100, Christian Joensson wrote:
> > > Sure, here's the (relevant(?) part of) generated libgomp_f.h:
> > >
> > > static inline void
> > > omp_check_defines (void)
> > > {
> > >   char test[(24 != sizeof (omp_lock_t)
> > >            || 4 != __alignof (omp_lock_t)
> > >            || 24 != sizeof (omp_nest_lock_t)
> > >            || 4 != __alignof (omp_nest_lock_t)
> > >            || 8 != sizeof (*(omp_lock_arg_t) 0)
> > >            || 8 != sizeof (*(omp_nest_lock_arg_t) 0))
> > >           ? -1 : 1] __attribute__ ((__unused__));
> > > }
> >
> > That smells like libgomp_f.h has been generated before linux/sparc and linux
> > have been added to the search path.
> > Can you remove it and make so that it will be recreated?
> > If on the first line is still not 4, please investigate with what exact
> > options is the mkomp_h.pl script called and why it doesn't include
> > config/linux/omp-lock.h instead of config/posix/omp-lock.h.
>
>
> Before I experiment with that, pls note that the compiler is (default)
> configured for target sparc64-unknown-linux-gnu and with the configure
> option --with-cpu=v7 resulting in default v7 (32-bit) code. May this
> "trick" be the trouble here?


simply deleting the file libgomp_f.h does not work. I get this new
file generated, different:

diff -c sparc64-unknown-linux-gnu/libgomp/libgomp_f.h ~/libgomp_f.h
*** sparc64-unknown-linux-gnu/libgomp/libgomp_f.h       2005-11-08
18:53:55.000000000 +0100
--- /home/chj/libgomp_f.h       2005-10-30 02:45:09.000000000 +0200
***************
*** 39,46 ****
  #include <inttypes.h>
  #endif

! #if (4 == 4) \
!     && (4 <= 4)
  # define OMP_LOCK_DIRECT
  typedef omp_lock_t *omp_lock_arg_t;
  # define omp_lock_arg(arg) (arg)
--- 39,46 ----
  #include <inttypes.h>
  #endif

! #if (24 == 8) \
!     && (4 <= 24)
  # define OMP_LOCK_DIRECT
  typedef omp_lock_t *omp_lock_arg_t;
  # define omp_lock_arg(arg) (arg)
***************
*** 49,56 ****
  # define omp_lock_arg(arg) ((arg)->lock)
  # endif

! #if (8 == 8) \
!     && (4 <= 8)
  # define OMP_NEST_LOCK_DIRECT
  typedef omp_nest_lock_t *omp_nest_lock_arg_t;
  # define omp_nest_lock_arg(arg) (arg)
--- 49,56 ----
  # define omp_lock_arg(arg) ((arg)->lock)
  # endif

! #if (24 == 8) \
!     && (4 <= 24)
  # define OMP_NEST_LOCK_DIRECT
  typedef omp_nest_lock_t *omp_nest_lock_arg_t;
  # define omp_nest_lock_arg(arg) (arg)
***************
*** 62,72 ****
  static inline void
  omp_check_defines (void)
  {
!   char test[(4 != sizeof (omp_lock_t)
             || 4 != __alignof (omp_lock_t)
!            || 8 != sizeof (omp_nest_lock_t)
             || 4 != __alignof (omp_nest_lock_t)
!            || 4 != sizeof (*(omp_lock_arg_t) 0)
             || 8 != sizeof (*(omp_nest_lock_arg_t) 0))
            ? -1 : 1] __attribute__ ((__unused__));
  }
--- 62,72 ----
  static inline void
  omp_check_defines (void)
  {
!   char test[(24 != sizeof (omp_lock_t)
             || 4 != __alignof (omp_lock_t)
!            || 24 != sizeof (omp_nest_lock_t)
             || 4 != __alignof (omp_nest_lock_t)
!            || 8 != sizeof (*(omp_lock_arg_t) 0)
             || 8 != sizeof (*(omp_nest_lock_arg_t) 0))
            ? -1 : 1] __attribute__ ((__unused__));
  }

and the compile ends the same:

/usr/local/src/branch/objdir.gomp/./gcc/xgcc
-B/usr/local/src/branch/objdir.gomp/./gcc/
-B/usr/local/sparc64-unknown-linux-gnu/bin/
-B/usr/local/sparc64-unknown-linux-gnu/lib/ -isystem
/usr/local/sparc64-unknown-linux-gnu/include -isystem
/usr/local/sparc64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I.
-I../../../../gcc.gomp/libgomp -I.
-I../../../../gcc.gomp/libgomp/config/linux/sparc
-I../../../../gcc.gomp/libgomp/config/linux
-I../../../../gcc.gomp/libgomp/config/posix
-I../../../../gcc.gomp/libgomp -Wall -Werror -pthread
-ftls-model=initial-exec -O2 -g -O2 -m64 -MT env.lo -MD -MP -MF
.deps/env.Tpo -c ../../../../gcc.gomp/libgomp/env.c  -fPIC -DPIC -o
.libs/env.o
In file included from ../../../../gcc.gomp/libgomp/env.c:32:
./libgomp_f.h: In function 'omp_check_defines':
./libgomp_f.h:71: error: size of array 'test' is negative

--
Cheers,

/ChJ

Reply via email to