Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ba01583e
Commit
ba01583e
authored
Jun 30, 2012
by
doko@ubuntu.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Issue #14324: use a linker test to check for profiling support
parent
51f65940
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
39 deletions
+38
-39
configure
configure
+20
-22
configure.ac
configure.ac
+18
-17
No files found.
configure
View file @
ba01583e
...
...
@@ -3211,7 +3211,7 @@ then
linux
*
)
MACHDEP
=
"linux"
;;
cygwin
*
)
MACHDEP
=
"cygwin"
;;
darwin
*
)
MACHDEP
=
"darwin"
;;
irix646
)
MACHDEP
=
"irix6"
;;
irix646
)
MACHDEP
=
"irix6"
;;
''
)
MACHDEP
=
"unknown"
;;
esac
fi
...
...
@@ -5424,37 +5424,35 @@ $as_echo "$enable_shared" >&6; }
$as_echo_n
"checking for --enable-profiling... "
>
&6
;
}
# Check whether --enable-profiling was given.
if
test
"
${
enable_profiling
+set
}
"
=
set
;
then
:
enableval
=
$enable_profiling
;
ac_save_cc
=
"
$CC
"
CC
=
"
$CC
-pg"
if
test
"
$cross_compiling
"
=
yes
;
then
:
ac_enable_profiling
=
"no"
else
enableval
=
$enable_profiling
;
fi
if
test
"x
$enable_profiling
"
=
xyes
;
then
ac_save_cc
=
"
$CC
"
CC
=
"
$(
CC
)
-pg"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int main() { return 0; }
_ACEOF
if
ac_fn_c_try_
run
"
$LINENO
"
;
then
:
ac_enable_profiling
=
"yes"
if
ac_fn_c_try_
link
"
$LINENO
"
;
then
:
else
ac_enable_profiling
=
"no"
enable_profiling
=
no
fi
rm
-f
core
*
.core core.conftest.
*
gmon.out bb.out conftest
$ac_exeext
\
conftest.
$ac_objext
conftest.beam conftest.
$ac_ext
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
CC
=
"
$ac_save_cc
"
else
enable_profiling
=
no
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$enable_profiling
"
>
&5
$as_echo
"
$enable_profiling
"
>
&6
;
}
CC
=
"
$ac_save_cc
"
if
test
"x
$enable_profiling
"
=
xyes
;
then
BASECFLAGS
=
"-pg
$BASECFLAGS
"
LDFLAGS
=
"-pg
$LDFLAGS
"
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_enable_profiling
"
>
&5
$as_echo
"
$ac_enable_profiling
"
>
&6
;
}
case
"
$ac_enable_profiling
"
in
"yes"
)
BASECFLAGS
=
"-pg
$BASECFLAGS
"
LDFLAGS
=
"-pg
$LDFLAGS
"
;;
esac
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking LDLIBRARY"
>
&5
$as_echo_n
"checking LDLIBRARY... "
>
&6
;
}
...
...
configure.ac
View file @
ba01583e
...
...
@@ -348,7 +348,7 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
irix646) MACHDEP="irix6";;
irix646) MACHDEP="irix6";;
'') MACHDEP="unknown";;
esac
fi
...
...
@@ -813,22 +813,23 @@ AC_MSG_RESULT($enable_shared)
AC_MSG_CHECKING(for --enable-profiling)
AC_ARG_ENABLE(profiling,
AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]),
[ac_save_cc="$CC"
CC="$CC -pg"
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
[ac_enable_profiling="yes"],
[ac_enable_profiling="no"],
[ac_enable_profiling="no"])
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_enable_profiling)
case "$ac_enable_profiling" in
"yes")
BASECFLAGS="-pg $BASECFLAGS"
LDFLAGS="-pg $LDFLAGS"
;;
esac
AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]))
if test "x$enable_profiling" = xyes; then
ac_save_cc="$CC"
CC="$(CC) -pg"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
[],
[enable_profiling=no])
CC="$ac_save_cc"
else
enable_profiling=no
fi
AC_MSG_RESULT($enable_profiling)
if test "x$enable_profiling" = xyes; then
BASECFLAGS="-pg $BASECFLAGS"
LDFLAGS="-pg $LDFLAGS"
fi
AC_MSG_CHECKING(LDLIBRARY)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment