Skip to content

Commit b128896

Browse files
authored
bpo-46602: Do not append conftest.c (GH-31062)
The heredoc creation statements use >> to append conftest.c. This can cause tricky build issues if the file is not correctly removed prior to its name being reused (such name is reused several times for different contextual tests during the build). One such result from appending may cause #include <ac_nonexistent.h> to persist when testing to acquire PLATFORM_TRIPLET. This can then lead to downstream issues concerning SOABI.
1 parent 0611eaf commit b128896

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Tidied up configure.ac so that conftest.c is truncated rather than appended. This assists in the case where the 'rm' of conftest.c fails to happen between tests. Downstream issues such as a clobbered SOABI can result.

configure

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ fi
833833

834834

835835
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
836-
cat >> conftest.c <<EOF
836+
cat > conftest.c <<EOF
837837
#undef bfin
838838
#undef cris
839839
#undef fr30
@@ -1028,7 +1028,7 @@ AC_CACHE_CHECK([for -Wl,--no-as-needed], [ac_cv_wl_no_as_needed], [
10281028
AC_SUBST(NO_AS_NEEDED)
10291029

10301030
AC_MSG_CHECKING([for the Android API level])
1031-
cat >> conftest.c <<EOF
1031+
cat > conftest.c <<EOF
10321032
#ifdef __ANDROID__
10331033
android_api = __ANDROID_API__
10341034
arm_arch = __ARM_ARCH

0 commit comments

Comments
 (0)