diff options
author | Makoto Kato <m_kato@ga2.so-net.ne.jp> | 2013-09-25 15:33:51 -0700 |
---|---|---|
committer | Makoto Kato <m_kato@ga2.so-net.ne.jp> | 2013-09-25 15:33:51 -0700 |
commit | d279aa5661ae33770d1938e2956e5225e63da274 (patch) | |
tree | ba64c37998cdc1624c4fa253584bae7e13b9b653 | |
parent | 7292470335006b511f10529585de28184f7f5289 (diff) | |
download | nspr-hg-d279aa5661ae33770d1938e2956e5225e63da274.tar.gz |
Bug 915522: VS2013 support for NSPR. r=wtc.NSPR_4_10_2_BETA1
-rwxr-xr-x | configure | 52 | ||||
-rw-r--r-- | configure.in | 11 |
2 files changed, 40 insertions, 23 deletions
@@ -4618,6 +4618,12 @@ EOF PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" + if test "$MSC_VER" -ge "1800"; then + CFLAGS="$CFLAGS -FS" + PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw" + PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw" + fi + if test -z "$MOZ_OPTIMIZE"; then CFLAGS="$CFLAGS -Od" fi @@ -4922,17 +4928,17 @@ EOF _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000" ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6 -echo "configure:4926: checking for machine/builtins.h" >&5 +echo "configure:4932: checking for machine/builtins.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4931 "configure" +#line 4937 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5491,7 +5497,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5495: checking for dlopen in -ldl" >&5 +echo "configure:5501: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5499,7 +5505,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 5503 "configure" +#line 5509 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5510,7 +5516,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5527,17 +5533,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:5531: checking for dlfcn.h" >&5 +echo "configure:5537: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5536 "configure" +#line 5542 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5570,13 +5576,13 @@ esac if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:5574: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5580: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext <<EOF -#line 5580 "configure" +#line 5586 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -5594,7 +5600,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 5598 "configure" +#line 5604 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -5620,12 +5626,12 @@ LIBS="$LIBS $OS_LIBS" for ac_func in dladdr gettid lchown setpriority strerror syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5624: checking for $ac_func" >&5 +echo "configure:5630: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5629 "configure" +#line 5635 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5648,7 +5654,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5700,7 +5706,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5704: checking for $ac_word" >&5 +echo "configure:5710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5759,7 +5765,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5763: checking for +Olit support" >&5 +echo "configure:5769: checking for +Olit support" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5801,7 +5807,7 @@ wince*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5805: checking for pthread_create in -lpthreads" >&5 +echo "configure:5811: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5823,7 +5829,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5827: checking for pthread_create in -lpthread" >&5 +echo "configure:5833: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5845,7 +5851,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5849: checking for pthread_create in -lc_r" >&5 +echo "configure:5855: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5867,7 +5873,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5871: checking for pthread_create in -lc" >&5 +echo "configure:5877: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5985,7 +5991,7 @@ if test -n "$USE_PTHREADS"; then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:5989: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5995: checking whether ${CC-cc} accepts -pthread" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -6008,7 +6014,7 @@ echo "configure:5989: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:6012: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:6018: checking whether ${CC-cc} accepts -pthreads" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then diff --git a/configure.in b/configure.in index 3aae32fe..4b140c4e 100644 --- a/configure.in +++ b/configure.in @@ -1956,6 +1956,17 @@ tools are selected during the Xcode/Developer Tools installation.]) PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" + if test "$MSC_VER" -ge "1800"; then + dnl Visual C++ 2013 requires -FS when parallel building with + dnl make -jN. If not specified, compiler sometimes emits C1041 + dnl error. + CFLAGS="$CFLAGS -FS" + dnl -Gw can benefit when using linker optimization on PGO. + dnl http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx + PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw" + PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw" + fi + if test -z "$MOZ_OPTIMIZE"; then CFLAGS="$CFLAGS -Od" fi |