summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbryner%brianryner.com <devnull@localhost>2004-09-14 21:14:38 +0000
committerbryner%brianryner.com <devnull@localhost>2004-09-14 21:14:38 +0000
commit93adf19907cdeab1b5a5a33179ce3f5c31af6778 (patch)
treeb1361c71518ad216a58c31dcc1ae30185856fa41
parente2afd28e636f0c7f2cb90e0f73117d29c253bf4c (diff)
downloadnspr-hg-MOZILLA_1_7_5_RELEASE.tar.gz
Add support for generating PDB-format debug symbols with MSVC, by setting MOZ_DEBUG_SYMBOLS=1 in the environment. This is to be used in place of MOZ_PROFILE. Bug 244231, r=wtc, dmose, a=asa.MOZILLA_1_7_5_RELEASE
-rwxr-xr-xconfigure58
-rw-r--r--configure.in14
2 files changed, 44 insertions, 28 deletions
diff --git a/configure b/configure
index ede750ec..54f5983f 100755
--- a/configure
+++ b/configure
@@ -3897,8 +3897,13 @@ EOF
if test -n "$MOZ_PROFILE"; then
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
- DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
- LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
+ fi
+ if test -n "$MOZ_DEBUG_SYMBOLS"; then
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
+ fi
+ if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
+ DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
+ LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
fi
else
if test -n "$USE_DEBUG_RTL"; then
@@ -3967,7 +3972,10 @@ EOF
OBJDIR_SUFFIX=OBJD
fi
- OS_DLLFLAGS='-nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE'
+ OS_DLLFLAGS='-nologo -DLL -SUBSYSTEM:WINDOWS'
+ if test -z "$MOZ_DEBUG_SYMBOLS"; then
+ OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
+ fi
case "$OS_TARGET" in
WINNT)
@@ -4304,17 +4312,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:4308: checking for machine/builtins.h" >&5
+echo "configure:4316: 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 4313 "configure"
+#line 4321 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4326: \"$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*
@@ -4841,7 +4849,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4845: checking for dlopen in -ldl" >&5
+echo "configure:4853: 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
@@ -4849,7 +4857,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4853 "configure"
+#line 4861 "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
@@ -4860,7 +4868,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4872: \"$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
@@ -4877,17 +4885,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:4881: checking for dlfcn.h" >&5
+echo "configure:4889: 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 4886 "configure"
+#line 4894 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4899: \"$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*
@@ -4920,13 +4928,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:4924: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4932: 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 4930 "configure"
+#line 4938 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4944,7 +4952,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4948 "configure"
+#line 4956 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4968,12 +4976,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4972: checking for $ac_func" >&5
+echo "configure:4980: 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 4977 "configure"
+#line 4985 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4996,7 +5004,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5008: \"$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
@@ -5037,7 +5045,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5041: checking for +Olit support" >&5
+echo "configure:5049: 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
@@ -5071,7 +5079,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5075: checking for pthread_create in -lpthreads" >&5
+echo "configure:5083: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5093,7 +5101,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5097: checking for pthread_create in -lpthread" >&5
+echo "configure:5105: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5115,7 +5123,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5119: checking for pthread_create in -lc_r" >&5
+echo "configure:5127: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5137,7 +5145,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5141: checking for pthread_create in -lc" >&5
+echo "configure:5149: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5289,7 +5297,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:5293: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5301: 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
@@ -5312,7 +5320,7 @@ echo "configure:5293: 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:5316: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5324: 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 ac95bc01..10cdb2a7 100644
--- a/configure.in
+++ b/configure.in
@@ -1272,8 +1272,13 @@ case "$target" in
if test -n "$MOZ_PROFILE"; then
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
- DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
- LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
+ fi
+ if test -n "$MOZ_DEBUG_SYMBOLS"; then
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
+ fi
+ if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
+ DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
+ LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
fi
else
if test -n "$USE_DEBUG_RTL"; then
@@ -1330,7 +1335,10 @@ case "$target" in
OBJDIR_SUFFIX=OBJD
fi
- OS_DLLFLAGS='-nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE'
+ OS_DLLFLAGS='-nologo -DLL -SUBSYSTEM:WINDOWS'
+ if test -z "$MOZ_DEBUG_SYMBOLS"; then
+ OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
+ fi
case "$OS_TARGET" in
WINNT)