[CMake] Hi and some newbie questions

Goswin von Brederlow brederlo at informatik.uni-tuebingen.de
Sat Sep 15 12:47:58 EDT 2007


Hendrik Sattler <post at hendrik-sattler.de> writes:

> Am Freitag 14 September 2007 schrieb Goswin von Brederlow:
>> Something inbetween is to ask the gcc. But then you are gcc
>> specific (Good enough for me).
>
> But isn't that exactly what you want? You want to know what you current 
> compiler compiles for, not what architecture you are currently using. When I 
> run a i586 kernel but gcc produces code for i486, then i486 is wanted.

Unfortunately even restricting it to gcc it still does not work
right. Although I would say that is a bug in gcc:

% gcc -m32 -dumpmachine
x86_64-linux-gnu

-m32 selects 32bit output and that is most certainly no
x86_64-linux-gnu but should be i486-linux-gnu.


I will just have to do this in the source files and use the __ARCH__
defines set by the compiler.

MfG
        Goswin


More information about the CMake mailing list