Bug 715930 - Use stdc++compat.cpp on OS X too. r=:glandium.

This commit is contained in:
Rafael Ávila de Espíndola 2012-01-10 15:01:03 -05:00
parent 4f9dad5c11
commit a0187f466e
4 changed files with 23 additions and 5 deletions

View File

@ -12,6 +12,7 @@
import os
import subprocess
import re
import sys
re_for_ld = re.compile('.*\((.*)\).*')
@ -67,7 +68,19 @@ def find_version(e):
return encode_ver(last_version)
if __name__ == '__main__':
cxx_env = os.environ['CXX']
print 'MOZ_LIBSTDCXX_TARGET_VERSION=%s' % find_version(cxx_env)
host_cxx_env = os.environ.get('HOST_CXX', cxx_env)
print 'MOZ_LIBSTDCXX_HOST_VERSION=%s' % find_version(host_cxx_env)
if os.uname()[0] == 'Darwin':
sdk_dir = os.environ['MACOS_SDK_DIR']
if 'MacOSX10.5.sdk' in sdk_dir:
target_ver = 0
host_ver = 0
else:
target_ver = encode_ver('3.4.9')
host_ver = encode_ver('3.4.9')
else:
cxx_env = os.environ['CXX']
target_ver = find_version(cxx_env)
host_cxx_env = os.environ.get('HOST_CXX', cxx_env)
host_ver = find_version(host_cxx_env)
print 'MOZ_LIBSTDCXX_TARGET_VERSION=%s' % target_ver
print 'MOZ_LIBSTDCXX_HOST_VERSION=%s' % host_ver

View File

@ -1,2 +1,4 @@
CC=/usr/bin/gcc-4.2
CXX=/usr/bin/g++-4.2
ac_add_options --enable-stdcxx-compat

View File

@ -57,6 +57,9 @@ namespace std {
template ostream& ostream::_M_insert(double);
template ostream& ostream::_M_insert(long);
template ostream& ostream::_M_insert(unsigned long);
#ifdef DEBUG
template ostream& ostream::_M_insert(const void*);
#endif
template ostream& __ostream_insert(ostream&, const char*, streamsize);
template istream& istream::_M_extract(double&);
#endif

View File

@ -7466,7 +7466,7 @@ MOZ_ARG_ENABLE_BOOL(stdcxx-compat,
AC_SUBST(STDCXX_COMPAT)
if test -n "$STDCXX_COMPAT"; then
eval $(CXX="$CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
eval $(CXX="$CXX" MACOS_SDK_DIR="$MACOS_SDK_DIR" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
AC_SUBST(MOZ_LIBSTDCXX_TARGET_VERSION)
AC_SUBST(MOZ_LIBSTDCXX_HOST_VERSION)
fi