Hi,
Danny huge commit for arm code breaks aarch64 (as with Fedora 33 on RPi): On this 64bit system, it tries to compile arm-asm: ... gcc -o arm64-link.o -c arm64-link.c -DCONFIG_LDDIR="\"lib64\"" -DHAVE_SELINUX -D TCC_TARGET_ARM64 -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement - fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno- format-truncation -I. gcc -o arm-asm.o -c arm-asm.c -DCONFIG_LDDIR="\"lib64\"" -DHAVE_SELINUX -DTCC_TA RGET_ARM64 -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-st rict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format -truncation -I. arm-asm.c: In function ‘condition_code_of_token’: arm-asm.c:157:17: error: ‘TOK_ASM_nopeq’ undeclared (first use in this function) ; did you mean ‘TOK_ASM_pop’? 157 | if (token < TOK_ASM_nopeq) { | ^~~~~~~~~~~~~ | TOK_ASM_pop arm-asm.c:157:17: note: each undeclared identifier is reported only once for eac h function it appears in arm-asm.c: In function ‘asm_nullary_opcode’: arm-asm.c:170:13: warning: implicit declaration of function ‘ARM_INSTRUCTION_GRO UP’ [-Wimplicit-function-declaration] 170 | switch (ARM_INSTRUCTION_GROUP(token)) { | ^~~~~~~~~~~~~~~~~~~~~ ... and many other errors arm-asm is only valid for arm (32bit) not for arm64 (alias aarch64). _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
Hi,
On Sun, 3 Jan 2021 08:47:38 +0100 "Christian Jullien" <[hidden email]> wrote: > Danny huge commit for arm code breaks aarch64 (as with Fedora 33 on RPi): > On this 64bit system, it tries to compile arm-asm: [...] > arm-asm is only valid for arm (32bit) not for arm64 (alias aarch64). In fact, on aarch64 you can switch between arm, arm64, thumb and jazelle machine code at runtime just fine. That said, for now, I fixed the compilation error by just splitting off the arm64-asm code from the arm-asm code. Should be fixed now. Please test. _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
Hello,
I confirm it is fixed except, probably not related to you commits, on Aarch64 Linux using clang, I get: ./configure --strip-binaries --with-selinux --cc=clang --prefix=/home/jullien/tinycc/static ------------ dlltest with PIC ------------ tcc: error: Unknown relocation type for got: 285 gmake[2]: *** [Makefile:166: dlltest] Error 1 Perhaps Herman has an idea on how to fix it? C. -----Original Message----- From: Danny Milosavljevic [mailto:[hidden email]] Sent: Sunday, January 03, 2021 15:54 To: Christian Jullien Cc: [hidden email]; [hidden email] Subject: Re: [Tinycc-devel] arm-asm breaks aarch64 (as with Fedora 33 on RPi) Hi, On Sun, 3 Jan 2021 08:47:38 +0100 "Christian Jullien" <[hidden email]> wrote: > Danny huge commit for arm code breaks aarch64 (as with Fedora 33 on RPi): > On this 64bit system, it tries to compile arm-asm: [...] > arm-asm is only valid for arm (32bit) not for arm64 (alias aarch64). In fact, on aarch64 you can switch between arm, arm64, thumb and jazelle machine code at runtime just fine. That said, for now, I fixed the compilation error by just splitting off the arm64-asm code from the arm-asm code. Should be fixed now. Please test. _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
In reply to this post by Danny Milosavljevic
Hi Herman,
you committed a patch enabling all ARM 32 bit assembly tokens on aarch64. Just a heads-up that you have to mode switch the CPU in order to be able to execute ARM 32 bit machine code on aarch64. I mean the tokens alone are not that bad (they aren't functionality), but the functionality on aarch64 is different from ARM by default. The instruction decoder does not start out in arm32 mode on aarch64 executables compiled for tcc, and also the aarch64 instruction set is not a superset of the ARM instruction set (per mode). I mean, technically it's still possible to do it--but are you sure you want to? _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
In reply to this post by Christian Jullien-3
On 1/3/21 4:07 PM, Christian Jullien wrote:
> Hello, > > I confirm it is fixed except, probably not related to you commits, on > Aarch64 Linux using clang, I get: > > ./configure --strip-binaries --with-selinux --cc=clang > --prefix=/home/jullien/tinycc/static > ------------ dlltest with PIC ------------ > tcc: error: Unknown relocation type for got: 285 > gmake[2]: *** [Makefile:166: dlltest] Error 1 Herman _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
In reply to this post by Danny Milosavljevic
On 1/3/21 4:10 PM, Danny Milosavljevic wrote:
> Hi Herman, > > you committed a patch enabling all ARM 32 bit assembly tokens on aarch64. > > Just a heads-up that you have to mode switch the CPU in order to be able to > execute ARM 32 bit machine code on aarch64. > > I mean the tokens alone are not that bad (they aren't functionality), but the > functionality on aarch64 is different from ARM by default. > > The instruction decoder does not start out in arm32 mode on aarch64 > executables compiled for tcc, and also the aarch64 instruction set is not a > superset of the ARM instruction set (per mode). > > I mean, technically it's still possible to do it--but are you sure you want to? Herman _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
In reply to this post by tinycc-devel mailing list
Great! I confirm it fixes the arm64 reloc issue.
-----Original Message----- From: Herman ten Brugge [mailto:[hidden email]] Sent: Sunday, January 03, 2021 19:22 To: [hidden email]; [hidden email] Subject: Re: [Tinycc-devel] arm-asm breaks aarch64 (as with Fedora 33 on RPi) On 1/3/21 4:07 PM, Christian Jullien wrote: > Hello, > > I confirm it is fixed except, probably not related to you commits, on > Aarch64 Linux using clang, I get: > > ./configure --strip-binaries --with-selinux --cc=clang > --prefix=/home/jullien/tinycc/static > ------------ dlltest with PIC ------------ > tcc: error: Unknown relocation type for got: 285 > gmake[2]: *** [Makefile:166: dlltest] Error 1 Herman _______________________________________________ Tinycc-devel mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/tinycc-devel |
Free forum by Nabble | Edit this page |