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

Re: My progress on armhf: xf86-video-msm for armhf attempt. Please test.



> > > So is there a way to ask gcc "What the hell are your defaults right
> > > now?".
> > 
> > I don't consider that a well formed question[1].  You should be asking
> > what the compiler is *doing* right now.  The answer is in a preprocessor
> > macro.
> 
> How about "What is the default target of this gcc"?  I guess that would
> be gcc -dumpmachine, which gives some triplet identifying the target.
> Doesn't tell you the default cpu variant being targeted, but its a start.

Not really.  The target triplet is an extremely poor source of information. A 
given target can be supported by many different triplets, and a single triplet 
can support many different targets.  It all epends how the toolchain was 
configured.

Target triplets are only really useful when confined to specific systems  from 
a particular vendor, and even then only when that vendor (e.g. Debian) chooses 
to use an arbitrary triplet for evert target they support.  In that case the 
mappings are vendor specific and you should already know what the answer is.

As a counter-example, the toolchains I build for my day job support a wide 
range of different, incompatible systems from a single binary (i.e. target 
triplet).

My answer to your question remains the same: Use preprocessor macros.

Paul


Reply to: