Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262342 - dev-lang/tcc fails to link working binaries inside embedded
Summary: dev-lang/tcc fails to link working binaries inside embedded
Status: VERIFIED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Maintainers for Miscelleneous Language Packages [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-13 04:25 UTC by Stefan de Konink
Modified: 2009-07-10 19:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2009-03-13 04:25:17 UTC
I am currently using the embedded profile using uclibc. And I observe the following strangeness when a binary is linked using TCC:

ldd ./tcc
checking sub-depends for '/lib/libm.so.0'
        libc.so.0 => /lib/libc.so.0 (0xb7f92000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb7fe3000)
checking sub-depends for '/lib/libc.so.0'
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb7f8a000)
checking sub-depends for '/lib/libdl.so.0'
        libc.so.0 => /lib/libc.so.0 (0xb7f46000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb7f97000)
        libm.so.0 => /lib/libm.so.0 (0x00000000)
        libc.so.0 => /lib/libc.so.0 (0x00000000)
        libdl.so.0 => /lib/libdl.so.0 (0x00000000)
        /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)

opposed to a GCC linked binary:
ldd /usr/bin/tcc
        libm.so.0 => /lib/libm.so.0 (0xb7f8f000)
        libdl.so.0 => /lib/libdl.so.0 (0xb7f8b000)
        libc.so.0 => /lib/libc.so.0 (0xb7f3f000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb7fa3000) 

The TCC linked binary doesn't work. The interesting thing is that object code generated by TCC does link with GCC. I reported the issue to the uclibc lists and TCC list none of them had a clue.

Reproducible: Always

Steps to Reproduce:
1. install embedded
2. emerge tcc
3. compile source with tcc

Actual Results:  
Cannot execute the resulting binary.


Portage 2.1.6.7 (uclibc/x86, gcc-4.3.3, uclibc-0.9.30.1-r0, 2.6.28-rc9 i686)
=================================================================
System uname: Linux-2.6.28-rc9-i686-Pentium_II_-Deschutes-with-libc0
Timestamp of tree: Fri, 13 Mar 2009 01:15:01 +0000
app-shells/bash:     4.0_p10
dev-lang/python:     2.4.4-r6, 2.5.4-r2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-Os"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="cli cracklib crypt dri ipv6 midi mmx ncurses nocxx pcmcia pcre perl python readline reflection session spl ssl tcpd uclibc x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2009-03-13 20:49:57 UTC
Which version of tcc are you using, and what command-line arguments are you passing?
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2009-07-10 18:12:33 UTC
Closing for lack of response, please reopen if you're still having problems.
Comment 3 Stefan de Konink 2009-07-10 19:43:55 UTC
We have fixed this in TCC :)