mirror of
https://review.haiku-os.org/buildtools
synced 2026-02-04 07:53:14 +01:00
Added support for target i586-pc-haiku. Mostly by cloning the *-beos
stuff, partially omitting cruft. git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@15343 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
535
gcc/config.guess
vendored
535
gcc/config.guess
vendored
File diff suppressed because it is too large
Load Diff
@@ -159,6 +159,8 @@ if test "$with_gnu_ld" = yes; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
haiku*)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
|
||||
50
gcc/config.sub
vendored
50
gcc/config.sub
vendored
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-04-22'
|
||||
timestamp='2005-07-08'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -21,14 +21,15 @@ timestamp='2005-04-22'
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
@@ -83,11 +84,11 @@ Try \`$me --help' for more information."
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
echo "$timestamp" ; exit ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
echo "$version" ; exit ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
echo "$usage"; exit ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
@@ -99,7 +100,7 @@ while test $# -gt 0 ; do
|
||||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit 0;;
|
||||
exit ;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
@@ -247,6 +248,7 @@ case $basic_machine in
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
@@ -255,13 +257,14 @@ case $basic_machine in
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| ms1 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b \
|
||||
@@ -273,6 +276,9 @@ case $basic_machine in
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -321,6 +327,7 @@ case $basic_machine in
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
@@ -329,6 +336,7 @@ case $basic_machine in
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| ms1-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
@@ -336,7 +344,7 @@ case $basic_machine in
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
@@ -351,6 +359,8 @@ case $basic_machine in
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
@@ -761,9 +771,8 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
openrisc | openrisc-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
os400)
|
||||
basic_machine=powerpc-ibm
|
||||
@@ -1089,12 +1098,9 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
@@ -1181,7 +1187,8 @@ case $os in
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1199,7 +1206,7 @@ case $os in
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
@@ -1388,6 +1395,9 @@ case $basic_machine in
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-haiku)
|
||||
os=-haiku
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
@@ -1559,7 +1569,7 @@ case $basic_machine in
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit 0
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
||||
9
gcc/configure
vendored
9
gcc/configure
vendored
@@ -1088,6 +1088,9 @@ case "${host}" in
|
||||
i[3456789]86-*-beos*)
|
||||
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
|
||||
;;
|
||||
i[3456789]86-*-haiku*)
|
||||
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
|
||||
;;
|
||||
*-*-cygwin*)
|
||||
noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
|
||||
;;
|
||||
@@ -1188,6 +1191,9 @@ case "${target}" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-*-haiku)
|
||||
noconfigdirs="$noconfigdirs target-libiberty"
|
||||
;;
|
||||
*-*-kaos*)
|
||||
# Remove unsupported stuff on all kaOS configurations.
|
||||
skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
|
||||
@@ -1432,6 +1438,9 @@ case "${target}" in
|
||||
i[3456789]86-*-beos*)
|
||||
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
|
||||
;;
|
||||
i[3456789]86-*-haiku*)
|
||||
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
|
||||
;;
|
||||
m32r-*-*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||
;;
|
||||
|
||||
@@ -304,6 +304,9 @@ case "${host}" in
|
||||
*-*-cygwin*)
|
||||
noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
|
||||
;;
|
||||
i[[3456789]]86-*-haiku*)
|
||||
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
|
||||
;;
|
||||
*-*-netbsd*)
|
||||
noconfigdirs="$noconfigdirs rcs"
|
||||
;;
|
||||
@@ -638,6 +641,9 @@ case "${target}" in
|
||||
i[[3456789]]86-*-beos*)
|
||||
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
|
||||
;;
|
||||
i[[3456789]]86-*-haiku*)
|
||||
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
|
||||
;;
|
||||
m32r-*-*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||
;;
|
||||
|
||||
@@ -969,6 +969,11 @@ i[34567]86-*-freebsd*)
|
||||
x86_64-*-freebsd*)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
|
||||
;;
|
||||
i[34567]86-*-haiku*)
|
||||
tmake_file='i386/t-haiku i386/t-crtpic'
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/haiku-elf.h"
|
||||
extra_parts='crtbegin.o crtend.o'
|
||||
;;
|
||||
i[34567]86-*-netbsdelf*)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
|
||||
;;
|
||||
|
||||
246
gcc/gcc/config/i386/haiku-elf.h
Normal file
246
gcc/gcc/config/i386/haiku-elf.h
Normal file
@@ -0,0 +1,246 @@
|
||||
/* Definitions for Intel x86 running Haiku
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)");
|
||||
|
||||
/* Change debugging to Dwarf2. */
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
|
||||
/* The SVR4 ABI for the i386 says that records and unions are returned
|
||||
in memory. */
|
||||
#undef DEFAULT_PCC_STRUCT_RETURN
|
||||
#define DEFAULT_PCC_STRUCT_RETURN 1
|
||||
|
||||
#undef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START " #"
|
||||
|
||||
#undef DBX_REGISTER_NUMBER
|
||||
#define DBX_REGISTER_NUMBER(n) \
|
||||
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
|
||||
|
||||
/* Output assembler code to FILE to increment profiler label # LABELNO
|
||||
for profiling a function entry. */
|
||||
|
||||
#undef MCOUNT_NAME
|
||||
#define MCOUNT_NAME "mcount"
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "short unsigned int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 16
|
||||
|
||||
#define TARGET_DECLSPEC 1
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define ("__BEOS__"); \
|
||||
builtin_define ("__HAIKU__"); \
|
||||
builtin_define ("__INTEL__"); \
|
||||
builtin_define ("_X86_"); \
|
||||
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
|
||||
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
|
||||
builtin_assert ("system=haiku"); \
|
||||
if (flag_pic) \
|
||||
{ \
|
||||
builtin_define ("__PIC__"); \
|
||||
builtin_define ("__pic__"); \
|
||||
} \
|
||||
/* Haiku apparently doesn't support merging of symbols across shared \
|
||||
object boundaries. Hence we need to explicitly specify that \
|
||||
type_infos are not merged, so that they get compared by name \
|
||||
instead of by pointer. */ \
|
||||
builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Haiku uses lots of multichars, so don't warn about them unless the
|
||||
user explicitly asks for the warnings with -Wmultichar. Note that
|
||||
CC1_SPEC is used for both cc1 and cc1plus. */
|
||||
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%{!no-fpic:%{!fno-pic:%{!fno-pie:%{!fpie:%{!fPIC:%{!fPIE:-fpic}}}}}} %{!Wmultichar: -Wno-multichar} %(cc1_cpu) %{profile:-p}"
|
||||
|
||||
#undef CC1PLUS_SPEC
|
||||
#define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}"
|
||||
|
||||
/* Provide a LINK_SPEC appropriate for Haiku. Here we provide support
|
||||
for the special GCC options -static and -shared, which allow us to
|
||||
link things in one of these three modes by applying the appropriate
|
||||
combinations of options at link-time. */
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!o*:-o %b} -m elf_i386_be -shared -Bsymbolic %{nostart:-e 0}"
|
||||
|
||||
/* Provide start and end file specs appropriate to glibc. */
|
||||
|
||||
/* LIB_SPEC for Haiku */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lroot"
|
||||
|
||||
/* gcc runtime lib is built into libroot.so on Haiku */
|
||||
/* ??? This is gonna be lovely when the next release of gcc has
|
||||
some new symbol in, so that links start failing. */
|
||||
#undef LIBGCC_SPEC
|
||||
#define LIBGCC_SPEC ""
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart:start_dyn.o%s} init_term_dyn.o%s %{p:i386-mcount.o%s}"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
FILE the assembler definition of uninitialized global DECL named
|
||||
NAME whose size is SIZE bytes and alignment is ALIGN bytes.
|
||||
Try to use asm_output_aligned_bss to implement this macro. */
|
||||
|
||||
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
|
||||
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
|
||||
|
||||
/* A C statement to output to the stdio stream FILE an assembler
|
||||
command to advance the location counter to a multiple of 1<<LOG
|
||||
bytes if it is within MAX_SKIP bytes.
|
||||
|
||||
This is used to align code labels according to Intel recommendations. */
|
||||
|
||||
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
|
||||
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
|
||||
if ((LOG)!=0) \
|
||||
if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
|
||||
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
|
||||
#endif
|
||||
|
||||
/* For native compiler, use standard Haiku include file search paths
|
||||
rooted in /boot/develop/headers. For a cross compiler, don't
|
||||
expect the host to use the Haiku directory scheme, and instead look
|
||||
for the Haiku include files relative to TOOL_INCLUDE_DIR. Yes, we
|
||||
use ANSI string concatenation here (FIXME) */
|
||||
|
||||
#ifndef CROSS_COMPILE
|
||||
#undef INCLUDE_DEFAULTS
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },\
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },\
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1}, \
|
||||
{ "/boot/develop/headers/be/add-ons/graphics", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/devel", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/translation", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/mail", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/gnu", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/drivers", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/opengl", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/game", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/support", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/storage", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/kernel", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/net", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/midi", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/midi2", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/media", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/interface", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/device", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/app", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/precompiled", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/add-ons/input_server", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/add-ons/net_server", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/add-ons/screen_saver", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/add-ons/tracker", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/be_apps/Deskbar", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/be_apps/NetPositive", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/be_apps/Tracker", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/drivers/tty", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/net/netinet", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be/storage", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/be", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/cpp", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers/posix", 0, 0, 0 },\
|
||||
{ "/boot/develop/headers", 0, 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
}
|
||||
#else /* CROSS_COMPILE */
|
||||
#undef INCLUDE_DEFAULTS
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },\
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },\
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1}, \
|
||||
{ CROSS_INCLUDE_DIR "/be/add-ons/graphics", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/devel", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/translation", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/mail", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/gnu", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/drivers", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/opengl", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/game", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/support", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/storage", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/kernel", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/net", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/midi", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/midi2", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/media", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/interface", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/device", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/app", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/precompiled", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/add-ons/input_server", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/add-ons/net_server", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/add-ons/screen_saver", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/add-ons/tracker", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/be_apps/Deskbar", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/be_apps/NetPositive", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/be_apps/Tracker", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/drivers/tty", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/net/netinet", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be/storage", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/be", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/cpp", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR "/posix", 0, 0, 0 },\
|
||||
{ CROSS_INCLUDE_DIR , 0, 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Whee. LIBRARY_PATH is Be's LD_LIBRARY_PATH, which of course will
|
||||
cause nasty problems if we override it. */
|
||||
#define LIBRARY_PATH_ENV "BELIBRARIES"
|
||||
|
||||
/* Haiku doesn't have a separate math library. */
|
||||
#define MATH_LIBRARY ""
|
||||
|
||||
/* Haiku headers are C++-aware (and often use C++). */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_drectve
|
||||
4
gcc/gcc/config/i386/t-haiku
Normal file
4
gcc/gcc/config/i386/t-haiku
Normal file
@@ -0,0 +1,4 @@
|
||||
# The LIMITS_H_TEST looks for limits.h in $(SYSTEM_HEADERS_DIR), but it is in
|
||||
# .../posix.
|
||||
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]
|
||||
|
||||
2
gcc/gcc/configure
vendored
2
gcc/gcc/configure
vendored
@@ -12021,7 +12021,7 @@ case ${enable_threads} in
|
||||
# default
|
||||
target_thread_file='single'
|
||||
;;
|
||||
aix | beos | dce | gnat | irix | posix | posix95 | rtems | \
|
||||
aix | beos | dce | gnat | haiku | irix | posix | posix95 | rtems | \
|
||||
single | solaris | vxworks | win32 )
|
||||
target_thread_file=${enable_threads}
|
||||
;;
|
||||
|
||||
@@ -1277,7 +1277,7 @@ case ${enable_threads} in
|
||||
# default
|
||||
target_thread_file='single'
|
||||
;;
|
||||
aix | beos | dce | gnat | irix | posix | posix95 | rtems | \
|
||||
aix | beos | dce | gnat | haiku | irix | posix | posix95 | rtems | \
|
||||
single | solaris | vxworks | win32 )
|
||||
target_thread_file=${enable_threads}
|
||||
;;
|
||||
|
||||
@@ -340,7 +340,7 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
|
||||
#ifndef JCR_SECTION_NAME
|
||||
/* Hack to remove _Jv crap on BeOS. i know it should be made somehow through
|
||||
config files, but i don't know how (in which file ;) */
|
||||
#ifndef __BEOS__
|
||||
#if !defined(__BEOS__) && !defined(__HAIKU__)
|
||||
#define JCR_SECTION_NAME ".jcr"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef __gnuc_va_list va_list;
|
||||
#ifndef _VA_LIST
|
||||
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
|
||||
#ifndef _VA_LIST_T_H
|
||||
/* The macro __va_list__ is used by BeOS. */
|
||||
/* The macro __va_list__ is used by BeOS and Haiku. */
|
||||
#ifndef __va_list__
|
||||
typedef __gnuc_va_list va_list;
|
||||
#endif /* not __va_list__ */
|
||||
|
||||
@@ -169,7 +169,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
/* Define this type if we are doing the whole job,
|
||||
or if we want this type in particular. */
|
||||
#if defined (_STDDEF_H) || defined (__need_size_t)
|
||||
#ifndef __size_t__ /* BeOS */
|
||||
#ifndef __size_t__ /* BeOS, Haiku */
|
||||
#ifndef __SIZE_T__ /* Cray Unicos/Mk */
|
||||
#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
|
||||
#ifndef _SYS_SIZE_T_H
|
||||
@@ -186,7 +186,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#ifndef _GCC_SIZE_T
|
||||
#ifndef _SIZET_
|
||||
#ifndef __size_t
|
||||
#define __size_t__ /* BeOS */
|
||||
#define __size_t__ /* BeOS, Haiku */
|
||||
#define __SIZE_T__ /* Cray Unicos/Mk */
|
||||
#define _SIZE_T
|
||||
#define _SYS_SIZE_T_H
|
||||
@@ -212,9 +212,9 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#endif
|
||||
#if !(defined (__GNUG__) && defined (size_t))
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
#ifdef __BEOS__
|
||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
typedef long ssize_t;
|
||||
#endif /* __BEOS__ */
|
||||
#endif /* __BEOS__ || __HAIKU__ */
|
||||
#endif /* !(defined (__GNUG__) && defined (size_t)) */
|
||||
#endif /* __size_t */
|
||||
#endif /* _SIZET_ */
|
||||
@@ -245,7 +245,7 @@ typedef long ssize_t;
|
||||
/* Define this type if we are doing the whole job,
|
||||
or if we want this type in particular. */
|
||||
#if defined (_STDDEF_H) || defined (__need_wchar_t)
|
||||
#ifndef __wchar_t__ /* BeOS */
|
||||
#ifndef __wchar_t__ /* BeOS, Haiku */
|
||||
#ifndef __WCHAR_T__ /* Cray Unicos/Mk */
|
||||
#ifndef _WCHAR_T
|
||||
#ifndef _T_WCHAR_
|
||||
@@ -262,7 +262,7 @@ typedef long ssize_t;
|
||||
#ifndef ___int_wchar_t_h
|
||||
#ifndef __INT_WCHAR_T_H
|
||||
#ifndef _GCC_WCHAR_T
|
||||
#define __wchar_t__ /* BeOS */
|
||||
#define __wchar_t__ /* BeOS, Haiku */
|
||||
#define __WCHAR_T__ /* Cray Unicos/Mk */
|
||||
#define _WCHAR_T
|
||||
#define _T_WCHAR_
|
||||
|
||||
155
gcc/gcc/gthr-haiku.h
Normal file
155
gcc/gcc/gthr-haiku.h
Normal file
@@ -0,0 +1,155 @@
|
||||
/* Threads compatibility routines for libgcc2. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
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, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files,
|
||||
some of which are compiled with GCC, to produce an executable,
|
||||
this library 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 GCC_GTHR_HAIKU_H
|
||||
#define GCC_GTHR_HAIKU_H
|
||||
|
||||
/* If this file is compiled with threads support, it must
|
||||
#define __GTHREADS 1
|
||||
to indicate that threads support is present. Also it has define
|
||||
function
|
||||
int __gthread_active_p ()
|
||||
that returns 1 if thread system is active, 0 if not.
|
||||
|
||||
The threads interface must define the following types:
|
||||
__gthread_key_t
|
||||
__gthread_once_t
|
||||
__gthread_mutex_t
|
||||
|
||||
The threads interface must define the following macros:
|
||||
|
||||
__GTHREAD_ONCE_INIT
|
||||
to initialize __gthread_once_t
|
||||
__GTHREAD_MUTEX_INIT
|
||||
to initialize __gthread_mutex_t to get a fast
|
||||
non-recursive mutex.
|
||||
__GTHREAD_MUTEX_INIT_FUNCTION
|
||||
some systems can't initialize a mutex without a
|
||||
function call. On such systems, define this to a
|
||||
function which looks like this:
|
||||
void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
|
||||
Don't define __GTHREAD_MUTEX_INIT in this case
|
||||
|
||||
The threads interface must define the following static functions:
|
||||
|
||||
int __gthread_once (__gthread_once_t *once, void (*func) ())
|
||||
|
||||
int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
|
||||
int __gthread_key_delete (__gthread_key_t key)
|
||||
|
||||
void *__gthread_getspecific (__gthread_key_t key)
|
||||
int __gthread_setspecific (__gthread_key_t key, const void *ptr)
|
||||
|
||||
int __gthread_mutex_lock (__gthread_mutex_t *mutex);
|
||||
int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
|
||||
int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
|
||||
|
||||
All functions returning int should return zero on success or the error
|
||||
number. If the operation is not supported, -1 is returned.
|
||||
|
||||
Currently supported threads packages are
|
||||
POSIX threads with -D_PTHREADS
|
||||
DCE threads with -D_DCE_THREADS
|
||||
Solaris/UI threads with -D_SOLARIS_THREADS
|
||||
Haiku threads with -D_HAIKU_THREADS
|
||||
*/
|
||||
|
||||
#include <OS.h>
|
||||
#include <TLS.h>
|
||||
|
||||
#define __GTHREADS 1
|
||||
|
||||
// for now __gthread_key_delete is not used anywhere, so we don't need to "emulate it" using additional arrays or something :)
|
||||
typedef int32 __gthread_key_t;
|
||||
typedef vint32 __gthread_once_t;
|
||||
typedef vint32 __gthread_mutex_t;
|
||||
|
||||
#define __GTHREAD_ONCE_INIT 0
|
||||
#define __GTHREAD_MUTEX_INIT 0
|
||||
|
||||
static inline int __gthread_active_p ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int __gthread_once (__gthread_once_t *once, void (*func) ())
|
||||
{
|
||||
if (atomic_or(once, 1) == 0) {
|
||||
func();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
|
||||
{
|
||||
*keyp = tls_allocate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Haiku doesn't offer deleting TLS keys,
|
||||
// luckly delete is not used anywahere in gcc so we don't have to implement it (at least so for now :)
|
||||
// (and do create tricks with structs and arrays for keys, to run dtor for all tls_vars...)
|
||||
static inline int __gthread_key_delete (__gthread_key_t key)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void *__gthread_getspecific (__gthread_key_t key)
|
||||
{
|
||||
return tls_get(key);
|
||||
}
|
||||
|
||||
static inline int __gthread_setspecific (__gthread_key_t key, const void *ptr)
|
||||
{
|
||||
tls_set(key, (void*)ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __gthread_mutex_lock (__gthread_mutex_t *mutex)
|
||||
{
|
||||
while (atomic_or(mutex, 1) != 0) {
|
||||
snooze(3000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __gthread_mutex_trylock (__gthread_mutex_t *mutex)
|
||||
{
|
||||
if (atomic_or(mutex, 1) == 0)
|
||||
return 0;
|
||||
else
|
||||
return EBUSY;
|
||||
}
|
||||
|
||||
static inline int __gthread_mutex_unlock (__gthread_mutex_t *mutex)
|
||||
{
|
||||
atomic_and(mutex, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* ! GCC_GTHR_HAIKU_H */
|
||||
@@ -103,6 +103,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "gthr-dce.h"
|
||||
#elif _SOLARIS_THREADS
|
||||
#include "gthr-solaris.h"
|
||||
/* Haiku also defines __BEOS__ for backwards compatibility, so check it first */
|
||||
#elif __HAIKU__
|
||||
#include "gthr-haiku.h"
|
||||
#elif __BEOS__
|
||||
#include "gthr-beos.h"
|
||||
|
||||
|
||||
@@ -480,8 +480,8 @@ char *alloca ();
|
||||
# define O_BINARY _O_BINARY
|
||||
# define O_TEXT _O_TEXT
|
||||
#endif
|
||||
#ifdef __BEOS__
|
||||
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
|
||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
/* BeOS 5 and Haiku R1 have O_BINARY and O_TEXT, but they have no effect. */
|
||||
# undef O_BINARY
|
||||
# undef O_TEXT
|
||||
#endif
|
||||
|
||||
16219
gcc/libmudflap/configure
vendored
16219
gcc/libmudflap/configure
vendored
File diff suppressed because it is too large
Load Diff
56
gcc/libstdc++-v3/config/os/haiku/ctype_base.h
Normal file
56
gcc/libstdc++-v3/config/os/haiku/ctype_base.h
Normal file
@@ -0,0 +1,56 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
|
||||
// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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 /boot/develop/headers/posix/ctype.h
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
// Non-standard typedefs.
|
||||
typedef const int* __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 unsigned short 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
gcc/libstdc++-v3/config/os/haiku/ctype_inline.h
Normal file
69
gcc/libstdc++-v3/config/os/haiku/ctype_inline.h
Normal file
@@ -0,0 +1,69 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2002 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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;
|
||||
}
|
||||
131
gcc/libstdc++-v3/config/os/haiku/ctype_noninline.h
Normal file
131
gcc/libstdc++-v3/config/os/haiku/ctype_noninline.h
Normal file
@@ -0,0 +1,131 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
|
||||
// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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 /boot/develops/headers/posix/ctype.h
|
||||
|
||||
#if _GLIBCXX_C_LOCALE_GNU
|
||||
const ctype_base::mask*
|
||||
ctype<char>::classic_table() throw()
|
||||
{ return _S_get_c_locale()->__ctype_b; }
|
||||
#else
|
||||
const ctype_base::mask*
|
||||
ctype<char>::classic_table() throw()
|
||||
{
|
||||
const ctype_base::mask* __ret;
|
||||
__ret = __ctype_b;
|
||||
return __ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _GLIBCXX_C_LOCALE_GNU
|
||||
ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)),
|
||||
_M_del(__table != 0 && __del),
|
||||
_M_toupper(_M_c_locale_ctype->__ctype_toupper),
|
||||
_M_tolower(_M_c_locale_ctype->__ctype_tolower),
|
||||
_M_table(__table ? __table : _M_c_locale_ctype->__ctype_b),
|
||||
_M_widen_ok(0), _M_narrow_ok(0)
|
||||
{
|
||||
memset(_M_widen, 0, sizeof(_M_widen));
|
||||
memset(_M_narrow, 0, sizeof(_M_narrow));
|
||||
}
|
||||
#else
|
||||
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 = __ctype_toupper;
|
||||
_M_tolower = __ctype_tolower;
|
||||
_M_table = __table ? __table : __ctype_b;
|
||||
memset(_M_widen, 0, sizeof(_M_widen));
|
||||
memset(_M_narrow, 0, sizeof(_M_narrow));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _GLIBCXX_C_LOCALE_GNU
|
||||
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_toupper(_M_c_locale_ctype->__ctype_toupper),
|
||||
_M_tolower(_M_c_locale_ctype->__ctype_tolower),
|
||||
_M_table(__table ? __table : _M_c_locale_ctype->__ctype_b),
|
||||
_M_widen_ok(0), _M_narrow_ok(0)
|
||||
{
|
||||
memset(_M_widen, 0, sizeof(_M_widen));
|
||||
memset(_M_narrow, 0, sizeof(_M_narrow));
|
||||
}
|
||||
#else
|
||||
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 = __ctype_toupper;
|
||||
_M_tolower = __ctype_tolower;
|
||||
_M_table = __table ? __table : __ctype_b;
|
||||
memset(_M_widen, 0, sizeof(_M_widen));
|
||||
memset(_M_narrow, 0, sizeof(_M_narrow));
|
||||
}
|
||||
#endif
|
||||
|
||||
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;
|
||||
}
|
||||
41
gcc/libstdc++-v3/config/os/haiku/os_defines.h
Normal file
41
gcc/libstdc++-v3/config/os/haiku/os_defines.h
Normal file
@@ -0,0 +1,41 @@
|
||||
// Specific definitions for Haiku -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001, 2002, 2003 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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
|
||||
// bonefish: They are defined as macros and there's no guard macro to
|
||||
// prevent that.
|
||||
|
||||
#endif
|
||||
17243
gcc/libstdc++-v3/configure
vendored
17243
gcc/libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -157,6 +157,46 @@ case "${host}" in
|
||||
AC_DEFINE(HAVE_ISNANL)
|
||||
fi
|
||||
;;
|
||||
*haiku*)
|
||||
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
|
||||
machine/endian.h machine/param.h sys/machine.h sys/types.h \
|
||||
fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
AC_SUBST(SECTION_FLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_INT64_T)
|
||||
|
||||
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_SQRTF)
|
||||
AC_DEFINE(HAVE_TANF)
|
||||
AC_DEFINE(HAVE_TANHF)
|
||||
;;
|
||||
*-hpux*)
|
||||
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
|
||||
machine/endian.h machine/param.h sys/machine.h sys/types.h \
|
||||
|
||||
6154
gcc/libtool.m4
vendored
6154
gcc/libtool.m4
vendored
File diff suppressed because it is too large
Load Diff
@@ -175,6 +175,11 @@ EOF
|
||||
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
allow_undefined_flag=unsupported
|
||||
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
;;
|
||||
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
|
||||
@@ -750,7 +750,7 @@ if test "$with_gcc" = yes; then
|
||||
# like `-m68040'.
|
||||
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
|
||||
;;
|
||||
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
beos* | haiku* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
cygwin* | mingw* | os2*)
|
||||
|
||||
@@ -178,6 +178,11 @@ EOF
|
||||
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
allow_undefined_flag=unsupported
|
||||
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
;;
|
||||
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
|
||||
3514
gcc/ltmain.sh
3514
gcc/ltmain.sh
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user