|
From: | Barath Aron |
Subject: | Re: [Tinycc-devel] When is planned to be released the next version of Tcc? |
Date: | Sun, 23 Dec 2018 15:23:25 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
Oh, I missed that, sorry.conftest returns "arm-linux-gnueabihf" as expected, but the test in the next line (configure:323):
if test -n "$tt" -a -f "/usr/lib/$tt/crti.o" ; thenis not true, because I do not have a directory such /usr/lib/arm-linux-gnueabihf
[OFF]It is funny though, conftest converts __ARM_EABI__ and __ARM_PCS_VFP into a misty "gnueabihf", and then configure tries to decode this stuff into TCC_CONFIG_ARM and TCC_ARM_EABI based on a mysterious assumption ("/usr/lib/$tt/crti.o"). Sidenote: this triplet thing is the most shittiest thing in autotools (I know, tcc does not use autotools). That's why I prefer scconfig (http://repo.hu/projects/scconfig/) for my projects.
[ON] Aron On 12/23/18 3:07 PM, Christian Jullien wrote:
As said, it's a temporary tool deleted by ./configure right after it's use. rm -f $TMPN* $CONFTEST Can you trace configure script to see how it uses $CONFTEST in different places and why configure.mak is not correct? C. -----Original Message----- From: Tinycc-devel [mailto:address@hidden On Behalf Of Barath Aron Sent: dimanche 23 décembre 2018 15:02 To: address@hidden Subject: Re: [Tinycc-devel] When is planned to be released the next version of Tcc? I just ran: $ gcc conftest.c -o conftest && ./conftest triplet arm-linux-gnueabihf Although, it is strange, I do not have this executable after running configure. Maybe configure decided to not use it? On 12/23/18 2:43 PM, Christian Jullien wrote:Triplet is given by the temporary conftest tool. You can make it with: $ gcc conftest.c -o conftest && ./conftest triplet arm-linux-gnueabihf Try to debug this very small C program to see why triplet is not defined on your system. -----Original Message----- From: Tinycc-devel [mailto:address@hidden On Behalf Of Barath Aron Sent: dimanche 23 décembre 2018 14:32 To: address@hidden Subject: Re: [Tinycc-devel] When is planned to be released the next version of Tcc? What is in your triplet? Mine is empty. On 12/23/18 2:22 PM, Christian Jullien wrote:On Raspbian, running ./configure I get: address@hidden:~/tinycc $ more config.mak # Automatically generated by configure - do not modify prefix=/usr/local bindir=$(DESTDIR)/usr/local/bin tccdir=$(DESTDIR)/usr/local/lib/tcc libdir=$(DESTDIR)/usr/local/lib includedir=$(DESTDIR)/usr/local/include mandir=$(DESTDIR)/usr/local/share/man infodir=$(DESTDIR)/usr/local/share/info docdir=$(DESTDIR)/usr/local/share/doc CC=gcc GCC_MAJOR=6 GCC_MINOR=3 AR=ar STRIP=strip -s -R .comment -R .note CFLAGS=-Wall -g -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result LDFLAGS= LIBSUF=.a EXESUF= DLLSUF=.so NATIVE_DEFINES+=-DCONFIG_TRIPLET="\"arm-linux-gnueabihf\"" NATIVE_DEFINES+=-DTCC_CPU_VERSION=7 ARCH=arm TARGETOS=Linux CONFIG_arm_eabihf=yes CONFIG_arm_vfp=yes CONFIG_arm_vfp=yes VERSION = 0.9.27 TOPSRC=$(TOP) This generated file is used by Makefile Line 11: include $(TOP)/config.mak Then Line 77: NATIVE_DEFINES_$(CONFIG_arm_eabihf) += -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT IMHO, ./configure does something odd around line 336 with if test "$cpu" = "arm" ; then if test "${triplet%eabihf}" != "$triplet" ; then confvars="$confvars arm_eabihf arm_vfp" elif test "${triplet%eabi}" != "$triplet" ; then confvars="$confvars arm_eabi" fi if grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then confvars="$confvars arm_vfp" fi fi On my RPi it executes: if test "${triplet%eabihf}" != "$triplet" ; then confvars="$confvars arm_eabihf arm_vfp" Which, then results to -DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT in Makefile. C. -----Original Message----- From: Tinycc-devel [mailto:address@hidden On Behalf Of Barath Aron Sent: dimanche 23 décembre 2018 13:55 To: address@hidden Subject: Re: [Tinycc-devel] When is planned to be released the next version of Tcc? I figured out. ARM_EXIDX was skipped because TCC_ARM_EABI was not defined. What I did was just run ./configure without any arguments and then a "make". Maybe this provides a clue to the maintainers. After hacking the defines (-DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT), tcc now does not crash during linking, because it now cannot compile. Weird. Aron On 12/23/18 1:18 PM, Barath Aron wrote:In tccelf.c:2359, it clearly jumps to the end of the loop. And dies in the next loop: /* second short pass to update... */ Take this gdb fragment as an explanation: Breakpoint 3, tcc_load_object_file (s1=0x45a098, address@hidden, fd=4562744, address@hidden, file_offset=4563600, address@hidden) at tccelf.c:2357 2357 sh_name = (char *) strsec + sh->sh_name; (gdb) p i $21 = 6 (gdb) n 2359 if (sh->sh_type != SHT_PROGBITS && (gdb) p *sh $22 = {sh_name = 79, sh_type = 1879048193, sh_flags = 130, sh_addr = 0, sh_offset = 176, sh_size = 8, sh_link = 2, sh_info = 0, sh_addralign = 4, sh_entsize = 0} (gdb) n 2439 next: ; (gdb) n 2354 if (i == ehdr.e_shstrndx) (gdb) p i $23 = 7 1879048193 == 0x70000001 == SHT_ARM_EXIDX Aron On 12/23/18 11:52 AM, Daniel Glöckner wrote:On Sun, Dec 23, 2018 at 11:44:50AM +0100, Barath Aron wrote:I traced the whole object loading procedure with gdb: - ARM_EXIDX (section 6) is definitely not loaded, I traced it with gdb.Where did tcc decide to skip ARM_EXIDX? _______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel_______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel_______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel_______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel_______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Prev in Thread] | Current Thread | [Next in Thread] |