File tree 1 file changed +17
-6
lines changed
1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ OPENSSLDIR=/src/openssl
32
32
NGHTTPDIR=/src/nghttp2
33
33
GDBDIR=/src/gdb
34
34
35
+ # Check for GDB-specific behaviour by checking for the GDBMODE flag.
36
+ # - Compile with -O0 so that DEBUGASSERTs can be debugged in gdb.
37
+ if [[ -n ${GDBMODE:- } ]]
38
+ then
39
+ export CFLAGS=" $CFLAGS -O0"
40
+ export CXXFLAGS=" $CXXFLAGS -O0"
41
+ fi
42
+
35
43
echo " BUILD_ROOT: $BUILD_ROOT "
36
44
echo " SRC: ${SRC:- undefined} "
37
45
echo " CC: $CC "
@@ -47,13 +55,16 @@ export MAKEFLAGS+="-j$(nproc)"
47
55
# Make an install directory
48
56
export INSTALLDIR=/src/curl_install
49
57
50
- # If necessary (i.e. this is inside the ossfuzz shell environment and
51
- # you've set the environment variable) then download and install GDB.
52
- # This installs to the default configure location.
53
- if [[ ${INSTALLGDB:- } == " yes" ]]
58
+ # Check for GDB-specific behaviour by checking for the GDBMODE flag.
59
+ # - Compile and installing GDB if necessary.
60
+ if [[ -n ${GDBMODE:- } ]]
54
61
then
55
- # Install GDB
56
- ${SCRIPTDIR} /handle_x.sh gdb ${GDBDIR} system || exit 1
62
+ if ! type gdb 2> /dev/null
63
+ then
64
+ # If gdb isn't found, then download and install GDB.
65
+ # This installs to the default configure location.
66
+ ${SCRIPTDIR} /handle_x.sh gdb ${GDBDIR} system || exit 1
67
+ fi
57
68
fi
58
69
59
70
# Install zlib
You can’t perform that action at this time.
0 commit comments