[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib and pcc-1.0.0
From: |
Bruno Haible |
Subject: |
gnulib and pcc-1.0.0 |
Date: |
Fri, 8 Apr 2011 23:40:31 +0200 |
User-agent: |
KMail/1.9.9 |
Recently pcc version 1.0.0 was released. <http://pcc.ludd.ltu.se/>
How does gnulib work with it?
1) #include <math.h> leads to syntax errors. pcc does not grok the labeled
initializer syntax in /usr/include/bits/mathinline.h:
#if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
/* Test for negative number. Used in the signbit() macro. */
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
__extension__ union { float __f; int __i; } __u = { __f: __x };
My workaround: Provide a slighly modified <bits/mathinline.h>.
2)
-checking for lchmod... no
+checking for lchmod... yes
Apparently <gnu/stubs.h> does not work the same way.
3)
-checking whether isnan(long double) can be used without linking with libm...
yes
-checking whether isnanl works... no
+checking whether isnan(long double) can be used without linking with libm... no
+checking whether isnan(long double) can be used with libm... no
-checking whether isnan(float) can be used without linking with libm... yes
-checking whether isnan(float) works... yes
-checking whether isnan(double) can be used without linking with libm... yes
+checking whether isnan(float) can be used without linking with libm... no
+checking whether isnan(float) can be used with libm... no
+checking where to find the exponent in a 'float'... (cached) word 0 bit 23
+checking whether isnan(double) can be used without linking with libm... no
+checking whether isnan(double) can be used with libm... no
+checking where to find the exponent in a 'double'... word 1 bit 20
-checking whether isnan(double) can be used without linking with libm...
(cached) yes
-checking whether isnan(double) can be used without linking with libm...
(cached) yes
-checking whether isnan(float) can be used without linking with libm...
(cached) yes
-checking whether isnan(float) works... (cached) yes
-checking whether isnan(float) can be used without linking with libm...
(cached) yes
-checking whether isnan(float) works... (cached) yes
-checking whether isnan(long double) can be used without linking with libm...
(cached) yes
-checking whether isnanl works... (cached) no
+checking whether isnan(double) can be used without linking with libm...
(cached) no
+checking whether isnan(double) can be used with libm... (cached) no
+checking where to find the exponent in a 'double'... (cached) word 1 bit 20
+checking whether isnan(double) can be used without linking with libm...
(cached) no
+checking where to find the exponent in a 'double'... (cached) word 1 bit 20
+checking whether isnan(float) can be used without linking with libm...
(cached) no
+checking whether isnan(float) can be used with libm... (cached) no
+checking where to find the exponent in a 'float'... (cached) word 0 bit 23
+checking whether isnan(float) can be used without linking with libm...
(cached) no
+checking where to find the exponent in a 'float'... (cached) word 0 bit 23
+checking whether isnan(long double) can be used without linking with libm...
(cached) no
+checking whether isnan(long double) can be used with libm... (cached) no
checking where to find the exponent in a 'long double'... (cached) word 2 bit 0
-checking whether isnan(long double) can be used without linking with libm...
(cached) yes
-checking whether isnanl works... (cached) no
+checking whether isnan(long double) can be used without linking with libm...
(cached) no
Apparently pcc does not have the gcc builtins.
4)
-checking whether imported symbols can be declared weak... yes
+checking whether imported symbols can be declared weak... no
5)
-checking whether NULL can be used in arbitrary expressions... yes
+checking whether NULL can be used in arbitrary expressions... no
Later also:
../../gltests/test-wchar.c, line 31: illegal field size
make[4]: *** [test-wchar.o] Error 1
They define NULL to (0), hence (sizeof NULL == sizeof (void *)) evaluates
to false.
My workaround: Fix the definition of NULL to ((void*)0).
6)
-checking whether this system has an arbitrary file name length limit... yes
+checking whether this system has an arbitrary file name length limit... no
Apparently PATH_MAX and MAXPATHLEN are not defined.
7)
-checking for error_at_line... yes
+checking for error_at_line... no
Link error because <bits/error.h> uses __builtin_va_arg_pack, which pcc does
not about.
8)
-checking whether getcwd handles long file names properly... no, but it is
partly working
+checking whether getcwd handles long file names properly... yes
Apparently the test program exits with code 0, whereas code 12 with gcc.
9)
-checking whether getcwd aborts when 4k < cwd_length < 16k... no
+checking whether getcwd aborts when 4k < cwd_length < 16k... yes
PATH_MAX is undefined.
10)
-checking for HOST_NAME_MAX... yes
+checking for HOST_NAME_MAX... 64
Apparently HOST_NAME_MAX is not defined in <limits.h> but elsewhere.
11)
-checking for working nanosleep... no (mishandles large arguments)
+checking for working nanosleep... no
Test program exited with code 2, whereas code 6 with gcc.
12)
-checking for gcc -std=gnu99 option to support OpenMP... -fopenmp
+checking for pcc option to support OpenMP... unsupported
13)
-checking for signbit compiler built-ins... yes
+checking for signbit compiler built-ins... no
14) Compilation failure:
../../gllib/striconv.c, line 265: MB_LEN_MAX undefined
make[4]: *** [striconv.o] Error 1
../../gllib/human.c, line 179: MB_LEN_MAX undefined
make[4]: *** [human.o] Error 1
<limits.h> does not define MB_LEN_MAX.
My workaround: Define MB_LEN_MAX to 16 in libpcc_limits.h.
15) Link failures:
../gllib/libgnu.a(canonicalize.o): In function `canonicalize_filename_mode':
../../gllib/canonicalize.c:189: undefined reference to `__builtin_strspn'
make[4]: *** [test-canonicalize] Error 1
and similar.
My workaround: Override <bits/string2.h> and <bits/string3.h>.
16) Link failure:
test-count-one-bits.o: In function `main':
../../gltests/test-count-one-bits.c:44: undefined reference to
`__builtin_popcount'
../../gltests/test-count-one-bits.c:44: undefined reference to
`__builtin_popcount'
../../gltests/test-count-one-bits.c:44: undefined reference to
`__builtin_popcount'
../../gltests/test-count-one-bits.c:44: undefined reference to
`__builtin_popcount'
../../gltests/test-count-one-bits.c:44: undefined reference to
`__builtin_popcount'
../../gltests/test-count-one-bits.c:46: undefined reference to
`__builtin_popcountl'
../../gltests/test-count-one-bits.c:46: undefined reference to
`__builtin_popcountl'
../../gltests/test-count-one-bits.c:46: undefined reference to
`__builtin_popcountl'
../../gltests/test-count-one-bits.c:46: undefined reference to
`__builtin_popcountl'
../../gltests/test-count-one-bits.c:46: undefined reference to
`__builtin_popcountl'
../../gltests/test-count-one-bits.c:49: undefined reference to
`__builtin_popcountll'
../../gltests/test-count-one-bits.c:49: undefined reference to
`__builtin_popcountll'
../../gltests/test-count-one-bits.c:49: undefined reference to
`__builtin_popcountll'
../../gltests/test-count-one-bits.c:49: undefined reference to
`__builtin_popcountll'
../../gltests/test-count-one-bits.c:49: undefined reference to
`__builtin_popcountll'
make[4]: *** [test-count-one-bits] Error 1
The problem is that lib/count-one-bits.h assumes the presence of GCC
built-ins but pcc does not have them. pcc is lying about the compatible
GCC version.
17) Test failures (that are not present when building with gcc):
FAIL: test-array_list
/bin/sh: line 5: 6216 Segmentation fault
FAIL: test-array_oset
/bin/sh: line 5: 6274 Segmentation fault
FAIL: test-avltree_list
/bin/sh: line 5: 6279 Illegal instruction
FAIL: test-avltree_oset
/bin/sh: line 5: 6284 Segmentation fault
FAIL: test-avltreehash_list
/bin/sh: line 5: 6351 Segmentation fault
FAIL: test-carray_list
../../gltests/test-utimens.h:111: assertion failed
FAIL: test-fdutimensat
../../gltests/test-futimens.h:118: assertion failed
FAIL: test-futimens
../../gltests/test-iconv.c:84: assertion failed
FAIL: test-iconv
/bin/sh: line 5: 7127 Segmentation fault
FAIL: test-linked_list
/bin/sh: line 5: 7132 Segmentation fault
FAIL: test-linkedhash_list
../../gltests/test-nanosleep.c:76: assertion failed
FAIL: test-nanosleep
190112132045.51 mismatch (-: actual; +:expected)
- -2147483649
+ 2147483647
FAIL: test-posixtm
/bin/sh: line 5: 7933 Segmentation fault
FAIL: test-rbtree_list
/bin/sh: line 5: 7938 Illegal instruction
FAIL: test-rbtree_oset
/bin/sh: line 5: 7943 Segmentation fault
FAIL: test-rbtreehash_list
../../gltests/test-stat-time.c:173: assertion failed
FAIL: test-stat-time
/bin/sh: line 5: 8398 Aborted
FAIL: test-u16-casecmp
/bin/sh: line 5: 8406 Aborted
FAIL: test-u16-casefold
/bin/sh: line 5: 8414 Aborted
FAIL: test-u16-is-casefolded
/bin/sh: line 5: 8428 Aborted
FAIL: test-u16-tolower
/bin/sh: line 5: 8433 Aborted
FAIL: test-u16-totitle
/bin/sh: line 5: 8438 Aborted
FAIL: test-u16-toupper
etc.
../../gltests/unicase/test-ulc-casecmp1.sh: line 15: 8534 Aborted
FAIL: unicase/test-ulc-casecmp1.sh
../../gltests/unicase/test-ulc-casecmp2.sh: line 15: 8540 Aborted
FAIL: unicase/test-ulc-casecmp2.sh
../../gltests/unictype/test-predicate-part2.h:31: assertion failed
FAIL: test-categ_Cs
/bin/sh: line 5: 8720 Segmentation fault
FAIL: test-categ_Zl
/bin/sh: line 5: 8725 Segmentation fault
FAIL: test-categ_Zp
/bin/sh: line 5: 8733 Segmentation fault
FAIL: test-categ_and_not
/bin/sh: line 5: 8738 Segmentation fault
FAIL: test-categ_and
/bin/sh: line 5: 8743 Segmentation fault
FAIL: test-categ_byname
/bin/sh: line 5: 8748 Segmentation fault
FAIL: test-categ_longname
/bin/sh: line 5: 8753 Segmentation fault
FAIL: test-categ_name
/bin/sh: line 5: 8758 Segmentation fault
FAIL: test-categ_none
/bin/sh: line 5: 8763 Segmentation fault
FAIL: test-categ_of
/bin/sh: line 5: 8768 Segmentation fault
FAIL: test-categ_or
/bin/sh: line 5: 8854 Segmentation fault
FAIL: test-numeric
/bin/sh: line 5: 8916 Segmentation fault
FAIL: test-pr_byname
\u0020 name lookup returned wrong name: SHU
...
inverse name lookup of "SPACE" failed
...
FAIL: uniname/test-uninames.sh
../../gltests/test-utimens.h:111: assertion failed
FAIL: test-utimens
../../gltests/test-utimens.h:111: assertion failed
FAIL: test-utimensat
Summary:
* pcc 1.0.0 has not been tested with large POSIX programs on glibc systems.
* pcc 1.0.0 likely has some severe code generation bugs.
* No portability problems found in gnulib.
Bruno
--
In memoriam Hans von Dohnanyi <http://en.wikipedia.org/wiki/Hans_von_Dohnanyi>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnulib and pcc-1.0.0,
Bruno Haible <=