This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: Cygwin build error
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Shaun Jackman'" <sjackman at gmail dot com>
- Cc: <newlib at sources dot redhat dot com>
- Date: Fri, 28 Apr 2006 15:45:37 +0100
- Subject: RE: Cygwin build error
On 28 April 2006 15:17, Shaun Jackman wrote:
> On 4/28/06, Dave Korn <dave.korn@artimi> wrote:
>>> By piping the output to a file, I saw that the former value of CFLAGS is
>>> "-O2 -g -O2 " (two spaces), while the current value is "-O2 -g -O2 " (one
>>> space). This causes the comparison in libc/configure to fail.
>
> Aha! Somebody else has seen the bug that's been messing with me.
It is, however, trivially fixed by blowing away your newlib build dir.
> This
> bug affects building on Debian too. I have no idea why it doesn't
> affect Red Hat.
If investigating this, I would work on the hypothesis that the CFLAGS value is build by concatenating several shell variables in a
CFLAGS='${foo} ${bar} ${baz} ${quux}'
construct (or equivalent), and that the doubled spaces arise when one of these items is unset.
I'm not a shell expert, but if we can't do a white-space insensitive comparison in test, there must be some portable way to canonicalise a shell variable so that the words in it are each separated by precisely one instance of ${IFS}, mustn't there?
cheers,
DaveK
--
Can't think of a witty .sigline today....