Browse Source
This is mostly to get this commit from gnulib:
e22cd2677a4b7beacbf30b93bb0559f7b89f96ce
Add ‘extern "C"’ to count-one-bits.h etc.
... which fixes this compilation problem I observed with clang++:
CXXLD gdb
arch/arm-get-next-pcs.o:arm-get-next-pcs.c:function thumb_get_next_pcs_raw(arm_get_next_pcs*): error: undefined reference to 'count_one_bits(unsigned int)'
<more such undefined references>
I built-tested on GNU/Linux x86-64 (gcc-9 and clang-9) as well as with the
x86_64-w64-mingw32-gcc cross-compiler.
gnulib/ChangeLog:
* update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
e22cd2677a4b7beacbf30b93bb0559f7b89f96ce.
* Makefile.in, config.in, configure, import/*: Re-generate.
binutils-2_35-branch
committed by
Simon Marchi
366 changed files with 7006 additions and 5229 deletions
File diff suppressed because it is too large
@ -1,684 +0,0 @@ |
|||
#! /bin/sh |
|||
# Output a system dependent set of variables, describing how to set the |
|||
# run time search path of shared libraries in an executable. |
|||
# |
|||
# Copyright 1996-2019 Free Software Foundation, Inc. |
|||
# Taken from GNU libtool, 2001 |
|||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
|||
# |
|||
# This file is free software; the Free Software Foundation gives |
|||
# unlimited permission to copy and/or distribute it, with or without |
|||
# modifications, as long as this notice is preserved. |
|||
# |
|||
# The first argument passed to this file is the canonical host specification, |
|||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
|||
# or |
|||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
|||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld |
|||
# should be set by the caller. |
|||
# |
|||
# The set of defined variables is at the end of this script. |
|||
|
|||
# Known limitations: |
|||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer |
|||
# than 256 bytes, otherwise the compiler driver will dump core. The only |
|||
# known workaround is to choose shorter directory names for the build |
|||
# directory and/or the installation directory. |
|||
|
|||
# All known linkers require a '.a' archive for static linking (except MSVC, |
|||
# which needs '.lib'). |
|||
libext=a |
|||
shrext=.so |
|||
|
|||
host="$1" |
|||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
|||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
|||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
|||
|
|||
# Code taken from libtool.m4's _LT_CC_BASENAME. |
|||
|
|||
for cc_temp in $CC""; do |
|||
case $cc_temp in |
|||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; |
|||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; |
|||
\-*) ;; |
|||
*) break;; |
|||
esac |
|||
done |
|||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` |
|||
|
|||
# Code taken from libtool.m4's _LT_COMPILER_PIC. |
|||
|
|||
wl= |
|||
if test "$GCC" = yes; then |
|||
wl='-Wl,' |
|||
else |
|||
case "$host_os" in |
|||
aix*) |
|||
wl='-Wl,' |
|||
;; |
|||
mingw* | cygwin* | pw32* | os2* | cegcc*) |
|||
;; |
|||
hpux9* | hpux10* | hpux11*) |
|||
wl='-Wl,' |
|||
;; |
|||
irix5* | irix6* | nonstopux*) |
|||
wl='-Wl,' |
|||
;; |
|||
linux* | k*bsd*-gnu | kopensolaris*-gnu) |
|||
case $cc_basename in |
|||
ecc*) |
|||
wl='-Wl,' |
|||
;; |
|||
icc* | ifort*) |
|||
wl='-Wl,' |
|||
;; |
|||
lf95*) |
|||
wl='-Wl,' |
|||
;; |
|||
nagfor*) |
|||
wl='-Wl,-Wl,,' |
|||
;; |
|||
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) |
|||
wl='-Wl,' |
|||
;; |
|||
ccc*) |
|||
wl='-Wl,' |
|||
;; |
|||
xl* | bgxl* | bgf* | mpixl*) |
|||
wl='-Wl,' |
|||
;; |
|||
como) |
|||
wl='-lopt=' |
|||
;; |
|||
*) |
|||
case `$CC -V 2>&1 | sed 5q` in |
|||
*Sun\ F* | *Sun*Fortran*) |
|||
wl= |
|||
;; |
|||
*Sun\ C*) |
|||
wl='-Wl,' |
|||
;; |
|||
esac |
|||
;; |
|||
esac |
|||
;; |
|||
newsos6) |
|||
;; |
|||
*nto* | *qnx*) |
|||
;; |
|||
osf3* | osf4* | osf5*) |
|||
wl='-Wl,' |
|||
;; |
|||
rdos*) |
|||
;; |
|||
solaris*) |
|||
case $cc_basename in |
|||
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) |
|||
wl='-Qoption ld ' |
|||
;; |
|||
*) |
|||
wl='-Wl,' |
|||
;; |
|||
esac |
|||
;; |
|||
sunos4*) |
|||
wl='-Qoption ld ' |
|||
;; |
|||
sysv4 | sysv4.2uw2* | sysv4.3*) |
|||
wl='-Wl,' |
|||
;; |
|||
sysv4*MP*) |
|||
;; |
|||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
|||
wl='-Wl,' |
|||
;; |
|||
unicos*) |
|||
wl='-Wl,' |
|||
;; |
|||
uts4*) |
|||
;; |
|||
esac |
|||
fi |
|||
|
|||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS. |
|||
|
|||
hardcode_libdir_flag_spec= |
|||
hardcode_libdir_separator= |
|||
hardcode_direct=no |
|||
hardcode_minus_L=no |
|||
|
|||
case "$host_os" in |
|||
cygwin* | mingw* | pw32* | cegcc*) |
|||
# FIXME: the MSVC++ port hasn't been tested in a loooong time |
|||
# When not using gcc, we currently assume that we are using |
|||
# Microsoft Visual C++. |
|||
if test "$GCC" != yes; then |
|||
with_gnu_ld=no |
|||
fi |
|||
;; |
|||
interix*) |
|||
# we just hope/assume this is gcc and not c89 (= MSVC++) |
|||
with_gnu_ld=yes |
|||
;; |
|||
openbsd*) |
|||
with_gnu_ld=no |
|||
;; |
|||
esac |
|||
|
|||
ld_shlibs=yes |
|||
if test "$with_gnu_ld" = yes; then |
|||
# Set some defaults for GNU ld with shared library support. These |
|||
# are reset later if shared libraries are not supported. Putting them |
|||
# here allows them to be overridden if necessary. |
|||
# Unlike libtool, we use -rpath here, not --rpath, since the documented |
|||
# option of GNU ld is called -rpath, not --rpath. |
|||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|||
case "$host_os" in |
|||
aix[3-9]*) |
|||
# On AIX/PPC, the GNU linker is very broken |
|||
if test "$host_cpu" != ia64; then |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
amigaos*) |
|||
case "$host_cpu" in |
|||
powerpc) |
|||
;; |
|||
m68k) |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
hardcode_minus_L=yes |
|||
;; |
|||
esac |
|||
;; |
|||
beos*) |
|||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
|||
: |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
cygwin* | mingw* | pw32* | cegcc*) |
|||
# hardcode_libdir_flag_spec is actually meaningless, as there is |
|||
# no search path for DLLs. |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
|||
: |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
haiku*) |
|||
;; |
|||
interix[3-9]*) |
|||
hardcode_direct=no |
|||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
|||
;; |
|||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
|||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
|||
: |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
netbsd*) |
|||
;; |
|||
solaris*) |
|||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then |
|||
ld_shlibs=no |
|||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
|||
: |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
|||
case `$LD -v 2>&1` in |
|||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) |
|||
ld_shlibs=no |
|||
;; |
|||
*) |
|||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
|||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
esac |
|||
;; |
|||
sunos4*) |
|||
hardcode_direct=yes |
|||
;; |
|||
*) |
|||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
|||
: |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
esac |
|||
if test "$ld_shlibs" = no; then |
|||
hardcode_libdir_flag_spec= |
|||
fi |
|||
else |
|||
case "$host_os" in |
|||
aix3*) |
|||
# Note: this linker hardcodes the directories in LIBPATH if there |
|||
# are no directories specified by -L. |
|||
hardcode_minus_L=yes |
|||
if test "$GCC" = yes; then |
|||
# Neither direct hardcoding nor static linking is supported with a |
|||
# broken collect2. |
|||
hardcode_direct=unsupported |
|||
fi |
|||
;; |
|||
aix[4-9]*) |
|||
if test "$host_cpu" = ia64; then |
|||
# On IA64, the linker does run time linking by default, so we don't |
|||
# have to do anything special. |
|||
aix_use_runtimelinking=no |
|||
else |
|||
aix_use_runtimelinking=no |
|||
# Test if we are trying to use run time linking or normal |
|||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we |
|||
# need to do runtime linking. |
|||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) |
|||
for ld_flag in $LDFLAGS; do |
|||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
|||
aix_use_runtimelinking=yes |
|||
break |
|||
fi |
|||
done |
|||
;; |
|||
esac |
|||
fi |
|||
hardcode_direct=yes |
|||
hardcode_libdir_separator=':' |
|||
if test "$GCC" = yes; then |
|||
case $host_os in aix4.[012]|aix4.[012].*) |
|||
collect2name=`${CC} -print-prog-name=collect2` |
|||
if test -f "$collect2name" && \ |
|||
strings "$collect2name" | grep resolve_lib_name >/dev/null |
|||
then |
|||
# We have reworked collect2 |
|||
: |
|||
else |
|||
# We have old collect2 |
|||
hardcode_direct=unsupported |
|||
hardcode_minus_L=yes |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
hardcode_libdir_separator= |
|||
fi |
|||
;; |
|||
esac |
|||
fi |
|||
# Begin _LT_AC_SYS_LIBPATH_AIX. |
|||
echo 'int main () { return 0; }' > conftest.c |
|||
${CC} ${LDFLAGS} conftest.c -o conftest |
|||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
|||
}'` |
|||
if test -z "$aix_libpath"; then |
|||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
|||
}'` |
|||
fi |
|||
if test -z "$aix_libpath"; then |
|||
aix_libpath="/usr/lib:/lib" |
|||
fi |
|||
rm -f conftest.c conftest |
|||
# End _LT_AC_SYS_LIBPATH_AIX. |
|||
if test "$aix_use_runtimelinking" = yes; then |
|||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
|||
else |
|||
if test "$host_cpu" = ia64; then |
|||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
|||
else |
|||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" |
|||
fi |
|||
fi |
|||
;; |
|||
amigaos*) |
|||
case "$host_cpu" in |
|||
powerpc) |
|||
;; |
|||
m68k) |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
hardcode_minus_L=yes |
|||
;; |
|||
esac |
|||
;; |
|||
bsdi[45]*) |
|||
;; |
|||
cygwin* | mingw* | pw32* | cegcc*) |
|||
# When not using gcc, we currently assume that we are using |
|||
# Microsoft Visual C++. |
|||
# hardcode_libdir_flag_spec is actually meaningless, as there is |
|||
# no search path for DLLs. |
|||
hardcode_libdir_flag_spec=' ' |
|||
libext=lib |
|||
;; |
|||
darwin* | rhapsody*) |
|||
hardcode_direct=no |
|||
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then |
|||
: |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
dgux*) |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
;; |
|||
freebsd2.[01]*) |
|||
hardcode_direct=yes |
|||
hardcode_minus_L=yes |
|||
;; |
|||
freebsd* | dragonfly*) |
|||
hardcode_libdir_flag_spec='-R$libdir' |
|||
hardcode_direct=yes |
|||
;; |
|||
hpux9*) |
|||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
|||
hardcode_libdir_separator=: |
|||
hardcode_direct=yes |
|||
# hardcode_minus_L: Not really in the search PATH, |
|||
# but as the default location of the library. |
|||
hardcode_minus_L=yes |
|||
;; |
|||
hpux10*) |
|||
if test "$with_gnu_ld" = no; then |
|||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
|||
hardcode_libdir_separator=: |
|||
hardcode_direct=yes |
|||
# hardcode_minus_L: Not really in the search PATH, |
|||
# but as the default location of the library. |
|||
hardcode_minus_L=yes |
|||
fi |
|||
;; |
|||
hpux11*) |
|||
if test "$with_gnu_ld" = no; then |
|||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
|||
hardcode_libdir_separator=: |
|||
case $host_cpu in |
|||
hppa*64*|ia64*) |
|||
hardcode_direct=no |
|||
;; |
|||
*) |
|||
hardcode_direct=yes |
|||
# hardcode_minus_L: Not really in the search PATH, |
|||
# but as the default location of the library. |
|||
hardcode_minus_L=yes |
|||
;; |
|||
esac |
|||
fi |
|||
;; |
|||
irix5* | irix6* | nonstopux*) |
|||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|||
hardcode_libdir_separator=: |
|||
;; |
|||
netbsd*) |
|||
hardcode_libdir_flag_spec='-R$libdir' |
|||
hardcode_direct=yes |
|||
;; |
|||
newsos6) |
|||
hardcode_direct=yes |
|||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|||
hardcode_libdir_separator=: |
|||
;; |
|||
*nto* | *qnx*) |
|||
;; |
|||
openbsd*) |
|||
if test -f /usr/libexec/ld.so; then |
|||
hardcode_direct=yes |
|||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
|||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
|||
else |
|||
case "$host_os" in |
|||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) |
|||
hardcode_libdir_flag_spec='-R$libdir' |
|||
;; |
|||
*) |
|||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
|||
;; |
|||
esac |
|||
fi |
|||
else |
|||
ld_shlibs=no |
|||
fi |
|||
;; |
|||
os2*) |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
hardcode_minus_L=yes |
|||
;; |
|||
osf3*) |
|||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|||
hardcode_libdir_separator=: |
|||
;; |
|||
osf4* | osf5*) |
|||
if test "$GCC" = yes; then |
|||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|||
else |
|||
# Both cc and cxx compiler support -rpath directly |
|||
hardcode_libdir_flag_spec='-rpath $libdir' |
|||
fi |
|||
hardcode_libdir_separator=: |
|||
;; |
|||
solaris*) |
|||
hardcode_libdir_flag_spec='-R$libdir' |
|||
;; |
|||
sunos4*) |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
hardcode_direct=yes |
|||
hardcode_minus_L=yes |
|||
;; |
|||
sysv4) |
|||
case $host_vendor in |
|||
sni) |
|||
hardcode_direct=yes # is this really true??? |
|||
;; |
|||
siemens) |
|||
hardcode_direct=no |
|||
;; |
|||
motorola) |
|||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
|||
;; |
|||
esac |
|||
;; |
|||
sysv4.3*) |
|||
;; |
|||
sysv4*MP*) |
|||
if test -d /usr/nec; then |
|||
ld_shlibs=yes |
|||
fi |
|||
;; |
|||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) |
|||
;; |
|||
sysv5* | sco3.2v5* | sco5v6*) |
|||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' |
|||
hardcode_libdir_separator=':' |
|||
;; |
|||
uts4*) |
|||
hardcode_libdir_flag_spec='-L$libdir' |
|||
;; |
|||
*) |
|||
ld_shlibs=no |
|||
;; |
|||
esac |
|||
fi |
|||
|
|||
# Check dynamic linker characteristics |
|||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. |
|||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but |
|||
# only about the one the linker finds when passed -lNAME. This is the last |
|||
# element of library_names_spec in libtool.m4, or possibly two of them if the |
|||
# linker has special search rules. |
|||
library_names_spec= # the last element of library_names_spec in libtool.m4 |
|||
libname_spec='lib$name' |
|||
case "$host_os" in |
|||
aix3*) |
|||
library_names_spec='$libname.a' |
|||
;; |
|||
aix[4-9]*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
amigaos*) |
|||
case "$host_cpu" in |
|||
powerpc*) |
|||
library_names_spec='$libname$shrext' ;; |
|||
m68k) |
|||
library_names_spec='$libname.a' ;; |
|||
esac |
|||
;; |
|||
beos*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
bsdi[45]*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
cygwin* | mingw* | pw32* | cegcc*) |
|||
shrext=.dll |
|||
library_names_spec='$libname.dll.a $libname.lib' |
|||
;; |
|||
darwin* | rhapsody*) |
|||
shrext=.dylib |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
dgux*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
freebsd[23].*) |
|||
library_names_spec='$libname$shrext$versuffix' |
|||
;; |
|||
freebsd* | dragonfly*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
gnu*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
haiku*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
hpux9* | hpux10* | hpux11*) |
|||
case $host_cpu in |
|||
ia64*) |
|||
shrext=.so |
|||
;; |
|||
hppa*64*) |
|||
shrext=.sl |
|||
;; |
|||
*) |
|||
shrext=.sl |
|||
;; |
|||
esac |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
interix[3-9]*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
irix5* | irix6* | nonstopux*) |
|||
library_names_spec='$libname$shrext' |
|||
case "$host_os" in |
|||
irix5* | nonstopux*) |
|||
libsuff= shlibsuff= |
|||
;; |
|||
*) |
|||
case $LD in |
|||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; |
|||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; |
|||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; |
|||
*) libsuff= shlibsuff= ;; |
|||
esac |
|||
;; |
|||
esac |
|||
;; |
|||
linux*oldld* | linux*aout* | linux*coff*) |
|||
;; |
|||
linux* | k*bsd*-gnu | kopensolaris*-gnu) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
knetbsd*-gnu) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
netbsd*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
newsos6) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
*nto* | *qnx*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
openbsd*) |
|||
library_names_spec='$libname$shrext$versuffix' |
|||
;; |
|||
os2*) |
|||
libname_spec='$name' |
|||
shrext=.dll |
|||
library_names_spec='$libname.a' |
|||
;; |
|||
osf3* | osf4* | osf5*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
rdos*) |
|||
;; |
|||
solaris*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
sunos4*) |
|||
library_names_spec='$libname$shrext$versuffix' |
|||
;; |
|||
sysv4 | sysv4.3*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
sysv4*MP*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
tpf*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
uts4*) |
|||
library_names_spec='$libname$shrext' |
|||
;; |
|||
esac |
|||
|
|||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g' |
|||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` |
|||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'` |
|||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` |
|||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` |
|||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` |
|||
|
|||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF |
|||
|
|||
# How to pass a linker flag through the compiler. |
|||
wl="$escaped_wl" |
|||
|
|||
# Static library suffix (normally "a"). |
|||
libext="$libext" |
|||
|
|||
# Shared library suffix (normally "so"). |
|||
shlibext="$shlibext" |
|||
|
|||
# Format of library name prefix. |
|||
libname_spec="$escaped_libname_spec" |
|||
|
|||
# Library names that the linker finds when passed -lNAME. |
|||
library_names_spec="$escaped_library_names_spec" |
|||
|
|||
# Flag to hardcode \$libdir into a binary during linking. |
|||
# This must work even if \$libdir does not exist. |
|||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" |
|||
|
|||
# Whether we need a single -rpath flag with a separated argument. |
|||
hardcode_libdir_separator="$hardcode_libdir_separator" |
|||
|
|||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
|||
# resulting binary. |
|||
hardcode_direct="$hardcode_direct" |
|||
|
|||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
|||
# resulting binary. |
|||
hardcode_minus_L="$hardcode_minus_L" |
|||
|
|||
EOF |
|||
@ -0,0 +1,82 @@ |
|||
/* Dispatching based on the current locale's character encoding.
|
|||
Copyright (C) 2018-2020 Free Software Foundation, Inc. |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|||
|
|||
/* Written by Bruno Haible <bruno@clisp.org>, 2018. */ |
|||
|
|||
#include <config.h> |
|||
|
|||
/* Specification. */ |
|||
#include "lc-charset-dispatch.h" |
|||
|
|||
#if GNULIB_defined_mbstate_t |
|||
|
|||
# include "localcharset.h" |
|||
# include "streq.h" |
|||
|
|||
# if GNULIB_WCHAR_SINGLE |
|||
/* When we know that the locale does not change, provide a speedup by
|
|||
caching the value of locale_encoding_classification. */ |
|||
# define locale_encoding_classification_cached locale_encoding_classification |
|||
# else |
|||
/* By default, don't make assumptions, hence no caching. */ |
|||
# define locale_encoding_classification_uncached locale_encoding_classification |
|||
# endif |
|||
|
|||
# if GNULIB_WCHAR_SINGLE |
|||
static inline |
|||
# endif |
|||
enc_t |
|||
locale_encoding_classification_uncached (void) |
|||
{ |
|||
const char *encoding = locale_charset (); |
|||
if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) |
|||
return enc_utf8; |
|||
if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) |
|||
return enc_eucjp; |
|||
if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) |
|||
|| STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) |
|||
|| STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) |
|||
return enc_94; |
|||
if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) |
|||
return enc_euctw; |
|||
if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) |
|||
return enc_gb18030; |
|||
if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) |
|||
return enc_sjis; |
|||
return enc_other; |
|||
} |
|||
|
|||
# if GNULIB_WCHAR_SINGLE |
|||
|
|||
static int cached_locale_enc = -1; |
|||
|
|||
enc_t |
|||
locale_encoding_classification_cached (void) |
|||
{ |
|||
if (cached_locale_enc < 0) |
|||
cached_locale_enc = locale_encoding_classification_uncached (); |
|||
return cached_locale_enc; |
|||
} |
|||
|
|||
# endif |
|||
|
|||
#else |
|||
|
|||
/* This declaration is solely to ensure that after preprocessing
|
|||
this file is never empty. */ |
|||
typedef int dummy; |
|||
|
|||
#endif |
|||
@ -0,0 +1,40 @@ |
|||
/* Dispatching based on the current locale's character encoding.
|
|||
Copyright (C) 2018-2020 Free Software Foundation, Inc. |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|||
|
|||
/* Written by Bruno Haible <bruno@clisp.org>, 2018. */ |
|||
|
|||
#include <wchar.h> |
|||
|
|||
#if GNULIB_defined_mbstate_t |
|||
|
|||
/* A classification of special values of the encoding of the current locale. */ |
|||
typedef enum |
|||
{ |
|||
enc_other, /* other */ |
|||
enc_utf8, /* UTF-8 */ |
|||
enc_eucjp, /* EUC-JP */ |
|||
enc_94, /* EUC-KR, GB2312, BIG5 */ |
|||
enc_euctw, /* EUC-TW */ |
|||
enc_gb18030, /* GB18030 */ |
|||
enc_sjis /* SJIS */ |
|||
} |
|||
enc_t; |
|||
|
|||
/* Returns a classification of special values of the encoding of the current
|
|||
locale. */ |
|||
extern enc_t locale_encoding_classification (void); |
|||
|
|||
#endif |
|||
@ -0,0 +1,305 @@ |
|||
/* A POSIX <locale.h>.
|
|||
Copyright (C) 2007-2020 Free Software Foundation, Inc. |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|||
|
|||
#if __GNUC__ >= 3 |
|||
@PRAGMA_SYSTEM_HEADER@ |
|||
#endif |
|||
@PRAGMA_COLUMNS@ |
|||
|
|||
#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \ |
|||
|| defined _GL_ALREADY_INCLUDING_LOCALE_H |
|||
|
|||
/* Special invocation convention:
|
|||
- Inside mingw header files, |
|||
- To handle Solaris header files (through Solaris 10) when combined |
|||
with gettext's libintl.h. */ |
|||
|
|||
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ |
|||
|
|||
#else |
|||
/* Normal invocation convention. */ |
|||
|
|||
#ifndef _@GUARD_PREFIX@_LOCALE_H |
|||
|
|||
#define _GL_ALREADY_INCLUDING_LOCALE_H |
|||
|
|||
/* The include_next requires a split double-inclusion guard. */ |
|||
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ |
|||
|
|||
#undef _GL_ALREADY_INCLUDING_LOCALE_H |
|||
|
|||
#ifndef _@GUARD_PREFIX@_LOCALE_H |
|||
#define _@GUARD_PREFIX@_LOCALE_H |
|||
|
|||
/* NetBSD 5.0 mis-defines NULL. */ |
|||
#include <stddef.h> |
|||
|
|||
/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */ |
|||
#if @HAVE_XLOCALE_H@ |
|||
# include <xlocale.h> |
|||
#endif |
|||
|
|||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
|||
|
|||
/* The definition of _GL_ARG_NONNULL is copied here. */ |
|||
|
|||
/* The definition of _GL_WARN_ON_USE is copied here. */ |
|||
|
|||
/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
|
|||
On systems that don't define it, use the same value as GNU libintl. */ |
|||
#if !defined LC_MESSAGES |
|||
# define LC_MESSAGES 1729 |
|||
#endif |
|||
|
|||
/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and
|
|||
int_n_*. Instead of overriding 'struct lconv', merely define these member |
|||
names as macros. This avoids trouble in C++ mode. */ |
|||
#if defined _MSC_VER |
|||
# define int_p_cs_precedes p_cs_precedes |
|||
# define int_p_sign_posn p_sign_posn |
|||
# define int_p_sep_by_space p_sep_by_space |
|||
# define int_n_cs_precedes n_cs_precedes |
|||
# define int_n_sign_posn n_sign_posn |
|||
# define int_n_sep_by_space n_sep_by_space |
|||
#endif |
|||
|
|||
/* Bionic libc's 'struct lconv' is just a dummy. */ |
|||
#if @REPLACE_STRUCT_LCONV@ |
|||
# define lconv rpl_lconv |
|||
struct lconv |
|||
{ |
|||
/* All 'char *' are actually 'const char *'. */ |
|||
|
|||
/* Members that depend on the LC_NUMERIC category of the locale. See
|
|||
<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
|
|||
|
|||
/* Symbol used as decimal point. */ |
|||
char *decimal_point; |
|||
/* Symbol used to separate groups of digits to the left of the decimal
|
|||
point. */ |
|||
char *thousands_sep; |
|||
/* Definition of the size of groups of digits to the left of the decimal
|
|||
point. */ |
|||
char *grouping; |
|||
|
|||
/* Members that depend on the LC_MONETARY category of the locale. See
|
|||
<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
|
|||
|
|||
/* Symbol used as decimal point. */ |
|||
char *mon_decimal_point; |
|||
/* Symbol used to separate groups of digits to the left of the decimal
|
|||
point. */ |
|||
char *mon_thousands_sep; |
|||
/* Definition of the size of groups of digits to the left of the decimal
|
|||
point. */ |
|||
char *mon_grouping; |
|||
/* Sign used to indicate a value >= 0. */ |
|||
char *positive_sign; |
|||
/* Sign used to indicate a value < 0. */ |
|||
char *negative_sign; |
|||
|
|||
/* For formatting local currency. */ |
|||
/* Currency symbol (3 characters) followed by separator (1 character). */ |
|||
char *currency_symbol; |
|||
/* Number of digits after the decimal point. */ |
|||
char frac_digits; |
|||
/* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
|
|||
comes after the number. */ |
|||
char p_cs_precedes; |
|||
/* For values >= 0: Position of the sign. */ |
|||
char p_sign_posn; |
|||
/* For values >= 0: Placement of spaces between currency symbol, sign, and
|
|||
number. */ |
|||
char p_sep_by_space; |
|||
/* For values < 0: 1 if the currency symbol precedes the number, 0 if it
|
|||
comes after the number. */ |
|||
char n_cs_precedes; |
|||
/* For values < 0: Position of the sign. */ |
|||
char n_sign_posn; |
|||
/* For values < 0: Placement of spaces between currency symbol, sign, and
|
|||
number. */ |
|||
char n_sep_by_space; |
|||
|
|||
/* For formatting international currency. */ |
|||
/* Currency symbol (3 characters) followed by separator (1 character). */ |
|||
char *int_curr_symbol; |
|||
/* Number of digits after the decimal point. */ |
|||
char int_frac_digits; |
|||
/* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
|
|||
comes after the number. */ |
|||
char int_p_cs_precedes; |
|||
/* For values >= 0: Position of the sign. */ |
|||
char int_p_sign_posn; |
|||
/* For values >= 0: Placement of spaces between currency symbol, sign, and
|
|||
number. */ |
|||
char int_p_sep_by_space; |
|||
/* For values < 0: 1 if the currency symbol precedes the number, 0 if it
|
|||
comes after the number. */ |
|||
char int_n_cs_precedes; |
|||
/* For values < 0: Position of the sign. */ |
|||
char int_n_sign_posn; |
|||
/* For values < 0: Placement of spaces between currency symbol, sign, and
|
|||
number. */ |
|||
char int_n_sep_by_space; |
|||
}; |
|||
#endif |
|||
|
|||
#if @GNULIB_LOCALECONV@ |
|||
# if @REPLACE_LOCALECONV@ |
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|||
# undef localeconv |
|||
# define localeconv rpl_localeconv |
|||
# endif |
|||
_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); |
|||
_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); |
|||
# else |
|||
_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); |
|||
# endif |
|||
# if __GLIBC__ >= 2 |
|||
_GL_CXXALIASWARN (localeconv); |
|||
# endif |
|||
#elif @REPLACE_STRUCT_LCONV@ |
|||
# undef localeconv |
|||
# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv |
|||
#elif defined GNULIB_POSIXCHECK |
|||
# undef localeconv |
|||
# if HAVE_RAW_DECL_LOCALECONV |
|||
_GL_WARN_ON_USE (localeconv, |
|||
"localeconv returns too few information on some platforms - " |
|||
"use gnulib module localeconv for portability"); |
|||
# endif |
|||
#endif |
|||
|
|||
#if @GNULIB_SETLOCALE@ |
|||
# if @REPLACE_SETLOCALE@ |
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|||
# undef setlocale |
|||
# define setlocale rpl_setlocale |
|||
# define GNULIB_defined_setlocale 1 |
|||
# endif |
|||
_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); |
|||
_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); |
|||
# else |
|||
_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); |
|||
# endif |
|||
# if __GLIBC__ >= 2 |
|||
_GL_CXXALIASWARN (setlocale); |
|||
# endif |
|||
#elif defined GNULIB_POSIXCHECK |
|||
# undef setlocale |
|||
# if HAVE_RAW_DECL_SETLOCALE |
|||
_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " |
|||
"use gnulib module setlocale for portability"); |
|||
# endif |
|||
#endif |
|||
|
|||
#if @GNULIB_SETLOCALE_NULL@ |
|||
/* Included here for convenience. */ |
|||
# include "setlocale_null.h" |
|||
#endif |
|||
|
|||
#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@) |
|||
# if @REPLACE_NEWLOCALE@ |
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|||
# undef newlocale |
|||
# define newlocale rpl_newlocale |
|||
# define GNULIB_defined_newlocale 1 |
|||
# endif |
|||
_GL_FUNCDECL_RPL (newlocale, locale_t, |
|||
(int category_mask, const char *name, locale_t base) |
|||
_GL_ARG_NONNULL ((2))); |
|||
_GL_CXXALIAS_RPL (newlocale, locale_t, |
|||
(int category_mask, const char *name, locale_t base)); |
|||
# else |
|||
# if @HAVE_NEWLOCALE@ |
|||
_GL_CXXALIAS_SYS (newlocale, locale_t, |
|||
(int category_mask, const char *name, locale_t base)); |
|||
# endif |
|||
# endif |
|||
# if @HAVE_NEWLOCALE@ |
|||
_GL_CXXALIASWARN (newlocale); |
|||
# endif |
|||
# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@ |
|||
# ifndef HAVE_WORKING_NEWLOCALE |
|||
# define HAVE_WORKING_NEWLOCALE 1 |
|||
# endif |
|||
# endif |
|||
#elif defined GNULIB_POSIXCHECK |
|||
# undef newlocale |
|||
# if HAVE_RAW_DECL_NEWLOCALE |
|||
_GL_WARN_ON_USE (newlocale, "newlocale is not portable"); |
|||
# endif |
|||
#endif |
|||
|
|||
#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@) |
|||
# if @REPLACE_DUPLOCALE@ |
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|||
# undef duplocale |
|||
# define duplocale rpl_duplocale |
|||
# define GNULIB_defined_duplocale 1 |
|||
# endif |
|||
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); |
|||
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); |
|||
# else |
|||
# if @HAVE_DUPLOCALE@ |
|||
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); |
|||
# endif |
|||
# endif |
|||
# if @HAVE_DUPLOCALE@ |
|||
_GL_CXXALIASWARN (duplocale); |
|||
# endif |
|||
# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@ |
|||
# ifndef HAVE_WORKING_DUPLOCALE |
|||
# define HAVE_WORKING_DUPLOCALE 1 |
|||
# endif |
|||
# endif |
|||
#elif defined GNULIB_POSIXCHECK |
|||
# undef duplocale |
|||
# if HAVE_RAW_DECL_DUPLOCALE |
|||
_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " |
|||
"use gnulib module duplocale for portability"); |
|||
# endif |
|||
#endif |
|||
|
|||
#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@) |
|||
# if @REPLACE_FREELOCALE@ |
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|||
# undef freelocale |
|||
# define freelocale rpl_freelocale |
|||
# define GNULIB_defined_freelocale 1 |
|||
# endif |
|||
_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1))); |
|||
_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); |
|||
# else |
|||
# if @HAVE_FREELOCALE@ |
|||
/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is
|
|||
int. */ |
|||
_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); |
|||
# endif |
|||
# endif |
|||
# if @HAVE_FREELOCALE@ |
|||
_GL_CXXALIASWARN (freelocale); |
|||
# endif |
|||
#elif defined GNULIB_POSIXCHECK |
|||
# undef freelocale |
|||
# if HAVE_RAW_DECL_FREELOCALE |
|||
_GL_WARN_ON_USE (freelocale, "freelocale is not portable"); |
|||
# endif |
|||
#endif |
|||
|
|||
#endif /* _@GUARD_PREFIX@_LOCALE_H */ |
|||
#endif /* _@GUARD_PREFIX@_LOCALE_H */ |
|||
#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */ |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue