diff options
| author | Trent Mick <trentm@gmail.com> | 2012-10-29 13:23:10 -0700 |
|---|---|---|
| committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-10-30 22:48:38 +0100 |
| commit | 1f4e0c02b57945b329206ef8ea39b3fa21dd0d34 (patch) | |
| tree | a45f502093ac3cc71a191ee19696995f4e1da566 | |
| parent | 7fd1c08b1615b57529c1bb7ae6f9a7b16e643162 (diff) | |
| download | node-v0.4.tar.gz | |
build: fix gcc 4.7 sunos buildv0.4
gcc 4.7 doesn't understand -threads, use -pthreads instead.
Fixes #4211.
| -rw-r--r-- | wscript | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -425,9 +425,12 @@ def configure(conf): conf.define("HAVE_CONFIG_H", 1) if sys.platform.startswith("sunos"): - conf.env.append_value ('CCFLAGS', '-threads') - conf.env.append_value ('CXXFLAGS', '-threads') - #conf.env.append_value ('LINKFLAGS', ' -threads') + # In gcc 4.2 '-pthread' was added as an alias for '-pthreads'. We use + # '-pthreads' to not break older gcc versions. + threadflags='-pthreads' + conf.env.append_value ('CCFLAGS', threadflags) + conf.env.append_value ('CXXFLAGS', threadflags) + conf.env.append_value ('LINKFLAGS', threadflags) elif not sys.platform.startswith("cygwin") and not sys.platform.startswith("win32"): threadflags='-pthread' conf.env.append_value ('CCFLAGS', threadflags) |
