summaryrefslogtreecommitdiff
path: root/include_server
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
committerCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
commitf1373cdf3c33752ec326c9b79378057367836c4c (patch)
tree23ff4c261920076e35ad67354f7e8385fdd7255d /include_server
parent4bf85961c09d34336f9b081cd923a9f59fcf5266 (diff)
downloaddistcc-git-f1373cdf3c33752ec326c9b79378057367836c4c.tar.gz
These changes are enough to get code to compile, and at least some of
the unittests to pass, on FreeBSD 6.0, Solaris 10 x86, and OS X Leopard. You have to use gmake instead of standard bsd make, though, because neither bsd nor solari make understand 'include */*.d' and 'CFLAGS += $(POPT_FLAGS).' These may be fixable later. Most changes fall into four categories: 1) #include differences 2) New errors due to some #ifdef paths being taken differently 3) Undefined functions (see, eg, the new HAVE_STRSEP) 4) Type differences (eg tv_usec is an int on os x, not a long int) As one concrete example, snprintf.c is an empty file on linux, where all the functionality is part of glibc. But on Solaris, some of its functionality is useful. This turned up a bug where if you have vsnprintf on your system but not vasnprintf, then dopr() was not being used but was being defined, leading to an "unused static function" warning in gcc. As another, solaris would complain about "index" being used as a variable, since it's also a function name. The var was renamed idx. Tested by compiling on FreeBSD, Solaris 10, and OS X leopard (x86). I also compiled and ran unittests under Linux Ubuntu, to make sure this change didn't break anything there. Reviewed by fergus@google.com
Diffstat (limited to 'include_server')
-rwxr-xr-xinclude_server/setup.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/include_server/setup.py b/include_server/setup.py
index 0fc2ea2..47ec623 100755
--- a/include_server/setup.py
+++ b/include_server/setup.py
@@ -69,8 +69,14 @@ ext = Extension(
libraries = [],
runtime_library_dirs = [],
extra_objects = [],
- extra_compile_args = ['-Wall', '-Wextra', '-Werror'],
- extra_link_args = ['-Wall', '-Wextra', '-Werror'],
+ # This is the same list as is in configure.ac, except we leave out
+ # -Wmissing-prototypes and -Wmissing-declarations, which don't apply
+ # to python extensions (it exports global fns via a pointer),
+ # and -Wwrite-strings, which just had too many false positives.
+ extra_compile_args = ("-W -Wall -Wimplicit -Wuninitialized "
+ "-Wshadow -Wpointer-arith -Wcast-align "
+ "-Waggregate-return -Wstrict-prototypes "
+ "-Wnested-externs -Werror").split()
)
args = {