* [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition
@ 2014-04-11 9:26 Alexey Kodanev
2014-04-14 14:27 ` chrubis
2014-04-17 19:37 ` Mike Frysinger
0 siblings, 2 replies; 6+ messages in thread
From: Alexey Kodanev @ 2014-04-11 9:26 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
configure.ac | 1 +
include/mk/config.mk.in | 2 +-
m4/ltp-gcc_option.m4 | 37 +++++++++++++++++++++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletions(-)
create mode 100644 m4/ltp-gcc_option.m4
diff --git a/configure.ac b/configure.ac
index 44016e7..23bd02a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,5 +175,6 @@ LTP_CHECK_FCHOWNAT
LTP_CHECK_MKNODAT
LTP_CHECK_FALLOCATE
LTP_CHECK_SYSCALL_FCNTL
+LTP_CHECK_GCC_OPTION
AC_OUTPUT
diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index c83d08c..478b899 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -66,7 +66,7 @@ DEBUG_CXXFLAGS ?= $(DEBUG_CFLAGS)
OPT_CFLAGS ?= -O2 -fno-strict-aliasing -pipe
OPT_CXXFLAGS ?= $(OPT_CFLAGS)
-WCFLAGS ?= -Wall -W -Wold-style-definition
+WCFLAGS ?= -Wall -W @GCC_WARN_OLDSTYLE@
WCXXFLAGS ?= $(WCFLAGS)
LDFLAGS += $(WLDFLAGS)
diff --git a/m4/ltp-gcc_option.m4 b/m4/ltp-gcc_option.m4
new file mode 100644
index 0000000..93e67cd
--- /dev/null
+++ b/m4/ltp-gcc_option.m4
@@ -0,0 +1,37 @@
+dnl Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+dnl
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2 of
+dnl the License, or (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it would be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write the Free Software Foundation,
+dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+dnl
+dnl Author: Alexey Kodanev <alexey.kodanev@oracle.com>
+dnl
+
+AC_DEFUN([LTP_CHECK_GCC_OPTION],[dnl
+
+AC_MSG_CHECKING([for gcc -Wold-style-definition])
+
+backup_cflags="$CFLAGS"
+CFLAGS="-Wold-style-definition"
+
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([])],
+ [GCC_WARN_OLDSTYLE="$CFLAGS"]
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]
+)
+
+AC_SUBST(GCC_WARN_OLDSTYLE)
+CFLAGS="$backup_cflags"
+
+])
--
1.7.1
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition
2014-04-11 9:26 [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition Alexey Kodanev
@ 2014-04-14 14:27 ` chrubis
2014-04-17 19:37 ` Mike Frysinger
1 sibling, 0 replies; 6+ messages in thread
From: chrubis @ 2014-04-14 14:27 UTC (permalink / raw)
To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list
Hi!
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> ---
> configure.ac | 1 +
> include/mk/config.mk.in | 2 +-
> m4/ltp-gcc_option.m4 | 37 +++++++++++++++++++++++++++++++++++++
> 3 files changed, 39 insertions(+), 1 deletions(-)
> create mode 100644 m4/ltp-gcc_option.m4
Pushed with minor changes (renamed the m4 file and function to
warn_oldstyle instead of gcc_option and changed the AC_MSG_CHECKING()
message) and tested that it works fine, thanks.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition
2014-04-11 9:26 [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition Alexey Kodanev
2014-04-14 14:27 ` chrubis
@ 2014-04-17 19:37 ` Mike Frysinger
2014-04-18 9:43 ` chrubis
1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2014-04-17 19:37 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
[-- Attachment #1.1: Type: text/plain, Size: 243 bytes --]
On Fri 11 Apr 2014 13:26:59 Alexey Kodanev wrote:
> +backup_cflags="$CFLAGS"
> +CFLAGS="-Wold-style-definition"
this isn't really safe. the CFLAGS might have critical settings in there that
impact linking. why not just append ?
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 364 bytes --]
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition
2014-04-17 19:37 ` Mike Frysinger
@ 2014-04-18 9:43 ` chrubis
2014-04-23 15:43 ` chrubis
0 siblings, 1 reply; 6+ messages in thread
From: chrubis @ 2014-04-18 9:43 UTC (permalink / raw)
To: Mike Frysinger; +Cc: vasily.isaenko, ltp-list
Hi!
> On Fri 11 Apr 2014 13:26:59 Alexey Kodanev wrote:
> > +backup_cflags="$CFLAGS"
> > +CFLAGS="-Wold-style-definition"
>
> this isn't really safe. the CFLAGS might have critical settings in there that
> impact linking. why not just append ?
We can also change the AC_LINK_IFELSE() to AC_COMPILE_IFELSE().
Given this is not critical (the worst case is that old style warnings
are not enabled) this could wait after the release.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition
2014-04-18 9:43 ` chrubis
@ 2014-04-23 15:43 ` chrubis
2014-05-15 13:25 ` chrubis
0 siblings, 1 reply; 6+ messages in thread
From: chrubis @ 2014-04-23 15:43 UTC (permalink / raw)
To: Mike Frysinger; +Cc: vasily.isaenko, ltp-list
Hi!
> > On Fri 11 Apr 2014 13:26:59 Alexey Kodanev wrote:
> > > +backup_cflags="$CFLAGS"
> > > +CFLAGS="-Wold-style-definition"
> >
> > this isn't really safe. the CFLAGS might have critical settings in there that
> > impact linking. why not just append ?
>
> We can also change the AC_LINK_IFELSE() to AC_COMPILE_IFELSE().
>
> Given this is not critical (the worst case is that old style warnings
> are not enabled) this could wait after the release.
The freeze has been lifted up, feel free to push fix if you want :)
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition
2014-04-23 15:43 ` chrubis
@ 2014-05-15 13:25 ` chrubis
0 siblings, 0 replies; 6+ messages in thread
From: chrubis @ 2014-05-15 13:25 UTC (permalink / raw)
To: Mike Frysinger; +Cc: vasily.isaenko, ltp-list
Hi!
> > > On Fri 11 Apr 2014 13:26:59 Alexey Kodanev wrote:
> > > > +backup_cflags="$CFLAGS"
> > > > +CFLAGS="-Wold-style-definition"
> > >
> > > this isn't really safe. the CFLAGS might have critical settings in there that
> > > impact linking. why not just append ?
> >
> > We can also change the AC_LINK_IFELSE() to AC_COMPILE_IFELSE().
> >
> > Given this is not critical (the worst case is that old style warnings
> > are not enabled) this could wait after the release.
>
> The freeze has been lifted up, feel free to push fix if you want :)
I've just pushed a fix that appends the CFLAGS instead of replacing
them.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-15 13:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11 9:26 [LTP] [PATCH] configure: add configure check for GCC -Wold-style-definition Alexey Kodanev
2014-04-14 14:27 ` chrubis
2014-04-17 19:37 ` Mike Frysinger
2014-04-18 9:43 ` chrubis
2014-04-23 15:43 ` chrubis
2014-05-15 13:25 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox