Skip to content

Commit 22e0527

Browse files
committed
Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
This patch updates GCC to use autoconf 2.69 and automake 1.15.1. (That's not the latest automake version, but it's the one used by binutils-gdb, with which consistency is desirable, and in any case seems a useful incremental update that should make a future update to 1.16.1 easier.) The changes are generally similar to the binutils-gdb ones, and are copied from there where shared files and directories are involved (there are some further changes to such shared directories, however, which I'd expect to apply to binutils-gdb once this patch is in GCC). Largely, obsolete AC_PREREQ calls are removed, while many AC_LANG_SOURCE calls are added to avoid warnings from aclocal and autoconf. Multilib support is no longer included in core automake, meaning that multilib.am needs copying from automake's contrib directory into the GCC source tree. Autoconf 2.69 has Go support, so local copies of that support are removed. I hope the D support will soon be submitted to upstream autoconf so the local copy of that can be removed in a future update. Changes to how automake generates runtest calls mean quotes are removed from RUNTEST definitions in five lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm, libphobos, libvtv; some others have RUNTEST definitions without quotes, which are still OK); libgo and libphobos also get -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST do not generate automake warnings. Note that the regeneration did not include regeneration of fixincludes/config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditionals disappearing; and I don't see anything in the fixincludes/ directory that would result in such conditionals being generated, unlike in the gcc/ directory). Also note that libvtv/testsuite/other-tests/Makefile.in was not regenerated; that directory is not listed as a subdirectory for which Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm not sure how it's meant to be regenerated. While I mostly fixed warnings should running aclocal / automake / autoconf, there were various such warnings from automake in the libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos directories that I did not fix, preferring to leave those to the relevant subsystem maintainers. Specifically, most of those warnings were of the following form (example from libgfortran): Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory, Makefile.am:48: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. I think it's best for the relevant maintainers to add subdir-objects and do any other associated Makefile.am changes needed. In some cases the paths in the warnings involved ../; I don't know if that adds any extra complications to the use of subdir-objects. I've tested this with native, cross and Canadian cross builds. The risk of any OS-specific issues should I hope be rather lower than if a libtool upgrade were included (we *should* do such an upgrade at some point, but it's more complicated - it involves identifying all our local libtool changes to see if any aren't included in the upstream version we update to, and reverting an upstream libtool patch that's inappropriate for use in GCC); I think it would be better to get this update into GCC so that people can test in different configurations and we can fix any issues found, rather than to try to get more and more testing done before it goes in. top level: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * multilib.am: New file. From automake. Merge from binutils-gdb: 2018-06-19 Simon Marchi <[email protected]> * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. config: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * math.m4, tls.m4: Use AC_LANG_SOURCE. Merge from binutils-gdb: 2018-06-19 Simon Marchi <[email protected]> * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. fixincludes: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, configure: Regenerate. gcc: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single line for second argument of AC_DEFINE_UNQUOTED. * doc/install.texi (Tools/packages necessary for modifying GCC): Update to autoconf 2.69 and automake 1.15.1. * aclocal.m4, config.in, configure: Regenerate. gnattools: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. gotools: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * config/go.m4: Remove file. * Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config. * configure.ac: Remove AC_PREREQ. Do not include config/go.m4. * Makefile.in, aclocal.m4, configure: Regenerate. intl: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <[email protected]> * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. libada: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. libatomic: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * acinclude.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libbacktrace: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libcc1: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libcpp: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * aclocal.m4, config.in, configure: Regenerate. libdecnumber: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <[email protected]> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libffi: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove doc/libffi.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, fficonfig.h.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in: Regenerate. libgcc: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * configure: Regenerate. libgfortran: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libgo [logically part of this change but omitted from the commit]: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * config/go.m4: Remove file. * config/libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use -Wno-override in AM_INIT_AUTOMAKE call. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libgomp: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libgomp.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libhsail-rt: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libiberty: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <[email protected]> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. libitm: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libitm.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libobjc: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, config.h.in, configure: Regenerate. liboffloadmic: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * plugin/Makefile.am: Include multilib.am. * plugin/configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, plugin/Makefile.in, plugin/aclocal.m4, plugin/configure: Regenerate. libphobos: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use -Wno-override in AM_INIT_AUTOMAKE call. * m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call. * m4/druntime/os.m4: Use AC_LANG_SOURCE. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in, src/Makefile.in, testsuite/Makefile.in: Regenerate. libquadmath: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.8. Add info-in-builddir. (all-local): Define outside conditional code. (CLEANFILES): Remove libquadmath.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libsanitizer: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, asan/Makefile.in, configure, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate. libssp: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.9.5. * configure.ac: Remove AC_PREREQ. Quote argument to AC_RUN_IFELSE. * Makefile.in, aclocal.m4, configure: Regenerate. libstdc++-v3: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in, src/c++17/Makefile.in, src/c++98/Makefile.in, src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate. libvtv: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. lto-plugin: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. zlib: 2018-10-31 Joseph Myers <[email protected]> PR bootstrap/82856 * Makefile.am: Include multilib.am. Merge from binutils-gdb: 2018-06-19 Simon Marchi <[email protected]> * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. From-SVN: r265695
1 parent d8b1c3f commit 22e0527

File tree

205 files changed

+48207
-35480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+48207
-35480
lines changed

ChangeLog

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2018-10-31 Joseph Myers <[email protected]>
2+
3+
PR bootstrap/82856
4+
* multilib.am: New file. From automake.
5+
6+
Merge from binutils-gdb:
7+
2018-06-19 Simon Marchi <[email protected]>
8+
9+
* libtool.m4: Use AC_LANG_SOURCE.
10+
* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
11+
* ar-lib: New file.
12+
* test-driver: New file.
13+
* configure: Re-generate.
14+
115
2018-10-31 Michael Ploujnikov <[email protected]>
216

317
* MAINTAINERS (Write After Approval): Add myself.

ar-lib

+270
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
#! /bin/sh
2+
# Wrapper for Microsoft lib.exe
3+
4+
me=ar-lib
5+
scriptversion=2012-03-01.08; # UTC
6+
7+
# Copyright (C) 2010-2017 Free Software Foundation, Inc.
8+
# Written by Peter Rosin <[email protected]>.
9+
#
10+
# This program is free software; you can redistribute it and/or modify
11+
# it under the terms of the GNU General Public License as published by
12+
# the Free Software Foundation; either version 2, or (at your option)
13+
# any later version.
14+
#
15+
# This program is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
# GNU General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU General Public License
21+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
22+
23+
# As a special exception to the GNU General Public License, if you
24+
# distribute this file as part of a program that contains a
25+
# configuration script generated by Autoconf, you may include it under
26+
# the same distribution terms that you use for the rest of that program.
27+
28+
# This file is maintained in Automake, please report
29+
# bugs to <[email protected]> or send patches to
30+
31+
32+
33+
# func_error message
34+
func_error ()
35+
{
36+
echo "$me: $1" 1>&2
37+
exit 1
38+
}
39+
40+
file_conv=
41+
42+
# func_file_conv build_file
43+
# Convert a $build file to $host form and store it in $file
44+
# Currently only supports Windows hosts.
45+
func_file_conv ()
46+
{
47+
file=$1
48+
case $file in
49+
/ | /[!/]*) # absolute file, and not a UNC file
50+
if test -z "$file_conv"; then
51+
# lazily determine how to convert abs files
52+
case `uname -s` in
53+
MINGW*)
54+
file_conv=mingw
55+
;;
56+
CYGWIN*)
57+
file_conv=cygwin
58+
;;
59+
*)
60+
file_conv=wine
61+
;;
62+
esac
63+
fi
64+
case $file_conv in
65+
mingw)
66+
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
67+
;;
68+
cygwin)
69+
file=`cygpath -m "$file" || echo "$file"`
70+
;;
71+
wine)
72+
file=`winepath -w "$file" || echo "$file"`
73+
;;
74+
esac
75+
;;
76+
esac
77+
}
78+
79+
# func_at_file at_file operation archive
80+
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
81+
# for each of them.
82+
# When interpreting the content of the @FILE, do NOT use func_file_conv,
83+
# since the user would need to supply preconverted file names to
84+
# binutils ar, at least for MinGW.
85+
func_at_file ()
86+
{
87+
operation=$2
88+
archive=$3
89+
at_file_contents=`cat "$1"`
90+
eval set x "$at_file_contents"
91+
shift
92+
93+
for member
94+
do
95+
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
96+
done
97+
}
98+
99+
case $1 in
100+
'')
101+
func_error "no command. Try '$0 --help' for more information."
102+
;;
103+
-h | --h*)
104+
cat <<EOF
105+
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
106+
107+
Members may be specified in a file named with @FILE.
108+
EOF
109+
exit $?
110+
;;
111+
-v | --v*)
112+
echo "$me, version $scriptversion"
113+
exit $?
114+
;;
115+
esac
116+
117+
if test $# -lt 3; then
118+
func_error "you must specify a program, an action and an archive"
119+
fi
120+
121+
AR=$1
122+
shift
123+
while :
124+
do
125+
if test $# -lt 2; then
126+
func_error "you must specify a program, an action and an archive"
127+
fi
128+
case $1 in
129+
-lib | -LIB \
130+
| -ltcg | -LTCG \
131+
| -machine* | -MACHINE* \
132+
| -subsystem* | -SUBSYSTEM* \
133+
| -verbose | -VERBOSE \
134+
| -wx* | -WX* )
135+
AR="$AR $1"
136+
shift
137+
;;
138+
*)
139+
action=$1
140+
shift
141+
break
142+
;;
143+
esac
144+
done
145+
orig_archive=$1
146+
shift
147+
func_file_conv "$orig_archive"
148+
archive=$file
149+
150+
# strip leading dash in $action
151+
action=${action#-}
152+
153+
delete=
154+
extract=
155+
list=
156+
quick=
157+
replace=
158+
index=
159+
create=
160+
161+
while test -n "$action"
162+
do
163+
case $action in
164+
d*) delete=yes ;;
165+
x*) extract=yes ;;
166+
t*) list=yes ;;
167+
q*) quick=yes ;;
168+
r*) replace=yes ;;
169+
s*) index=yes ;;
170+
S*) ;; # the index is always updated implicitly
171+
c*) create=yes ;;
172+
u*) ;; # TODO: don't ignore the update modifier
173+
v*) ;; # TODO: don't ignore the verbose modifier
174+
*)
175+
func_error "unknown action specified"
176+
;;
177+
esac
178+
action=${action#?}
179+
done
180+
181+
case $delete$extract$list$quick$replace,$index in
182+
yes,* | ,yes)
183+
;;
184+
yesyes*)
185+
func_error "more than one action specified"
186+
;;
187+
*)
188+
func_error "no action specified"
189+
;;
190+
esac
191+
192+
if test -n "$delete"; then
193+
if test ! -f "$orig_archive"; then
194+
func_error "archive not found"
195+
fi
196+
for member
197+
do
198+
case $1 in
199+
@*)
200+
func_at_file "${1#@}" -REMOVE "$archive"
201+
;;
202+
*)
203+
func_file_conv "$1"
204+
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
205+
;;
206+
esac
207+
done
208+
209+
elif test -n "$extract"; then
210+
if test ! -f "$orig_archive"; then
211+
func_error "archive not found"
212+
fi
213+
if test $# -gt 0; then
214+
for member
215+
do
216+
case $1 in
217+
@*)
218+
func_at_file "${1#@}" -EXTRACT "$archive"
219+
;;
220+
*)
221+
func_file_conv "$1"
222+
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
223+
;;
224+
esac
225+
done
226+
else
227+
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
228+
do
229+
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
230+
done
231+
fi
232+
233+
elif test -n "$quick$replace"; then
234+
if test ! -f "$orig_archive"; then
235+
if test -z "$create"; then
236+
echo "$me: creating $orig_archive"
237+
fi
238+
orig_archive=
239+
else
240+
orig_archive=$archive
241+
fi
242+
243+
for member
244+
do
245+
case $1 in
246+
@*)
247+
func_file_conv "${1#@}"
248+
set x "$@" "@$file"
249+
;;
250+
*)
251+
func_file_conv "$1"
252+
set x "$@" "$file"
253+
;;
254+
esac
255+
shift
256+
shift
257+
done
258+
259+
if test -n "$orig_archive"; then
260+
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
261+
else
262+
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
263+
fi
264+
265+
elif test -n "$list"; then
266+
if test ! -f "$orig_archive"; then
267+
func_error "archive not found"
268+
fi
269+
$AR -NOLOGO -LIST "$archive" || exit $?
270+
fi

config/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2018-10-31 Joseph Myers <[email protected]>
2+
3+
PR bootstrap/82856
4+
* math.m4, tls.m4: Use AC_LANG_SOURCE.
5+
6+
Merge from binutils-gdb:
7+
2018-06-19 Simon Marchi <[email protected]>
8+
9+
* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.
10+
111
2018-10-28 Iain Buclaw <[email protected]>
212

313
* multi.m4: Set GDC.

config/math.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ AC_DEFUN([GCC_CHECK_MATH_FUNC],
2525
AC_REQUIRE([GCC_CHECK_LIBM])
2626
AC_REQUIRE([GCC_CHECK_MATH_HEADERS])
2727
AC_CACHE_CHECK([for $1], [gcc_cv_math_func_$1],
28-
[AC_LINK_IFELSE([
28+
[AC_LINK_IFELSE([AC_LANG_SOURCE([
2929
#ifdef HAVE_COMPLEX_H
3030
#include <complex.h>
3131
#endif
@@ -40,7 +40,7 @@ main ()
4040
{
4141
return 0;
4242
}
43-
],
43+
])],
4444
[gcc_cv_math_func_$1=yes],
4545
[gcc_cv_math_func_$1=no])])
4646
if test $gcc_cv_math_func_$1 = yes; then

config/override.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ m4_copy_force([_AC_PREREQ], [AC_PREREQ])
2929
3030
dnl Ensure exactly this Autoconf version is used
3131
m4_ifndef([_GCC_AUTOCONF_VERSION],
32-
[m4_define([_GCC_AUTOCONF_VERSION], [2.64])])
32+
[m4_define([_GCC_AUTOCONF_VERSION], [2.69])])
3333
3434
dnl Test for the exact version when AC_INIT is expanded.
3535
dnl This allows to update the tree in steps (for testing)

config/tls.m4

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ AC_DEFUN([GCC_CHECK_TLS], [
44
GCC_ENABLE(tls, yes, [], [Use thread-local storage])
55
AC_CACHE_CHECK([whether the target supports thread-local storage],
66
gcc_cv_have_tls, [
7-
AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
7+
AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
88
[dnl If the test case passed with dynamic linking, try again with
99
dnl static linking, but only if static linking is supported (not
1010
dnl on Solaris 10). This fails with some older Red Hat releases.
1111
chktls_save_LDFLAGS="$LDFLAGS"
1212
LDFLAGS="-static $LDFLAGS"
13-
AC_LINK_IFELSE([int main() { return 0; }],
14-
[AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
13+
AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
14+
[AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
1515
[gcc_cv_have_tls=yes], [gcc_cv_have_tls=no],[])],
1616
[gcc_cv_have_tls=yes])
1717
LDFLAGS="$chktls_save_LDFLAGS"
@@ -71,7 +71,7 @@ AC_DEFUN([GCC_CHECK_TLS], [
7171
[gcc_cv_have_tls=no],
7272
[dnl This is the cross-compiling case. Assume libc supports TLS if the
7373
dnl binutils and the compiler do.
74-
AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
74+
AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
7575
[chktls_save_LDFLAGS="$LDFLAGS"
7676
dnl Shared library options may depend on the host; this check
7777
dnl is only known to be needed for GNU/Linux.
@@ -83,8 +83,8 @@ AC_DEFUN([GCC_CHECK_TLS], [
8383
chktls_save_CFLAGS="$CFLAGS"
8484
CFLAGS="-fPIC $CFLAGS"
8585
dnl If -shared works, test if TLS works in a shared library.
86-
AC_LINK_IFELSE([int f() { return 0; }],
87-
[AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
86+
AC_LINK_IFELSE([AC_LANG_SOURCE([int f() { return 0; }])],
87+
[AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int f() { return a = b; }])],
8888
[gcc_cv_have_tls=yes],
8989
[gcc_cv_have_tls=no])],
9090
[gcc_cv_have_tls=yes])
@@ -102,7 +102,7 @@ AC_DEFUN([GCC_CHECK_CC_TLS], [
102102
GCC_ENABLE(tls, yes, [], [Use thread-local storage])
103103
AC_CACHE_CHECK([whether the target assembler supports thread-local storage],
104104
gcc_cv_have_cc_tls, [
105-
AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }],
105+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
106106
[gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])]
107107
)])
108108
if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then

0 commit comments

Comments
 (0)