зеркало из https://github.com/mozilla/pjs.git
Use the proper flags when building with --enable-debug --enable-optimize.
Thanks to Wan-Teh Chang <wchang0222@aol.com> for the patch. Bug #243079 r=cls
This commit is contained in:
Родитель
8b8ed14f0a
Коммит
e8aebb8a91
|
@ -3890,6 +3890,18 @@ EOF
|
|||
MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
|
||||
|
||||
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
|
||||
DLLFLAGS='-OUT:"$@"'
|
||||
_DEBUG_FLAGS=-Z7
|
||||
_OPTIMIZE_FLAGS=-O2
|
||||
if test -z "$MOZ_OPTIMIZE"; then
|
||||
CFLAGS="$CFLAGS -Od"
|
||||
fi
|
||||
|
||||
if test -n "$USE_DEBUG_RTL"; then
|
||||
CFLAGS="$CFLAGS -MDd"
|
||||
else
|
||||
CFLAGS="$CFLAGS -MD"
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_DEBUG"; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
|
@ -3901,32 +3913,16 @@ EOF
|
|||
fi
|
||||
|
||||
if test -n "$MOZ_OPTIMIZE"; then
|
||||
CFLAGS="$CFLAGS -MD"
|
||||
_OPTIMIZE_FLAGS=-O2
|
||||
DLLFLAGS='-OUT:"$@"'
|
||||
|
||||
if test -n "$MOZ_PROFILE"; then
|
||||
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
|
||||
DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
fi
|
||||
else
|
||||
if test -n "$USE_DEBUG_RTL"; then
|
||||
CFLAGS="$CFLAGS -MDd"
|
||||
else
|
||||
CFLAGS="$CFLAGS -MD"
|
||||
fi
|
||||
_DEBUG_FLAGS="-Od -Z7"
|
||||
DLLFLAGS='-DEBUG -DEBUGTYPE:CV -OUT:"$@"'
|
||||
if test -n "$GLOWCODE"; then
|
||||
DLLFLAGS='-DEBUG -DEBUGTYPE:both -INCLUDE:_GlowCode -OUT:"$@"'
|
||||
DLL_LIBS='$(GLOWDIR)/glowcode.lib'
|
||||
fi
|
||||
LDFLAGS="-DEBUG -DEBUGTYPE:CV"
|
||||
if test -n "$PROFILE"; then
|
||||
LDFLAGS="$LDFLAGS -PROFILE -MAP"
|
||||
DLLFLAGS="$DLLFLAGS -PROFILE -MAP"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_DEBUG"; then
|
||||
DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
fi
|
||||
|
||||
if test "$OS_TARGET" = "WINNT"; then
|
||||
|
@ -4317,17 +4313,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:4321: checking for machine/builtins.h" >&5
|
||||
echo "configure:4317: 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 4326 "configure"
|
||||
#line 4322 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <machine/builtins.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4327: \"$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*
|
||||
|
@ -4862,7 +4858,7 @@ case $target in
|
|||
;;
|
||||
*)
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:4866: checking for dlopen in -ldl" >&5
|
||||
echo "configure:4862: 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
|
||||
|
@ -4870,7 +4866,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4874 "configure"
|
||||
#line 4870 "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
|
||||
|
@ -4881,7 +4877,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4881: \"$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
|
||||
|
@ -4898,17 +4894,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:4902: checking for dlfcn.h" >&5
|
||||
echo "configure:4898: 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 4907 "configure"
|
||||
#line 4903 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <dlfcn.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4908: \"$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*
|
||||
|
@ -4941,13 +4937,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:4945: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:4941: 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 4951 "configure"
|
||||
#line 4947 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -4965,7 +4961,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4969 "configure"
|
||||
#line 4965 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -4989,12 +4985,12 @@ fi
|
|||
for ac_func in lchown strerror
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:4993: checking for $ac_func" >&5
|
||||
echo "configure:4989: 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 4998 "configure"
|
||||
#line 4994 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -5017,7 +5013,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5017: \"$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
|
||||
|
@ -5058,7 +5054,7 @@ hpux*)
|
|||
if test -z "$GNU_CC"; then
|
||||
|
||||
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
|
||||
echo "configure:5062: checking for +Olit support" >&5
|
||||
echo "configure:5058: 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
|
||||
|
@ -5092,7 +5088,7 @@ esac
|
|||
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:5096: checking for pthread_create in -lpthreads" >&5
|
||||
echo "configure:5092: checking for pthread_create in -lpthreads" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5114,7 +5110,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:5118: checking for pthread_create in -lpthread" >&5
|
||||
echo "configure:5114: checking for pthread_create in -lpthread" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5136,7 +5132,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||
echo "configure:5140: checking for pthread_create in -lc_r" >&5
|
||||
echo "configure:5136: checking for pthread_create in -lc_r" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5158,7 +5154,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||
echo "configure:5162: checking for pthread_create in -lc" >&5
|
||||
echo "configure:5158: checking for pthread_create in -lc" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5310,7 +5306,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:5314: checking whether ${CC-cc} accepts -pthread" >&5
|
||||
echo "configure:5310: 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
|
||||
|
@ -5333,7 +5329,7 @@ echo "configure:5314: 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:5337: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||
echo "configure:5333: 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
|
||||
|
|
|
@ -1268,6 +1268,18 @@ case "$target" in
|
|||
MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
|
||||
|
||||
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
|
||||
DLLFLAGS='-OUT:"$@"'
|
||||
_DEBUG_FLAGS=-Z7
|
||||
_OPTIMIZE_FLAGS=-O2
|
||||
if test -z "$MOZ_OPTIMIZE"; then
|
||||
CFLAGS="$CFLAGS -Od"
|
||||
fi
|
||||
|
||||
if test -n "$USE_DEBUG_RTL"; then
|
||||
CFLAGS="$CFLAGS -MDd"
|
||||
else
|
||||
CFLAGS="$CFLAGS -MD"
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_DEBUG"; then
|
||||
AC_DEFINE(_DEBUG)
|
||||
|
@ -1276,32 +1288,16 @@ case "$target" in
|
|||
fi
|
||||
|
||||
if test -n "$MOZ_OPTIMIZE"; then
|
||||
CFLAGS="$CFLAGS -MD"
|
||||
_OPTIMIZE_FLAGS=-O2
|
||||
DLLFLAGS='-OUT:"$@"'
|
||||
|
||||
if test -n "$MOZ_PROFILE"; then
|
||||
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
|
||||
DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
fi
|
||||
else
|
||||
if test -n "$USE_DEBUG_RTL"; then
|
||||
CFLAGS="$CFLAGS -MDd"
|
||||
else
|
||||
CFLAGS="$CFLAGS -MD"
|
||||
fi
|
||||
_DEBUG_FLAGS="-Od -Z7"
|
||||
DLLFLAGS='-DEBUG -DEBUGTYPE:CV -OUT:"$@"'
|
||||
if test -n "$GLOWCODE"; then
|
||||
DLLFLAGS='-DEBUG -DEBUGTYPE:both -INCLUDE:_GlowCode -OUT:"$@"'
|
||||
DLL_LIBS='$(GLOWDIR)/glowcode.lib'
|
||||
fi
|
||||
LDFLAGS="-DEBUG -DEBUGTYPE:CV"
|
||||
if test -n "$PROFILE"; then
|
||||
LDFLAGS="$LDFLAGS -PROFILE -MAP"
|
||||
DLLFLAGS="$DLLFLAGS -PROFILE -MAP"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_DEBUG"; then
|
||||
DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
|
||||
fi
|
||||
|
||||
if test "$OS_TARGET" = "WINNT"; then
|
||||
|
|
Загрузка…
Ссылка в новой задаче