Re: #includes and #defined

From: Erich Dollansky <freebsd.ed.lists_at_sumeritec.com>
Date: Fri, 10 Aug 2018 13:51:49 +0800
Hi,

On Fri, 10 Aug 2018 12:40:48 +0800
blubee blubeeme <gurenchan_at_gmail.com> wrote:

> On Fri, Aug 10, 2018 at 8:28 AM Erich Dollansky <
> freebsd.ed.lists_at_sumeritec.com> wrote:  
> 
> > Hi,
> >
> > On Fri, 10 Aug 2018 08:01:42 +0800
> > blubee blubeeme <gurenchan_at_gmail.com> wrote:
> >  
> > > What's the proper way to define and include FreeBSD amd64 in GNU
> > > Makefiles
> > >
> > > Do we define FreeBSD as x86_64 or amd64 also is it __FreeBSD__,
> > > FreeBSD__, or __FreeBSD
> > >
> > > I've seen all of the above looking through different projects.  
> >
> > clang defines '__FreeBSD__'
> >
> > Erich
> >  
> 
> What about the architecture name is it recommended to use x86_64 or
> amd64?

my clang reports on an Intel CPU:

#define __amd64 1
#define __amd64__ 1
#define __x86_64 1
#define __x86_64__ 1

as defined.

It reports

#define __aarch64__ 1

on an 64 bit ARM CPU.

Erich
Received on Fri Aug 10 2018 - 03:53:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC