build: sunos expects -pthreads, not -pthread

This commit is contained in:
Ben Noordhuis 2011-10-25 23:50:10 +00:00
parent cb6cd92305
commit 3ecb319128
2 changed files with 18 additions and 5 deletions

View File

@ -117,9 +117,8 @@
'variables': {
'gcc_version%': '<!(python build/gcc_version.py)>)',
},
'cflags': [ '-Wall', '-pthread', ],
'cflags': [ '-Wall' ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', ],
'conditions': [
[ 'host_arch != target_arch and target_arch=="ia32"', {
'cflags': [ '-m32' ],
@ -128,6 +127,13 @@
[ 'OS=="linux"', {
'cflags': [ '-ansi' ],
}],
[ 'OS=="solaris"', {
'cflags': [ '-pthreads' ],
'ldflags': [ '-pthreads' ],
}, {
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'visibility=="hidden" and gcc_version >= "4.0.0"', {
'cflags': [ '-fvisibility=hidden' ],
}],

13
uv.gyp
View File

@ -8,6 +8,15 @@
'_GNU_SOURCE',
'EIO_STACKSIZE=262144'
],
'conditions': [
['OS=="solaris"', {
'cflags': ['-pthreads'],
'ldlags': ['-pthreads'],
}, {
'cflags': ['-pthread'],
'ldlags': ['-pthread'],
}],
],
}],
],
},
@ -313,11 +322,10 @@
'libraries': [ 'ws2_32.lib' ]
}, { # POSIX
'defines': [ '_GNU_SOURCE' ],
'ldflags': [ '-pthread' ],
'sources': [
'test/runner-unix.c',
'test/runner-unix.h',
]
],
}],
[ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
'defines': [
@ -365,7 +373,6 @@
'libraries': [ 'ws2_32.lib' ]
}, { # POSIX
'defines': [ '_GNU_SOURCE' ],
'ldflags': [ '-pthread' ],
'sources': [
'test/runner-unix.c',
'test/runner-unix.h',