This is the mail archive of the libc-alpha@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]

Commit 4efeffc1d583597e4f52985b9747269e47b754e2 breaks trunk for i386and x86_64 on older GCCs.


Ulrich,

The commit 4efeffc1d583597e4f52985b9747269e47b754e2 breaks trunk for
i386 and x86_64 when building with GCC 4.5.2 and GCC 4.3.2
respectively.

This breakage is because older GCC's don't automatically allow
multiple identical typedefs (C11).

We still need to support older GCCs.

Could you please fix this breakage?

On i386:
~~~
mkdir /home/carlos/build/glibc/setjmp
gcc ../sysdeps/i386/setjmp.S -c   -I../include
-I/home/carlos/build/glibc/setjmp -I/home/carlos/build/glibc
-I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686
-I../sysde
ps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux
-I../nptl/sysdeps/pthread -I../sysdeps/pthread -
I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../
nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix
-I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I
../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch
-I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686
-I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486
-I../sysdeps/i386/fpu -I
../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/g
eneric/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio
-I. -nostdinc -isystem
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include -isystem
/usr/lib/i386-linux-gnu/g
cc/i686-linux-gnu/4.5.2/include-fixed -isystem
/home/carlos/build/linux-2.6-headers/include -D_LIBC_REENTRANT
-include ../include/libc-symbols.h       -DASSEMBLER  -DGAS_SYNTAX -g
-Wa,
--noexecstack  -Wa,-mtune=i686 -o
/home/carlos/build/glibc/setjmp/setjmp.o -MD -MP -MF
/home/carlos/build/glibc/setjmp/setjmp.o.dt -MT
/home/carlos/build/glibc/setjmp/setjmp.o
gcc sigjmp.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall
-Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -g
-march=i686 -Wstrict-prototypes   -Wa,-mtune=i686      -I../include
-I/home/carlos/build/glibc/setjmp -I/home/carlos/build/glibc
-I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686
-I../sysdeps/unix/sysv/linux/i386/i686
-I../nptl/sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux
-I../nptl/sysdeps/pthread -I../sysdeps/pthread
-I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix
-I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch
-I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686
-I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486
-I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic
-I../nptl -I../ports  -I.. -I../libio -I. -nostdinc -isystem
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include -isystem
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed
-isystem /home/carlos/build/linux-2.6-headers/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h       -o
/home/carlos/build/glibc/setjmp/sigjmp.o -MD -MP -MF
/home/carlos/build/glibc/setjmp/sigjmp.o.dt -MT
/home/carlos/build/glibc/setjmp/sigjmp.o
In file included from ../signal/signal.h:393:0,
                 from ../include/signal.h:5,
                 from sigjmp.c:20:
../nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h:42:3: error:
redefinition of typedef âpthread_attr_tâ
../sysdeps/unix/sysv/linux/bits/siginfo.h:273:30: note: previous
declaration of âpthread_attr_tâ was here
make[2]: *** [/home/carlos/build/glibc/setjmp/sigjmp.o] Error 1
~~~

On x86_64:
~~~
if test -r /scratch/carloso/build4-lucid-cs/build/glibc/csu/abi-tag.h.new;
then mv -f /scratch/carloso/build4-lucid-cs/build/glibc/csu/abi-tag.h.new
/scratch/carloso/build4-lucid-cs/build/glibc/csu/abi-tag.h; \
        else echo >&2 'This configuration not matched in ../abi-tags';
exit 1; fi
gawk -f ../scripts/gen-as-const.awk
../sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym \
        | gcc -S -o
/scratch/carloso/build4-lucid-cs/build/glibc/ucontext_i.hT3 -std=gnu99
-fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings
-fmerge-all-constants -fno-stack-protector -g -Wstrict-prototypes
  -I../include -I/scratch/carloso/build4-lucid-cs/build/glibc/csu
-I/scratch/carloso/build4-lucid-cs/build/glibc -I../sysdeps/x86_64/elf
-I../nptl/sysdeps/unix/sysv/linux/x86_64
-I../sysdeps/unix/sysv/linux/x86_64
-I../sysdeps/unix/sysv/linux/wordsize-64
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv
-I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/x86_64/fpu/multiarch
-I../sysdeps/x86_64/fpu -I../sysdeps/x86_64/multiarch
-I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64
-I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic
-I../nptl  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include
../include/libc-symbols.h       -x c - \
                -MD -MP -MF
/scratch/carloso/build4-lucid-cs/build/glibc/ucontext_i.h.dT -MT
'/scratch/carloso/build4-lucid-cs/build/glibc/ucontext_i.h.d
/scratch/carloso/build4-lucid-cs/build/glibc/ucontext_i.h'
In file included from ../signal/signal.h:393,
                 from ../include/signal.h:5,
                 from <stdin>:2:
../nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h:55: error:
redefinition of typedef 'pthread_attr_t'
../sysdeps/unix/sysv/linux/bits/siginfo.h:273: error: previous
declaration of 'pthread_attr_t' was here
make[2]: *** [/scratch/carloso/build4-lucid-cs/build/glibc/ucontext_i.h] Error 1
make[2]: Leaving directory `/scratch/carloso/build4-lucid-cs/src/glibc/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/scratch/carloso/build4-lucid-cs/src/glibc'
make: *** [all] Error 2
~~~

Fixing x86_64 with the following quick hack:
~~~
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
index 7cbb200..29ee160 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
@@ -47,13 +47,18 @@
    exposed on purpose.  */
 typedef unsigned long int pthread_t;

-
-typedef union __pthread_attr
+#if !defined __have_pthread_attr
+typedef
+#endif
+union __pthread_attr
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
   long int __align;
+#if !defined __have_pthread_attr
 } pthread_attr_t;
-
+#else
+};
+#endif

 #if __WORDSIZE == 64
 typedef struct __pthread_internal_list
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h
b/sysdeps/unix/sysv/linux/bits/siginfo.h
index 0635e2f..3565bd9 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -269,8 +269,11 @@ enum
 #  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
 # endif

+#if !defined _BITS_PTHREADTYPES_H
 /* Forward declaration.  */
 typedef union __pthread_attr pthread_attr_t;
+# define __have_pthread_attr
+#endif

 typedef struct sigevent
   {
~~~

Leads to another build error:
~~~
In file included from ../include/uchar.h:1,
                 from mbrtoc16.c:23:
../wcsmbs/uchar.h:47:5: error: #error "<uchar.h> requires ISO C11 mode"
In file included from ../include/uchar.h:1,
                 from mbrtoc16.c:23:
../wcsmbs/uchar.h:52: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'char16_t'
../wcsmbs/uchar.h:53: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'char32_t'
../wcsmbs/uchar.h:61: error: expected ')' before '*' token
../wcsmbs/uchar.h:66: error: expected declaration specifiers or '...'
before 'char16_t'
../wcsmbs/uchar.h:73: error: expected ')' before '*' token
../wcsmbs/uchar.h:78: error: expected declaration specifiers or '...'
before 'char32_t'
mbrtoc16.c:37: error: expected ')' before '*' token
make[2]: *** [/scratch/carloso/build4-lucid-cs/build/glibc/wcsmbs/mbrtoc16.o]
Error 1
make[2]: Leaving directory `/scratch/carloso/build4-lucid-cs/src/glibc/wcsmbs'
make[1]: *** [wcsmbs/subdir_lib] Error 2
make[1]: Leaving directory `/scratch/carloso/build4-lucid-cs/src/glibc'
make: *** [all] Error 2
~~

This is another, and different, GCC issues e.g. predefines of
__CHAR16_TYPE__ and __CHAR32_TYPE__ (new to 4.4).

Cheers,
Carlos.


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