re PR target/20353 (uclibc does not provide C99 math functions)
gcc: PR target/20353 PR target/24578 PR target/24837 * config/linux.opt: New file. * config/linux.h (CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER): Define. (TARGET_C99_FUNCTIONS): Define depending on TARGET_GLIBC. * config.gcc (*-*-linux*): Define extra_options. (*-*-*uclibc*): Define UCLIBC_DEFAULT. (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi. * config/arm/linux-eabi.h (LINUX_TARGET_INTERPRETER): Change to GLIBC_DYNAMIC_LINKER. * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): Likewise. (LINUX_TARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * doc/invoke.texi (GNU/Linux Options): New section. gcc/testsuite: * gcc.dg/builtins-config.h (HAVE_C99_RUNTIME): Don't define if __UCLIBC__ is defined. libstdc++-v3: PR libstdc++/14939 * config/os/uclibc/ctype_base.h, config/os/uclibc/ctype_inline.h, config/os/uclibc/ctype_noninline.h, config/os/uclibc/os_defines.h: New. * acinclude.m4 (GLIBCXX_CONFIGURE): Test whether using uClibc. * configure.host: Use os/uclibc for uClibc. * crossconfig.m4 (*-linux*): Use link tests. Don't hardcode presence of math functions. * configure: Regenerate. From-SVN: r111160
This commit is contained in:
parent
6429d58f83
commit
464aea9859
19 changed files with 20655 additions and 583 deletions
|
@ -1,3 +1,23 @@
|
|||
2006-02-16 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR target/20353
|
||||
PR target/24578
|
||||
PR target/24837
|
||||
* config/linux.opt: New file.
|
||||
* config/linux.h (CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER,
|
||||
LINUX_DYNAMIC_LINKER): Define.
|
||||
(TARGET_C99_FUNCTIONS): Define depending on TARGET_GLIBC.
|
||||
* config.gcc (*-*-linux*): Define extra_options.
|
||||
(*-*-*uclibc*): Define UCLIBC_DEFAULT.
|
||||
(arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
|
||||
* config/arm/linux-eabi.h (LINUX_TARGET_INTERPRETER): Change to
|
||||
GLIBC_DYNAMIC_LINKER.
|
||||
* config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): Likewise.
|
||||
(LINUX_TARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
|
||||
* config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Define.
|
||||
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
|
||||
* doc/invoke.texi (GNU/Linux Options): New section.
|
||||
|
||||
2006-02-16 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* config/sparc/sparc.md (setjmp): Rewrite.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GCC target-specific configuration file.
|
||||
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
#This file is part of GCC.
|
||||
|
@ -446,12 +446,18 @@ case ${target} in
|
|||
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
|
||||
# Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
|
||||
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
|
||||
extra_options="${extra_options} linux.opt"
|
||||
gas=yes
|
||||
gnu_ld=yes
|
||||
case ${enable_threads} in
|
||||
"" | yes | posix) thread_file='posix' ;;
|
||||
esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux"
|
||||
case ${target} in
|
||||
*-*-*uclibc*)
|
||||
tm_defines="${tm_defines} UCLIBC_DEFAULT"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-*-gnu*)
|
||||
# On the Hurd, the setup is just about the same on
|
||||
|
@ -674,7 +680,7 @@ arm*-*-linux*) # ARM GNU/Linux with ELF
|
|||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
arm*-*-linux-gnueabi)
|
||||
arm*-*-linux-*eabi)
|
||||
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
|
||||
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
|
||||
# The BPABI long long divmod functions return a 128-bit value in
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Configuration file for ARM GNU/Linux EABI targets.
|
||||
Copyright (C) 2004, 2005
|
||||
Copyright (C) 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by CodeSourcery, LLC
|
||||
|
||||
|
@ -52,8 +52,8 @@
|
|||
|
||||
/* Use ld-linux.so.3 so that it will be possible to run "classic"
|
||||
GNU/Linux binaries on an EABI system. */
|
||||
#undef LINUX_TARGET_INTERPRETER
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
|
||||
#undef GLIBC_DYNAMIC_LINKER
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
|
||||
|
||||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
||||
use the GNU/Linux version, not the generic BPABI version. */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Definitions for ARM running Linux-based GNU systems using ELF
|
||||
Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005
|
||||
2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Philip Blundell <philb@gnu.org>
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} \
|
||||
|
@ -59,7 +59,7 @@
|
|||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions for Linux-based GNU systems with ELF format
|
||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004
|
||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Eric Youngdale.
|
||||
Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
|
||||
|
@ -99,8 +99,24 @@ Boston, MA 02110-1301, USA. */
|
|||
#define USE_LD_AS_NEEDED 1
|
||||
#endif
|
||||
|
||||
/* Determine which dynamic linker to use depending on whether GLIBC or
|
||||
uClibc is the default C library and whether -muclibc or -mglibc has
|
||||
been passed to change the default. */
|
||||
#ifdef UCLIBC_DEFAULT
|
||||
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
|
||||
#else
|
||||
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
|
||||
#endif
|
||||
|
||||
/* For most targets with a single dynamic linker the following
|
||||
definitions suffice; GLIBC_DYNAMIC_LINKER must be defined for each
|
||||
target using them. */
|
||||
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
#define LINUX_DYNAMIC_LINKER \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
|
||||
|
||||
/* Determine whether the entire c99 runtime
|
||||
is present in the runtime library. */
|
||||
#define TARGET_C99_FUNCTIONS 1
|
||||
#define TARGET_C99_FUNCTIONS (TARGET_GLIBC)
|
||||
|
||||
#define TARGET_POSIX_IO
|
||||
|
|
29
gcc/config/linux.opt
Normal file
29
gcc/config/linux.opt
Normal file
|
@ -0,0 +1,29 @@
|
|||
; Processor-independent options for GNU/Linux.
|
||||
;
|
||||
; Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
; Contributed by CodeSourcery.
|
||||
;
|
||||
; This file is part of GCC.
|
||||
;
|
||||
; GCC 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 2, or (at your option) any later
|
||||
; version.
|
||||
;
|
||||
; GCC 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 GCC; see the file COPYING. If not, write to the Free
|
||||
; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
; 02110-1301, USA.
|
||||
|
||||
muclibc
|
||||
Target RejectNegative Report Mask(UCLIBC)
|
||||
Use uClibc instead of GNU libc
|
||||
|
||||
mglibc
|
||||
Target RejectNegative Report InverseMask(UCLIBC, GLIBC)
|
||||
Use GNU libc instead of uClibc
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions for MIPS running Linux-based GNU systems with ELF format.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -98,6 +98,8 @@ Boston, MA 02110-1301, USA. */
|
|||
#undef MIPS_DEFAULT_GVALUE
|
||||
#define MIPS_DEFAULT_GVALUE 0
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
|
@ -107,7 +109,7 @@ Boston, MA 02110-1301, USA. */
|
|||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
|
|
|
@ -503,6 +503,9 @@ Objective-C and Objective-C++ Dialects}.
|
|||
-mTLS -mtls @gol
|
||||
-mcpu=@var{cpu}}
|
||||
|
||||
@emph{GNU/Linux Options}
|
||||
@gccoptlist{-muclibc}
|
||||
|
||||
@emph{H8/300 Options}
|
||||
@gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300}
|
||||
|
||||
|
@ -7193,6 +7196,7 @@ platform.
|
|||
* DEC Alpha Options::
|
||||
* DEC Alpha/VMS Options::
|
||||
* FRV Options::
|
||||
* GNU/Linux Options::
|
||||
* H8/300 Options::
|
||||
* HPPA Options::
|
||||
* i386 and x86-64 Options::
|
||||
|
@ -8783,6 +8787,24 @@ Select the processor type for which to generate code. Possible values are
|
|||
|
||||
@end table
|
||||
|
||||
@node GNU/Linux Options
|
||||
@subsection GNU/Linux Options
|
||||
|
||||
These @samp{-m} options are defined for GNU/Linux targets:
|
||||
|
||||
@table @gcctabopt
|
||||
@item -mglibc
|
||||
@opindex mglibc
|
||||
Use the GNU C library instead of uClibc. This is the default except
|
||||
on @samp{*-*-linux-*uclibc*} targets.
|
||||
|
||||
@item -muclibc
|
||||
@opindex muclibc
|
||||
Use uClibc instead of the GNU C library. This is the default on
|
||||
@samp{*-*-linux-*uclibc*} targets. GCC currently only supports uClibc
|
||||
on ARM and 32-bit MIPS targets.
|
||||
@end table
|
||||
|
||||
@node H8/300 Options
|
||||
@subsection H8/300 Options
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2006-02-16 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR target/20353
|
||||
PR target/24578
|
||||
* gcc.dg/builtins-config.h (HAVE_C99_RUNTIME): Don't define if
|
||||
__UCLIBC__ is defined.
|
||||
|
||||
2006-02-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/26224
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2003 Free Software Foundation.
|
||||
/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation.
|
||||
|
||||
Define macros useful in tests for bulitin functions. */
|
||||
|
||||
|
@ -38,9 +38,10 @@
|
|||
too, but the GLIBC math inlines cause us to generate inferior code,
|
||||
which causes the test to fail, so it is not safe. Including <limits.h>
|
||||
also fails because the include search paths are ordered such that GCC's
|
||||
version will be found before the newlib version. */
|
||||
version will be found before the newlib version. Similarly, uClibc
|
||||
lacks the C99 functions. */
|
||||
#include <sys/types.h>
|
||||
#ifdef _NEWLIB_VERSION
|
||||
#if defined(_NEWLIB_VERSION) || defined(__UCLIBC__)
|
||||
#else
|
||||
#define HAVE_C99_RUNTIME
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2006-02-16 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR libstdc++/14939
|
||||
* config/os/uclibc/ctype_base.h, config/os/uclibc/ctype_inline.h,
|
||||
config/os/uclibc/ctype_noninline.h, config/os/uclibc/os_defines.h:
|
||||
New.
|
||||
* acinclude.m4 (GLIBCXX_CONFIGURE): Test whether using uClibc.
|
||||
* configure.host: Use os/uclibc for uClibc.
|
||||
* crossconfig.m4 (*-linux*): Use link tests. Don't hardcode
|
||||
presence of math functions.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-02-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/26211
|
||||
|
|
|
@ -125,6 +125,15 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
|
|||
## other macros from doing the same. This should be automated.) -pme
|
||||
need_libmath=no
|
||||
|
||||
# Check for uClibc since Linux platforms use different configuration
|
||||
# directories depending on the C library in use.
|
||||
AC_EGREP_CPP([_using_uclibc], [
|
||||
#include <stdio.h>
|
||||
#if __UCLIBC__
|
||||
_using_uclibc
|
||||
#endif
|
||||
], uclibc=yes, uclibc=no)
|
||||
|
||||
# Find platform-specific directories containing configuration info.
|
||||
# Also possibly modify flags used elsewhere, as needed by the platform.
|
||||
GLIBCXX_CHECK_HOST
|
||||
|
|
64
libstdc++-v3/config/os/uclibc/ctype_base.h
Normal file
64
libstdc++-v3/config/os/uclibc/ctype_base.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library 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 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
//
|
||||
// ISO C++ 14882: 22.1 Locales
|
||||
//
|
||||
|
||||
/** @file ctype_base.h
|
||||
* This is an internal header file, included by other library headers.
|
||||
* You should not attempt to use it directly.
|
||||
*/
|
||||
|
||||
// Information as gleaned from /usr/include/ctype.h
|
||||
|
||||
/// @brief Base class for ctype.
|
||||
struct ctype_base
|
||||
{
|
||||
// Note: In uClibc, the following two types depend on configuration.
|
||||
|
||||
// Non-standard typedefs.
|
||||
typedef const __ctype_touplow_t* __to_type;
|
||||
|
||||
// NB: Offsets into ctype<char>::_M_table force a particular size
|
||||
// on the mask type. Because of this, we don't use an enum.
|
||||
typedef __ctype_mask_t mask;
|
||||
static const mask upper = _ISupper;
|
||||
static const mask lower = _ISlower;
|
||||
static const mask alpha = _ISalpha;
|
||||
static const mask digit = _ISdigit;
|
||||
static const mask xdigit = _ISxdigit;
|
||||
static const mask space = _ISspace;
|
||||
static const mask print = _ISprint;
|
||||
static const mask graph = _ISalpha | _ISdigit | _ISpunct;
|
||||
static const mask cntrl = _IScntrl;
|
||||
static const mask punct = _ISpunct;
|
||||
static const mask alnum = _ISalpha | _ISdigit;
|
||||
};
|
69
libstdc++-v3/config/os/uclibc/ctype_inline.h
Normal file
69
libstdc++-v3/config/os/uclibc/ctype_inline.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library 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 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
//
|
||||
// ISO C++ 14882: 22.1 Locales
|
||||
//
|
||||
|
||||
// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
|
||||
// functions go in ctype.cc
|
||||
|
||||
bool
|
||||
ctype<char>::
|
||||
is(mask __m, char __c) const
|
||||
{ return _M_table[static_cast<unsigned char>(__c)] & __m; }
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
while (__low < __high)
|
||||
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
|
||||
return __high;
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
scan_is(mask __m, const char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high
|
||||
&& !(_M_table[static_cast<unsigned char>(*__low)] & __m))
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
scan_not(mask __m, const char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high
|
||||
&& (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
92
libstdc++-v3/config/os/uclibc/ctype_noninline.h
Normal file
92
libstdc++-v3/config/os/uclibc/ctype_noninline.h
Normal file
|
@ -0,0 +1,92 @@
|
|||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library 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 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
//
|
||||
// ISO C++ 14882: 22.1 Locales
|
||||
//
|
||||
|
||||
// Information as gleaned from /usr/include/ctype.h
|
||||
|
||||
const ctype_base::mask*
|
||||
ctype<char>::classic_table() throw()
|
||||
{ return __C_ctype_b; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
|
||||
_M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
|
||||
{
|
||||
_M_toupper = __C_ctype_toupper;
|
||||
_M_tolower = __C_ctype_tolower;
|
||||
_M_table = __table ? __table : __C_ctype_b;
|
||||
memset(_M_widen, 0, sizeof(_M_widen));
|
||||
memset(_M_narrow, 0, sizeof(_M_narrow));
|
||||
}
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
|
||||
_M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
|
||||
{
|
||||
_M_toupper = __C_ctype_toupper;
|
||||
_M_tolower = __C_ctype_tolower;
|
||||
_M_table = __table ? __table : __C_ctype_b;
|
||||
memset(_M_widen, 0, sizeof(_M_widen));
|
||||
memset(_M_narrow, 0, sizeof(_M_narrow));
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return _M_toupper[static_cast<unsigned char>(__c)]; }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = _M_toupper[static_cast<unsigned char>(*__low)];
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return _M_tolower[static_cast<unsigned char>(__c)]; }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = _M_tolower[static_cast<unsigned char>(*__low)];
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
44
libstdc++-v3/config/os/uclibc/os_defines.h
Normal file
44
libstdc++-v3/config/os/uclibc/os_defines.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Specific definitions for GNU/Linux with uClibc -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library 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 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _GLIBCXX_OS_DEFINES
|
||||
#define _GLIBCXX_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// This keeps isanum, et al from being propagated as macros.
|
||||
#define __NO_CTYPE 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
// We must not see the optimized string functions GNU libc defines.
|
||||
#define __NO_STRING_INLINES
|
||||
|
||||
#endif
|
20743
libstdc++-v3/configure
vendored
20743
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -206,7 +206,11 @@ case "${host_os}" in
|
|||
os_include_dir="os/bsd/freebsd"
|
||||
;;
|
||||
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
|
||||
os_include_dir="os/gnu-linux"
|
||||
if [ "$uclibc" = "yes" ]; then
|
||||
os_include_dir="os/uclibc"
|
||||
else
|
||||
os_include_dir="os/gnu-linux"
|
||||
fi
|
||||
;;
|
||||
hpux*)
|
||||
os_include_dir="os/hpux"
|
||||
|
|
|
@ -149,9 +149,13 @@ case "${host}" in
|
|||
fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
AC_SUBST(SECTION_FLAGS)
|
||||
GLIBCXX_CHECK_COMPILER_FEATURES
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
GLIBCXX_CHECK_MATH_SUPPORT
|
||||
GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
|
||||
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
|
||||
GLIBCXX_CHECK_ICONV_SUPPORT
|
||||
GLIBCXX_CHECK_STDLIB_SUPPORT
|
||||
|
||||
# For LFS.
|
||||
AC_DEFINE(HAVE_INT64_T)
|
||||
|
@ -171,68 +175,6 @@ case "${host}" in
|
|||
# For xsputn_2().
|
||||
AC_CHECK_HEADERS(sys/uio.h)
|
||||
GLIBCXX_CHECK_WRITEV
|
||||
|
||||
AC_DEFINE(HAVE_ACOSF)
|
||||
AC_DEFINE(HAVE_ASINF)
|
||||
AC_DEFINE(HAVE_ATANF)
|
||||
AC_DEFINE(HAVE_ATAN2F)
|
||||
AC_DEFINE(HAVE_CEILF)
|
||||
AC_DEFINE(HAVE_COPYSIGN)
|
||||
AC_DEFINE(HAVE_COPYSIGNF)
|
||||
AC_DEFINE(HAVE_COSF)
|
||||
AC_DEFINE(HAVE_COSHF)
|
||||
AC_DEFINE(HAVE_EXPF)
|
||||
AC_DEFINE(HAVE_FABSF)
|
||||
AC_DEFINE(HAVE_FINITE)
|
||||
AC_DEFINE(HAVE_FINITEF)
|
||||
AC_DEFINE(HAVE_FLOORF)
|
||||
AC_DEFINE(HAVE_FMODF)
|
||||
AC_DEFINE(HAVE_FREXPF)
|
||||
AC_DEFINE(HAVE_HYPOT)
|
||||
AC_DEFINE(HAVE_HYPOTF)
|
||||
AC_DEFINE(HAVE_ISINF)
|
||||
AC_DEFINE(HAVE_ISINFF)
|
||||
AC_DEFINE(HAVE_ISNAN)
|
||||
AC_DEFINE(HAVE_ISNANF)
|
||||
AC_DEFINE(HAVE_LOGF)
|
||||
AC_DEFINE(HAVE_LOG10F)
|
||||
AC_DEFINE(HAVE_MODFF)
|
||||
AC_DEFINE(HAVE_SINF)
|
||||
AC_DEFINE(HAVE_SINHF)
|
||||
AC_DEFINE(HAVE_SINCOS)
|
||||
AC_DEFINE(HAVE_SINCOSF)
|
||||
AC_DEFINE(HAVE_SQRTF)
|
||||
AC_DEFINE(HAVE_TANF)
|
||||
AC_DEFINE(HAVE_TANHF)
|
||||
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
||||
AC_DEFINE(HAVE_ACOSL)
|
||||
AC_DEFINE(HAVE_ASINL)
|
||||
AC_DEFINE(HAVE_ATANL)
|
||||
AC_DEFINE(HAVE_ATAN2L)
|
||||
AC_DEFINE(HAVE_CEILL)
|
||||
AC_DEFINE(HAVE_COPYSIGNL)
|
||||
AC_DEFINE(HAVE_COSL)
|
||||
AC_DEFINE(HAVE_COSHL)
|
||||
AC_DEFINE(HAVE_EXPL)
|
||||
AC_DEFINE(HAVE_FABSL)
|
||||
AC_DEFINE(HAVE_FINITEL)
|
||||
AC_DEFINE(HAVE_FLOORL)
|
||||
AC_DEFINE(HAVE_FMODL)
|
||||
AC_DEFINE(HAVE_FREXPL)
|
||||
AC_DEFINE(HAVE_HYPOTL)
|
||||
AC_DEFINE(HAVE_ISINFL)
|
||||
AC_DEFINE(HAVE_ISNANL)
|
||||
AC_DEFINE(HAVE_LOGL)
|
||||
AC_DEFINE(HAVE_LOG10L)
|
||||
AC_DEFINE(HAVE_MODFL)
|
||||
AC_DEFINE(HAVE_POWL)
|
||||
AC_DEFINE(HAVE_SINL)
|
||||
AC_DEFINE(HAVE_SINHL)
|
||||
AC_DEFINE(HAVE_SINCOSL)
|
||||
AC_DEFINE(HAVE_SQRTL)
|
||||
AC_DEFINE(HAVE_TANL)
|
||||
AC_DEFINE(HAVE_TANHL)
|
||||
fi
|
||||
;;
|
||||
*-mingw32*)
|
||||
AC_CHECK_HEADERS([sys/types.h locale.h float.h])
|
||||
|
|
Loading…
Add table
Reference in a new issue