tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] New tcc display info?


From: Christian Jullien
Subject: Re: [Tinycc-devel] New tcc display info?
Date: Sat, 9 Feb 2013 23:14:46 +0100

> Does it give the target architecture or the host architecture?

It should return target, we generally know on which host we are running on 
(useless yet can be added as well if you like)

> Why not just use readelf or equivalent to detect the platform?
You have no readelf or equivalent on Windows or, if exists, this tool is not 
portable on linux and vice versa,
having this info on -v is also consistent with gcc (see Traget:)

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5+rpi1' 
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs 
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.7 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object 
--disable-libitm --enable-plugin --enable-objc-gc --disable-sjlj-exceptions 
--with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release 
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf 
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5+rpi1)



> 
> Christian

Thomas

> 
> P.S. here is how I use cl processor info with nmake:
> 
> !if [$(CC) 2>&1 | find "x86" > nul] == 0
> CPU             = i386
> !elseif [$(CC) 2>&1 | find "x64" > nul] == 0
> CPU             = AMD64
> !elseif [$(CC) 2>&1 | find "Itanium" > nul] == 0
> CPU             = IA64
> !elseif [$(CC) 2>&1 | find "ARM" > nul] == 0
> CPU             = ARM
> !else
> CPU             = i386
> !endif
> 
> 
> _______________________________________________
> 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]