tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] test failure on Linux


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] test failure on Linux
Date: Wed, 13 Feb 2013 16:17:42 +0100
User-agent: Roundcube Webmail/0.5.3

On Wed, 13 Feb 2013 14:33:46 +0100, grischka wrote:
Thomas Preud'homme wrote:
Here is a first version of the patch. Granted, detecting multiarch at configure time and specifying the triplet in tcc.h is better but the result is quite ugly for now.

What about adding a small C file that we compile at configure
time and can run with various arguments.  Such as:

int main(int argc, char **argv)
{
    switch(argc == 1 ? argv[1][0] : 0) {
case 'v': <print __GNUC__>
case 'm': <print __GNUC_MINOR__>
case 'a': <print [MULTI_]ARCH_TRIPLE>
case 'e': <print endian-ness>
...

Why not but strike multiarch from that as I don't see how we could detect it by compiling a C program. The place where headers, libraries and crt*.o files are stored is transparent to programs, only compilers need to care about. There isn't any macro defined by the compiler. That's why it's detected by checking whether crti.o is in /usr/lib[64] or not.


and use as:
gcc_major=`our-config-tool v`
etc...

That way configure would look better without that inline C code.

Ok, I can do that.


--- grischka

Thomas



reply via email to

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