gforth
[Top][All Lists]
Advanced

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

Re: Building Gforth for Apple's new Arm-based Macs


From: Anton Ertl
Subject: Re: Building Gforth for Apple's new Arm-based Macs
Date: Wed, 20 Jan 2021 18:25:53 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Jan 20, 2021 at 07:29:00PM +0300, Alexander Shpilkin wrote:
> Incidentally, I looked at the corresponding branch in configure.ac[1]
> and it seems to me that the check for arm_cacheflush there is...
> technically correct, but extremely misleading: if the variable is
> empty, `test -z $arm_cacheflush` is just `test -z`, which POSIX
> requires `test` to interpret as being given _no_ operators and a single
> string argument, "-z", and to succeed if that string argument is
> nonempty (which it is).  While this works for -z, it would do the wrong
> thing should a careless edit replace it with -n, for example, so I
> think that quoting the variable to get `test -z "$arm_cacheflush"`
> would be safer and clearer.

Thanks.  Fixed in the development head.

> More seriously, I see that the OS detection code below[2] uses the
> pattern `*win*` to detect Windows;  I don’t know if this is a distro-
> specific quirk or not, but my current mingw-w64[3]-based Linux cross
> toolchain for Windows calls itself {x86-64,i686}-w64-mingw32, which
> would not be detected by this test.  (We appear to have Stallman’s
> political insistence on not using the common abbreviation of "Windows"
> to "Win" to thank for this technical confusion.)

w*-mingw* is now recognized as Windows.

> I am also somewhat
> puzzled by this branch setting PATHSEP to colon and not semicolon, but
> that at least seems to be a known problem.

I am puzzled, too, but I have left it alone for now.

AFAIK in Cygwin, you can use //c/path or somesuch instead of c:\path,
so using : as PATHSEP is workable.  Not sure how it works with Mingw.

- anton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]