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
9971220e
Commit
9971220e
authored
Jan 04, 2017
by
Xavier de Gaye
Browse files
Options
Browse Files
Download
Plain Diff
Issue #26851: Merge 3.6.
parents
150257e3
2a352b66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
4 deletions
+36
-4
Misc/NEWS
Misc/NEWS
+2
-0
configure
configure
+18
-2
configure.ac
configure.ac
+16
-2
No files found.
Misc/NEWS
View file @
9971220e
...
@@ -608,6 +608,8 @@ Documentation
...
@@ -608,6 +608,8 @@ Documentation
Build
Build
-----
-----
- Issue #26851: Set Android compilation and link flags.
- Issue #28768: Fix implicit declaration of function _setmode. Patch by
- Issue #28768: Fix implicit declaration of function _setmode. Patch by
Masayuki Yamamoto
Masayuki Yamamoto
...
...
configure
View file @
9971220e
...
@@ -3247,6 +3247,9 @@ then
...
@@ -3247,6 +3247,9 @@ then
# a lot of different things including 'define_xopen_source'
# a lot of different things including 'define_xopen_source'
# in the case statement below.
# in the case statement below.
case
"
$host
"
in
case
"
$host
"
in
*
-
*
-linux-android
*
)
ac_sys_system
=
Linux-android
;;
*
-
*
-linux
*
)
*
-
*
-linux
*
)
ac_sys_system
=
Linux
ac_sys_system
=
Linux
;;
;;
...
@@ -5640,14 +5643,16 @@ $as_echo_n "checking for the Android API level... " >&6; }
...
@@ -5640,14 +5643,16 @@ $as_echo_n "checking for the Android API level... " >&6; }
cat
>>
conftest.c
<<
EOF
cat
>>
conftest.c
<<
EOF
#ifdef __ANDROID__
#ifdef __ANDROID__
#include <android/api-level.h>
#include <android/api-level.h>
__ANDROID_API__
android_api = __ANDROID_API__
arm_arch = __ARM_ARCH
#else
#else
#error not Android
#error not Android
#endif
#endif
EOF
EOF
if
$CPP
$CPPFLAGS
conftest.c
>
conftest.out 2>/dev/null
;
then
if
$CPP
$CPPFLAGS
conftest.c
>
conftest.out 2>/dev/null
;
then
ANDROID_API_LEVEL
=
`
grep
-v
'^#'
conftest.out |
grep
-v
'^ *$'
`
ANDROID_API_LEVEL
=
`
sed
-n
-e
'/__ANDROID_API__/d'
-e
's/^android_api = //p'
conftest.out
`
_arm_arch
=
`
sed
-n
-e
'/__ARM_ARCH/d'
-e
's/^arm_arch = //p'
conftest.out
`
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ANDROID_API_LEVEL
"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ANDROID_API_LEVEL
"
>
&5
$as_echo
"
$ANDROID_API_LEVEL
"
>
&6
;
}
$as_echo
"
$ANDROID_API_LEVEL
"
>
&6
;
}
...
@@ -5655,6 +5660,15 @@ cat >>confdefs.h <<_ACEOF
...
@@ -5655,6 +5660,15 @@ cat >>confdefs.h <<_ACEOF
#define ANDROID_API_LEVEL
$ANDROID_API_LEVEL
#define ANDROID_API_LEVEL
$ANDROID_API_LEVEL
_ACEOF
_ACEOF
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for the Android arm ABI"
>
&5
$as_echo_n
"checking for the Android arm ABI... "
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$_arm_arch
"
>
&5
$as_echo
"
$_arm_arch
"
>
&6
;
}
if
test
"
$_arm_arch
"
=
7
;
then
BASECFLAGS
=
"
${
BASECFLAGS
}
-mfloat-abi=softfp -mfpu=vfpv3-d16"
LDFLAGS
=
"
${
LDFLAGS
}
-march=armv7-a -Wl,--fix-cortex-a8"
fi
else
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: not Android"
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: not Android"
>
&5
$as_echo
"not Android"
>
&6
;
}
$as_echo
"not Android"
>
&6
;
}
...
@@ -9281,6 +9295,7 @@ then
...
@@ -9281,6 +9295,7 @@ then
then
CCSHARED
=
"-fPIC"
;
then
CCSHARED
=
"-fPIC"
;
else
CCSHARED
=
"+z"
;
else
CCSHARED
=
"+z"
;
fi
;;
fi
;;
Linux-android
*
)
;;
Linux
*
|
GNU
*
)
CCSHARED
=
"-fPIC"
;;
Linux
*
|
GNU
*
)
CCSHARED
=
"-fPIC"
;;
BSD/OS
*
/4
*
)
CCSHARED
=
"-fpic"
;;
BSD/OS
*
/4
*
)
CCSHARED
=
"-fpic"
;;
FreeBSD
*
|
NetBSD
*
|
OpenBSD
*
|
DragonFly
*
)
CCSHARED
=
"-fPIC"
;;
FreeBSD
*
|
NetBSD
*
|
OpenBSD
*
|
DragonFly
*
)
CCSHARED
=
"-fPIC"
;;
...
@@ -9314,6 +9329,7 @@ then
...
@@ -9314,6 +9329,7 @@ then
LINKFORSHARED
=
"-Wl,-E -Wl,+s"
;;
LINKFORSHARED
=
"-Wl,-E -Wl,+s"
;;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4
*
)
LINKFORSHARED
=
"-Xlinker -export-dynamic"
;;
BSD/OS/4
*
)
LINKFORSHARED
=
"-Xlinker -export-dynamic"
;;
Linux-android
*
)
LINKFORSHARED
=
"-pie -Xlinker -export-dynamic"
;;
Linux
*
|
GNU
*
)
LINKFORSHARED
=
"-Xlinker -export-dynamic"
;;
Linux
*
|
GNU
*
)
LINKFORSHARED
=
"-Xlinker -export-dynamic"
;;
# -u libsys_s pulls in all symbols in libsys
# -u libsys_s pulls in all symbols in libsys
Darwin/
*
)
Darwin/
*
)
...
...
configure.ac
View file @
9971220e
...
@@ -379,6 +379,9 @@ then
...
@@ -379,6 +379,9 @@ then
# a lot of different things including 'define_xopen_source'
# a lot of different things including 'define_xopen_source'
# in the case statement below.
# in the case statement below.
case "$host" in
case "$host" in
*-*-linux-android*)
ac_sys_system=Linux-android
;;
*-*-linux*)
*-*-linux*)
ac_sys_system=Linux
ac_sys_system=Linux
;;
;;
...
@@ -913,16 +916,25 @@ AC_MSG_CHECKING([for the Android API level])
...
@@ -913,16 +916,25 @@ AC_MSG_CHECKING([for the Android API level])
cat >> conftest.c <<EOF
cat >> conftest.c <<EOF
#ifdef __ANDROID__
#ifdef __ANDROID__
#include <android/api-level.h>
#include <android/api-level.h>
__ANDROID_API__
android_api = __ANDROID_API__
arm_arch = __ARM_ARCH
#else
#else
#error not Android
#error not Android
#endif
#endif
EOF
EOF
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
_arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
AC_MSG_RESULT([$ANDROID_API_LEVEL])
AC_MSG_RESULT([$ANDROID_API_LEVEL])
AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.])
AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.])
AC_MSG_CHECKING([for the Android arm ABI])
AC_MSG_RESULT([$_arm_arch])
if test "$_arm_arch" = 7; then
BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
fi
else
else
AC_MSG_RESULT([not Android])
AC_MSG_RESULT([not Android])
fi
fi
...
@@ -2535,6 +2547,7 @@ then
...
@@ -2535,6 +2547,7 @@ then
then CCSHARED="-fPIC";
then CCSHARED="-fPIC";
else CCSHARED="+z";
else CCSHARED="+z";
fi;;
fi;;
Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";;
Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
...
@@ -2566,6 +2579,7 @@ then
...
@@ -2566,6 +2579,7 @@ then
LINKFORSHARED="-Wl,-E -Wl,+s";;
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
Darwin/*)
...
...
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