tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Many new errors on RPi because of ssize_t incompatibl


From: Christian JULLIEN
Subject: Re: [Tinycc-devel] Many new errors on RPi because of ssize_t incompatible redefinition
Date: Tue, 25 Jul 2017 16:42:36 +0200 (CEST)

Here is how gcc defines this type on RPi /usr/lib/gcc/arm-linux-gnueabihf/4.9/include/stddef.h



#define __PTRDIFF_TYPE__ long int
typedef __PTRDIFF_TYPE__ ptrdiff_t;

So it's a long int.

IMHO you will find many different definitions on different systems, all resulting to int32_t or equivalent type.

Strictly speaking, from a C compiler point of you, even if long and int are equivalent to int32_t on 32bit machine, they are viewed as different types.





Le : 25 juillet 2017 à 16:17 (GMT +02:00)
De : "grischka" <address@hidden>
À : "Christian JULLIEN" <address@hidden>, "address@hidden" <address@hidden>
Objet : Re: [Tinycc-devel] Many new errors on RPi because of ssize_t incompatible redefinition


Christian JULLIEN wrote:
> ‍One step forward, two steps backward,
>
>
> I don't know who is the culprit but today's update totally fails on RPi
> because of incompatible redefinition of 'ssize_t'

In fact that is (partially) because of one of your own commits:
http://repo.or.cz/tinycc.git/commitdiff/c1b101

in combination with stddef.h:
typedef __PTRDIFF_TYPE__ ssize_t;

and with Matthias' recent work to make tcc notice the difference
between 'int' and 'long'.

On 32 bit __SIZE_TYPE__/__PTRDIFF_TYPE__ should be unsigned/signed
int, not long.

-- gr

> ------------ test3 ------------
> ../tcc -B.. -I../include -I.. -I..
> -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" -DTCC_CPU_VERSION=7
> -DTCC_TARGET_ARM -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT -DTCC_ARM_VFP -run
> ../tcc.c -B.. -I../include -I.. -I..
> -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" -DTCC_CPU_VERSION=7
> -DTCC_TARGET_ARM -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT -DTCC_ARM_VFP -run
> ../tcc.c -B.. -I../include -I.. -I..
> -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" -DTCC_CPU_VERSION=7
> -DTCC_TARGET_ARM -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT -DTCC_ARM_VFP -run
> ../tcc.c -B.. -I../include -I.. -I.. -run tcctest.c > test.out3
> In file included from ../tcc.c:21:
> In file included from ../tcc.h:27:
> In file included from /usr/include/stdlib.h:314:
> /usr/include/arm-linux-gnueabihf/sys/types.h:109: error: incompatible
> redefinition of 'ssize_t'
> Makefile:102: recipe for target 'test3' failed
> make[1]: *** [test3] Error 1
> ------------ memtest ------------
> gcc -fno-strict-aliasing -I.. -I..
> -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" -DTCC_CPU_VERSION=7
> -DTCC_TARGET_ARM -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT -DTCC_ARM_VFP
> -DMEM_DEBUG=2 ../tcc.c -lm -ldl -o memtest-tcc
> ./memtest-tcc -B.. -I../include -I.. -I..
> -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" -DTCC_CPU_VERSION=7
> -DTCC_TARGET_ARM -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT -DTCC_ARM_VFP
> ../tcc.c -lm -ldl
> In file included from ../tcc.c:21:
> In file included from ../tcc.h:27:
> In file included from /usr/include/stdlib.h:314:
> /usr/include/arm-linux-gnueabihf/sys/types.h:109: error: incompatible
> redefinition of 'ssize_t'
> Makefile:145: recipe for target 'memtest' failed
> make[1]: *** [memtest] Error 1
> gcc -o abitest-cc abitest.c ../libtcc.a -fno-strict-aliasing -I.. -I..
> -lm -ldl -w
> ../tcc -B.. -I../include -I.. -I.. -o abitest-tcc abitest.c ../libtcc.c
> -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" -DTCC_CPU_VERSION=7
> -DTCC_TARGET_ARM -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT -DTCC_ARM_VFP -lm -ldl
> In file included from abitest.c:2:
> In file included from /usr/include/stdlib.h:314:
> /usr/include/arm-linux-gnueabihf/sys/types.h:109: error: incompatible
> redefinition of 'ssize_t'
> Makefile:213: recipe for target 'abitest-tcc' failed
> make[1]: *** [abitest-tcc] Error 1
> ------------ tests2-dir ------------
> make -k -C tests2
> make[2]: Entering directory '/home/jullien/tinycc/tests/tests2'
> Test: 00_assignment...
> --- 00_assignment.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 00_assignment.output 2017-07-25 15:37:28.505891162 +0200
> @@ -1,3 +1,2 @@
> -42
> -64
> -12, 34
> +In file included from 00_assignment.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '00_assignment.test' failed
> make[2]: *** [00_assignment.test] Error 1
> Test: 01_comment...
> --- 01_comment.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 01_comment.output 2017-07-25 15:37:28.515891148 +0200
> @@ -1,5 +1,2 @@
> -Hello
> -Hello
> -Hello
> -Hello
> -Hello
> +In file included from 01_comment.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '01_comment.test' failed
> make[2]: *** [01_comment.test] Error 1
> Test: 02_printf...
> --- 02_printf.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 02_printf.output 2017-07-25 15:37:28.535891119 +0200
> @@ -1,15 +1,2 @@
> -Hello world
> -Count = -5
> -Count = -4
> -Count = -3
> -Count = -2
> -Count = -1
> -Count = 0
> -Count = 1
> -Count = 2
> -Count = 3
> -Count = 4
> -Count = 5
> -String 'hello', 'there' is 'hello', 'there'
> -Character 'A' is 'A'
> -Character 'a' is 'a'
> +In file included from 02_printf.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '02_printf.test' failed
> make[2]: *** [02_printf.test] Error 1
> Test: 03_struct...
> --- 03_struct.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 03_struct.output 2017-07-25 15:37:28.545891105 +0200
> @@ -1,6 +1,2 @@
> -12
> -34
> -12
> -34
> -56
> -78
> +In file included from 03_struct.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '03_struct.test' failed
> make[2]: *** [03_struct.test] Error 1
> Test: 04_for...
> --- 04_for.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 04_for.output 2017-07-25 15:37:28.565891076 +0200
> @@ -1,10 +1,2 @@
> -1
> -2
> -3
> -4
> -5
> -6
> -7
> -8
> -9
> -10
> +In file included from 04_for.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '04_for.test' failed
> make[2]: *** [04_for.test] Error 1
> Test: 05_array...
> --- 05_array.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 05_array.output 2017-07-25 15:37:28.585891047 +0200
> @@ -1,10 +1,2 @@
> -1
> -4
> -9
> -16
> -25
> -36
> -49
> -64
> -81
> -100
> +In file included from 05_array.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '05_array.test' failed
> make[2]: *** [05_array.test] Error 1
> Test: 06_case...
> --- 06_case.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 06_case.output 2017-07-25 15:37:28.595891033 +0200
> @@ -1,8 +1,2 @@
> -0
> -0
> -1
> -1
> -2
> -2
> -3
> -0
> +In file included from 06_case.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '06_case.test' failed
> make[2]: *** [06_case.test] Error 1
> Test: 07_function...
> --- 07_function.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 07_function.output 2017-07-25 15:37:28.615891004 +0200
> @@ -1,4 +1,2 @@
> -9
> -16
> -a=1234
> -qfunc()
> +In file included from 07_function.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '07_function.test' failed
> make[2]: *** [07_function.test] Error 1
> Test: 08_while...
> --- 08_while.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 08_while.output 2017-07-25 15:37:28.635890975 +0200
> @@ -1,11 +1,2 @@
> -1
> -1
> -2
> -3
> -5
> -8
> -13
> -21
> -34
> -55
> -89
> +In file included from 08_while.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '08_while.test' failed
> make[2]: *** [08_while.test] Error 1
> Test: 09_do_while...
> --- 09_do_while.expect 2017-07-25 15:36:36.965965492 +0200
> +++ 09_do_while.output 2017-07-25 15:37:28.645890961 +0200
> @@ -1,11 +1,2 @@
> -1
> -1
> -2
> -3
> -5
> -8
> -13
> -21
> -34
> -55
> -89
> +In file included from 09_do_while.c:1:
> +/usr/include/stdio.h:102: error: incompatible redefinition of 'ssize_t'
> Makefile:64: recipe for target '09_do_while.test' failed
> make[2]: *** [09_do_while.test] Error 1
>
> ‍
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]