[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiler flags in CC test broken
From: |
Thomas Dickey |
Subject: |
Re: Compiler flags in CC test broken |
Date: |
Tue, 21 Feb 2017 20:20:15 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Feb 21, 2017 at 12:36:02AM +0000, Burton, Ross wrote:
> Hi,
>
> The logic in aclocal (CF_CC_ENV_FLAGS) to detect compiler flags in CC and
> move them to CFLAGS is broken: the sed uses a greedy .* so will only move
> the last option, and any other options are deleted.
>
> My workaround here is this:
>
> - cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^ ]\)/\1/'`
> + cf_flags=`echo "$CC" | cut -f2- -d' '`
hmm - thanks - I'll have to rethink this (and use a better test-case :-)
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature