tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] When is planned to be released the next version of Tc


From: Christian Jullien
Subject: Re: [Tinycc-devel] When is planned to be released the next version of Tcc?
Date: Sun, 23 Dec 2018 14:22:54 +0100

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




reply via email to

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