bug-ncurses
[Top][All Lists]
Advanced

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

Compiler flags in CC test broken


From: Burton, Ross
Subject: Compiler flags in CC test broken
Date: Tue, 21 Feb 2017 00:36:02 +0000

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' '`

Basically assuming that CC is a white space separated list of words, and all of them but the first are compiler options.

Ross

reply via email to

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