tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] mob is broken for ARM/ARM64 [make tcc reentrant]


From: grischka
Subject: Re: [Tinycc-devel] mob is broken for ARM/ARM64 [make tcc reentrant]
Date: Wed, 11 Dec 2019 14:20:36 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Christian Jullien wrote:
Hi guys,

Testing mod show that ARM and Aarch64 are broken differently. I'm reluctant to 
test it only Windows as it will break my Lisp development toolchain.

Hi Christian,

there are two things basically you could do.  First in tests/Makefile:78
you could try adding $(NATIVE_DEFINES):

        @echo ------------ $@ ------------
        ./libtcc_tes$*$(EXESUF) $(TCCFLAGS) $(NATIVE_DEFINES) <-----

Second is at tcc.h:150, if you want to you could tweak the default
settings for these architectures.  The bits there are meant basically
to make compiling tcc as simple as if it were a hello-world program
(which it is after all, or close to):

        gcc tcc.c -o tcc

Therefor, if you think that your system configuration is somehow
"default", then you have my full okay to add the two or three lines
each there to get such simplicity as a feature. ;)

(Maybe TCC_ARM_VFP and/or CONFIG_TRIPLET and/or whatever you see
on the gcc command from make.)  To see whether it really works you
would need to run two stages:

        gcc tcc.c -o tcc && ./tcc -B. tcc.c -o tcc1

If you did install tcc previously, -B. may be omitted too.

As to 'usleep' and 'gettimeofday',  maybe it needs unistd.h or time.h or
maybe sys/time.h.  I see your gcc suggests to use 'fseek' instead of
'usleep'.  That is interesting.

Thanks,

--- grischka

=== For ARM

gcc -o libtcc_test_mt libtcc_test_mt.c ../libtcc.a -fno-strict-aliasing -I.. 
-I.                                                            .  -lm -lpthread 
-ldl
libtcc_test_mt.c: In function ‘sleep_ms’:
libtcc_test_mt.c:51:5: warning: implicit declaration of function ‘usleep’; did 
y                                                            ou mean ‘fseek’? 
[-Wimplicit-function-declaration]
     usleep(n * 1000);
     ^~~~~~
     fseek
libtcc_test_mt.c: In function ‘getclock_ms’:
libtcc_test_mt.c:236:5: warning: implicit declaration of function 
‘gettimeofday’                                                             
[-Wimplicit-function-declaration]
     gettimeofday(&tv, NULL);
     ^~~~~~~~~~~~
------------ libtest_mt ------------
./libtcc_test_mt -B.. -I../include -I.. -I..
----- libtest : mixed calls  -------
 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946
(25 ms)
----- libtest : threads ------------
 1 8 2 3 144 34 13 89 377 987 2584 4181 233 5 610 1597 6765 55 10946 21
(21 ms)
----- libtest : tcc in threads -----
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"

(927 ms)
----- compilation of tcc -----------
In file included from ../tcc.c:21:
In file included from ../tcc.h:348:
../arm-gen.c:27: error: #error "Currently TinyCC only supports float computation     
                                                        with VFP instructions"
(4 ms)





=== For Aarch64

libtcc_test_mt.c:51:5: warning: implicit declaration of function ‘usleep’ 
[-Wimplicit-function-declaration]
   51 |     usleep(n * 1000);
      |     ^~~~~~
libtcc_test_mt.c: In function ‘getclock_ms’:
libtcc_test_mt.c:236:5: warning: implicit declaration of function 
‘gettimeofday’ [-Wimplicit-function-declaration]
  236 |     gettimeofday(&tv, NULL);
      |     ^~~~~~~~~~~~
------------ libtest_mt ------------
./libtcc_test_mt -B.. -I../include -I.. -I..
----- libtest : mixed calls  -------
 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946
(41 ms)
----- libtest : threads ------------
 3 2 1 5 8 13 21 34 144 233 55 2584 89 610 987 377 1597 6765 4181 10946
(31 ms)
----- libtest : tcc in threads -----
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: library 'c' not found

(4471 ms)


_______________________________________________
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]