From kde-buildsystem Thu Aug 16 19:48:32 2012 From: Alexander Neundorf Date: Thu, 16 Aug 2012 19:48:32 +0000 To: kde-buildsystem Subject: Re: -ansi and the default CXX flags (was Re: [PATCH 1/3] Pass additional gcc compiler flags regardle Message-Id: <201208162148.33220.neundorf () kde ! org> X-MARC-Message: https://marc.info/?l=kde-buildsystem&m=134514655529591 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============2640354279759317400==" --===============2640354279759317400== Content-Type: multipart/alternative; boundary="Boundary-01=_R6ULQdTTdqwEdu3" Content-Transfer-Encoding: 7bit --Boundary-01=_R6ULQdTTdqwEdu3 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit On Thursday 16 August 2012, Raphael Kubo da Costa wrote: > Raphael Kubo da Costa writes: > > Today I felt like doing some archeology work, and it looks like this > > separation between the Linux/non-Linux case was added in SVN r501434 > > [1], when FindKDE4.cmake was still in kdesdk. At the time, strtoll(3) > > failed on FreeBSD when -ansi was passed, and the behavior remains the > > same to this day. It looks correct to me: to gcc, -ansi means C90 for C > > files and C++98 for C++ files, strtoll is part of C99 and is only > > available on Linux with -ansi because gcc/libstdc++ define _GNU_SOURCE > > by default. > > > > Looking even further back in time, -ansi seems to have been originally > > added by coolo to acinclude.m4.in in r50947 [2] only for glibc and when > > building in debug mode. > > > > I see two options here: either go back to adding -ansi only for Linux > > (and making all the other flags common to all systems using gcc), or > > just dropping -ansi altogether and using the same flags for all systems. > > > > Thoughts? > > > > [1] http://websvn.kde.org/?view=revision&revision=501434 > > [2] http://websvn.kde.org/?view=revision&revision=50947 > > Alex, do you have an opinion on this? Not really, how much will break when changing this ? Dropping -ansi doesn't sound too bad to me... Alex --Boundary-01=_R6ULQdTTdqwEdu3 Content-Type: text/html; charset="iso-8859-6" Content-Transfer-Encoding: 7bit

On Thursday 16 August 2012, Raphael Kubo da Costa wrote:

> Raphael Kubo da Costa <rakuco@FreeBSD.org> writes:

> > Today I felt like doing some archeology work, and it looks like this

> > separation between the Linux/non-Linux case was added in SVN r501434

> > [1], when FindKDE4.cmake was still in kdesdk. At the time, strtoll(3)

> > failed on FreeBSD when -ansi was passed, and the behavior remains the

> > same to this day. It looks correct to me: to gcc, -ansi means C90 for C

> > files and C++98 for C++ files, strtoll is part of C99 and is only

> > available on Linux with -ansi because gcc/libstdc++ define _GNU_SOURCE

> > by default.

> >

> > Looking even further back in time, -ansi seems to have been originally

> > added by coolo to acinclude.m4.in in r50947 [2] only for glibc and when

> > building in debug mode.

> >

> > I see two options here: either go back to adding -ansi only for Linux

> > (and making all the other flags common to all systems using gcc), or

> > just dropping -ansi altogether and using the same flags for all systems.

> >

> > Thoughts?

> >

> > [1] http://websvn.kde.org/?view=revision&revision=501434

> > [2] http://websvn.kde.org/?view=revision&revision=50947

>

> Alex, do you have an opinion on this?

Not really, how much will break when changing this ?

Dropping -ansi doesn't sound too bad to me...

Alex

--Boundary-01=_R6ULQdTTdqwEdu3-- --===============2640354279759317400== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem --===============2640354279759317400==--