[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] [PATCH] allow to tell a target ARCH to a configure sc
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] [PATCH] allow to tell a target ARCH to a configure script |
Date: |
Sat, 03 Jan 2015 23:45:50 +0000 |
User-agent: |
KMail/4.14.1 (Linux/2.6.38-ac2-ac100; KDE/4.14.2; armv7l; ; ) |
Le mardi 30 décembre 2014, 11:05:15 Sergey Korshunoff a écrit :
> Problem: configure in 32bit userspace running on 64bit kernel is
> trying to compile tcc for ARCH=x86_64. Expecting behavior: to
> configure a tcc for ARCH=x86
>
> This patch will allow to specify/configure a target cpu. Examples:
> ARCH=x86 ./configure
> ARCH=x86_64 ./configure
>
> If ARCH is not specified then try to detect a current cpu type by
> examining arch of the host_cc.
The principle is nice but the code style looks different from the rest and a
bit complicated for what it is. Why using a subscript for instance? Why not
nesting if?
Finally, you could instead of using readelf use a carefully crafted conftest
that would give you whether userspace is 32bit of 64bit. The structure would
then look like this:
if ARCH is defined, then use it
else use uname
if cpu is x86_64 and conftest gives 32bit, cpu=i386.
What do you think?
Best regards,
Thomas
- Re: [Tinycc-devel] [PATCH] allow to tell a target ARCH to a configure script,
Thomas Preud'homme <=