tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] TinyCC and Konvalo.org


From: Ivan Popov
Subject: [Tinycc-devel] TinyCC and Konvalo.org
Date: Wed, 11 May 2005 15:35:17 +0200
User-agent: Mutt/1.4.2.1i

Hi!

I have installed tcc so that it is available via /coda/konvalo.org
as a fast and lightweight alternative to gcc. See http://www.konvalo.org.

Konvalo.org is based on using a global filesystem (same path points out
the same object on all hosts) which removes many software administration
headaches but discourages the usage of the traditional host-bound paths
like /usr/lib.

That's why I was forced into patching tcc (in comparion, gcc is configurable
at runtime via LIBRARY_PATH and -specs command line option).

The patches are definitely not "clean" but they make it work nicely
and with some polishing would be fully compatible with the default behaviour.

One thing I changed was precedence of libraries search, the explicitely
supplied dirs take precedence after the fix (which should be the right
behaviour?).

Another and more serious change was the ability to supply at runtime
the path to the directory with crt?.o files and with the default libc.

I abuse the first -L argument for that purpose. A new command line argument
or environment variable would be fine with me, but I do not see problems
with [ab]using -L.

Fabrice, would you consider making upstream changes to ensure tcc
works without hardcoding the relevant paths at compile time?

Another change I made is possibly incompatible with non-Konvalo.org
use. I brand binaries explicitely as Linux to make them runnable on both
Linux and FreeBSD, and it seems to make glibc vanilla dynamic linker unhappy.
That means that "shared objects branded as Linux will be rejected on Linux",
a rather broken behaviour of glibc (executables themselves are no problem).
(of course Konvalo.org's glibc loader is more reasonable and works properly)
A possible workaround would be to brand executables but not shared objects,
though you do not have to care, I can apply that change to Konvalo.org tcc
only.

For reference I attach the patches, though I believe you find a better way
to do the same, in case you like to make some of the changes.
It does not cost more than a few bytes code but would make tcc reusable
with different libraries.

For a system like Konvalo.org it is a vital compiler property.
It helps to easily compile and run programs linking against arbitrary
versions of both glibc and uclibc.

Thanks for the exciting software,
--
Ivan

Attachment: patch.lib-crt-search
Description: Text document

Attachment: patch.brandLinux
Description: Text document


reply via email to

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