On 01/13/2016 03:21 PM, Björn Esser wrote:
Am 13.01.2016 um 15:06 schrieb Ankur Sinha:
On Wed, 2016-01-13 at 13:08 +0100, Michael Schwendt wrote:
Yes.

Thanks Michael. Follow up question:

What is the cleanest way of doing this - replacing -ansi with
-std=c++11 in %{_optflags} while using the %configure macro?

You can do it the following way, by placing this override on top of your
spec-file:

%global optflags "-std=c++11 %{optflags}"

That will override the %optflags in scope of your spec-file to carry a
prepended "-std=c++11", too.  The %configure-macro will use your custom
enhanced %optflags, then.

It's also easy enough to do search and replace in %optflags if the
appending trick isn't enough. Although in this case I think it won't do
anything useful since -ansi isn't actually coming from %optflags:

%global optflags %(echo %{optflags} | sed 's/-ansi/-std=c++11/')

Also, GCC 6 that is going to land in F24 in 2 or 3 weeks is going to
switch the global default to -std=gnu++14 or -std=c++14, I've forgotten
which.

--
Hope this helps,
Kalev
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to