gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] [PATCH 5/5] Removes two redundant or troublesome compile flag


From: Fred Wright
Subject: [gpsd-dev] [PATCH 5/5] Removes two redundant or troublesome compile flags.
Date: Sun, 23 Oct 2016 14:16:58 -0700

The two flags -Wmissing-prototypes and -Wmissing-declarations were
being both conditionally included after a validity test, and then
unconditionally included later.  In cases where they were acceptable,
that resulted in doubly including them, and in cases where they
were unacceptable, that meant breaking the build.

The fix is simply to remove the unconditional adds.  This is a
necessary but not sufficient condition for building with CC=c99
to work.

TESTED:
Ran "scons build-all check" on OSX, and verified that the two
flags were still present in the appropriate commands, but now
only once.  Also verified that building with CC=c99 no longer
fails in a manner related to those flags.
---
 SConstruct | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/SConstruct b/SConstruct
index 65004d0..eb8c362 100644
--- a/SConstruct
+++ b/SConstruct
@@ -353,14 +353,8 @@ if env["sysroot"]:
 if 'MORECFLAGS' in os.environ:
     env.Append(CFLAGS=Split(os.environ['MORECFLAGS']))
 
-# Don't change CFLAGS if already set by environment.
-if 'CFLAGS' not in os.environ:
-    if '-Wmissing-prototypes' not in env['CFLAGS']:
-        env.Append(CFLAGS=['-Wmissing-prototypes'])
-
 # Don't change CCFLAGS if already set by environment.
 if 'CCFLAGS' not in os.environ:
-    env.Append(CCFLAGS=['-Wmissing-declarations'])
     # Should we build with profiling?
     if env['profiling']:
         env.Append(CCFLAGS=['-pg'])
-- 
2.10.1




reply via email to

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