ICU-20493 Warn on global/static c’tors

- add -Wglobal-constructors to clang (only for libs)
- Note: ignore 'runstatedir' flap in configure
This commit is contained in:
Steven R. Loomis 2019-07-19 16:32:29 -07:00 committed by Steven R. Loomis
parent f793ad55e9
commit fc487bf32b
2 changed files with 3 additions and 13 deletions

View File

@ -755,7 +755,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@ -861,7 +860,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@ -1114,15 +1112,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1260,7 +1249,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@ -1413,7 +1402,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@ -7901,6 +7889,7 @@ fi
if test "${CXX}" = "clang++"; then
CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
LIBCXXFLAGS="$LIBCXXFLAGS -Wglobal-constructors"
else
CLANGCXXFLAGS=""
fi

View File

@ -1315,6 +1315,7 @@ fi
if test "${CXX}" = "clang++"; then
CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
LIBCXXFLAGS="$LIBCXXFLAGS -Wglobal-constructors"
else
CLANGCXXFLAGS=""
fi