Merge changes from HaikuPorts patches.
Diff
gcc/config.rpath | 4 ++--
gcc/configure | 5 ++++-
gcc/configure.ac | 10 ++++++++--
gcc/libtool.m4 | 9 +++------
gcc/gcc/Makefile.in | 2 +-
gcc/gcc/config.gcc | 40 +++++++++++++++++++++++-----------------
gcc/gcc/configure | 17 +++++++----------
gcc/libatomic/configure | 37 +++++++++++++++++++++++++++++--------
gcc/libatomic/configure.ac | 24 +++++++++++++++---------
gcc/libatomic/configure.tgt | 2 +-
gcc/libgcc/config.host | 25 ++++++++++++++-----------
gcc/libgcc/crtstuff.c | 2 ++
gcc/libgomp/configure | 44 +++++++++++++++++++++++++++++++++-----------
gcc/libgomp/configure.ac | 16 +++++++++++-----
gcc/libstdc++-v3/acinclude.m4 | 3 +++
gcc/libstdc++-v3/configure | 17 +++++++++--------
gcc/gcc/config/haiku-protos.h | 21 +++++++++++++++++++++
gcc/gcc/config/haiku-spec.h | 38 --------------------------------------
gcc/gcc/config/haiku.c | 32 ++++++++++++++++++++++++++++++++
gcc/gcc/config/haiku.h | 15 ++++++++-------
gcc/gcc/config/t-haiku | 7 ++++++-
gcc/gcc/ginclude/stdarg.h | 2 +-
gcc/gcc/ginclude/stddef.h | 10 +++++-----
gcc/libstdc++-v3/libsupc++/tinfo.cc | 9 +++++++++
gcc/gcc/config/i386/haiku64.h | 2 +-
gcc/libstdc++-v3/config/os/haiku/ctype_inline.h | 9 +++++++--
26 files changed, 248 insertions(+), 154 deletions(-)
@@ -161,8 +161,8 @@
;;
netbsd*)
;;
haiku*)
;;
haiku*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
@@ -3161,7 +3161,7 @@
;;
*-*-solaris2* | *-*-hpux11*)
;;
*-*-darwin* | *-*-aix*)
*-*-darwin* | *-*-aix* | *-*-haiku*)
;;
nvptx*-*-*)
;;
@@ -3380,6 +3380,9 @@
;;
*-*-darwin*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-haiku*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
*-*-netware*)
noconfigdirs="$noconfigdirs target-libffi"
@@ -513,7 +513,7 @@
;;
*-*-solaris2* | *-*-hpux11*)
;;
*-*-darwin* | *-*-aix*)
*-*-darwin* | *-*-aix* | *-*-haiku*)
;;
nvptx*-*-*)
;;
@@ -712,6 +712,9 @@
*-*-darwin*)
noconfigdirs="$noconfigdirs target-libffi"
;;
*-*-haiku*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
*-*-netware*)
noconfigdirs="$noconfigdirs target-libffi"
;;
@@ -878,7 +881,7 @@
*-*-aix*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-haiku*)
*-*-beos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-chorusos)
@@ -888,6 +891,9 @@
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-freebsd*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-haiku*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
@@ -2342,8 +2342,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -3626,8 +3627,6 @@
;;
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
_LT_TAGVAR(lt_prog_compiler_static, $1)=
;;
interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
@@ -3937,8 +3936,6 @@
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
_LT_TAGVAR(lt_prog_compiler_static, $1)=
;;
hpux*)
@@ -2819,7 +2819,7 @@
genprog = $(genprogerr) check checksum condmd match
# These programs need libs over and above what they get from the above list.
build/genautomata$(build_exeext) : BUILD_LIBS += -lm
build/genautomata$(build_exeext) : BUILD_LIBS += @build_math_library@
build/genrecog$(build_exeext) : build/hash-table.o build/inchash.o
build/gencfn-macros$(build_exeext) : build/hash-table.o build/vec.o \
@@ -759,6 +759,8 @@
"" | yes | posix) thread_file='posix' ;;
esac
default_use_cxa_atexit=yes
tm_p_file="${tm_p_file} haiku-protos.h"
extra_objs="${extra_objs} haiku.o"
;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
extra_options="$extra_options gnu-user.opt"
@@ -1151,15 +1153,15 @@
target_cpu_cname="arm6"
;;
arm*-*-haiku*)
tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-haiku"
tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/bpabi.h arm/haiku.h haiku-stdint.h"
# The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of
# TImode.
need_64bit_hwint=yes
default_use_cxa_atexit=yes
tm_file="${tm_file} arm/aout.h arm/arm.h"
;;
tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-haiku"
tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/bpabi.h arm/haiku.h haiku-stdint.h"
# The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of
# TImode.
need_64bit_hwint=yes
default_use_cxa_atexit=yes
tm_file="${tm_file} arm/aout.h arm/arm.h"
;;
arm*-*-linux-*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
extra_options="${extra_options} linux-android.opt"
@@ -2047,12 +2049,12 @@
tm_defines="${tm_defines} MOTOROLA=1"
;;
m68k-*-haiku*)
default_m68k_cpu=68020
default_cf_cpu=5206
tmake_file="${tmake_file} m68k/t-m68kbare m68k/t-crtstuff t-haiku" #??
tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h haiku-stdint.h"
tm_defines="${tm_defines} MOTOROLA=1"
;;
default_m68k_cpu=68020
default_cf_cpu=5206
tmake_file="${tmake_file} m68k/t-m68kbare m68k/t-crtstuff t-haiku" #??
tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h"
tm_defines="${tm_defines} MOTOROLA=1"
;;
mcore-*-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
tmake_file=mcore/t-mcore
@@ -2181,10 +2183,10 @@
gas=yes
;;
mipsel-*-haiku*)
target_cpu_default="MASK_ABICALLS"
tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h haiku-stdint.h"
tmake_file="${tmake_file} mips/t-elf t-haiku"
;;
target_cpu_default="MASK_ABICALLS"
tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h"
tmake_file="${tmake_file} mips/t-elf t-haiku"
;;
mips*-*-linux*) # Linux MIPS, either endian.
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
extra_options="${extra_options} linux-android.opt"
@@ -15565,8 +15565,6 @@
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static=
;;
hpux*)
@@ -17678,8 +17676,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -18196,7 +18195,7 @@
lt_cv_dlopen_libs=
case $host_os in
beos* | haiku*)
beos* | haiku* )
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -20394,7 +20393,6 @@
;;
esac
;;
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
@@ -20416,8 +20414,6 @@
;;
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static_CXX=
;;
interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
@@ -21338,8 +21334,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -8211,8 +8211,6 @@
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static=
;;
hpux*)
@@ -10324,8 +10322,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -10842,7 +10841,7 @@
lt_cv_dlopen_libs=
case $host_os in
beos*)
beos* | haiku* )
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -11120,7 +11119,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11123 "configure"
#line 11122 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11226,7 +11225,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11229 "configure"
#line 11228 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14609,11 +14608,26 @@
case " $config_path " in
*" posix "*)
XPCFLAGS=""
CFLAGS="$CFLAGS -pthread"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
void *g(void *d) { return NULL; }
int
main ()
{
pthread_t t; pthread_create(&t,NULL,g,NULL);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
else
CFLAGS="$CFLAGS -pthread"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
void *g(void *d) { return NULL; }
int
main ()
{
@@ -14626,10 +14640,10 @@
XPCFLAGS=" -pthread"
else
CFLAGS="$save_CFLAGS $XCFLAGS" LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
void *g(void *d) { return NULL; }
void *g(void *d) { return NULL; }
int
main ()
{
@@ -14642,6 +14656,9 @@
else
as_fn_error "Pthreads are required to build libatomic" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -209,21 +209,27 @@
case " $config_path " in
*" posix "*)
XPCFLAGS=""
CFLAGS="$CFLAGS -pthread"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[XPCFLAGS=" -pthread"],
[CFLAGS="$save_CFLAGS $XCFLAGS" LIBS="-lpthread $LIBS"
[],
[CFLAGS="$CFLAGS -pthread"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[],
[AC_MSG_ERROR([Pthreads are required to build libatomic])])])
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[XPCFLAGS=" -pthread"],
[CFLAGS="$save_CFLAGS $XCFLAGS" LIBS="-lpthread $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[],
[AC_MSG_ERROR([Pthreads are required to build libatomic])])])])
CFLAGS="$save_CFLAGS $XPCFLAGS"
;;
esac
@@ -137,7 +137,7 @@
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
| *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
| *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
| *-*-darwin* | *-*-aix* | *-*-cygwin*)
| *-*-darwin* | *-*-aix* | *-*-cygwin* | *-*-haiku*)
# POSIX system. The OS is supported.
config_path="${config_path} posix"
;;
@@ -231,13 +231,17 @@
;;
esac
;;
*-*-haiku*)
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-slibgcc-nolc-override t-haiku"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
;;
*-*-fuchsia*)
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-fuchsia"
extra_parts="crtbegin.o crtend.o"
;;
*-*-haiku*)
# This is the generic ELF configuration of Haiku. Later
# machine-specific sections may refine and add to this
# configuration.
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-haiku t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
tmake_file="$tmake_file t-slibgcc-libgcc t-slibgcc-nolc-override"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
@@ -417,13 +421,6 @@
arm*-*-freebsd*) # ARM FreeBSD EABI
tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd"
tm_file="${tm_file} arm/bpabi-lib.h"
unwind_header=config/arm/unwind-arm.h
tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
;;
arm*-*-haiku*)
tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
tmake_file="${tmake_file} arm/t-bpabi"
tm_file="${tm_file} arm/bpabi-lib.h"
unwind_header=config/arm/unwind-arm.h
tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
@@ -436,6 +433,12 @@
;;
arm*-*-netbsdelf*)
tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
;;
arm-*-haiku*)
tmake_file="${tmake_file} arm/t-arm arm/t-elf arm/t-bpabi"
tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
tm_file="${tm_file} arm/bpabi-lib.h"
unwind_header=config/arm/unwind-arm.h
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
@@ -108,7 +108,9 @@
&& defined(HAVE_LD_EH_FRAME_HDR) \
&& !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
&& defined(__GLIBC__) && __GLIBC__ >= 2
#ifndef __HAIKU__
#include <link.h>
#endif
/* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */
# if !defined(__UCLIBC__) \
@@ -8248,8 +8248,6 @@
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static=
;;
hpux*)
@@ -10361,8 +10359,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -10879,7 +10878,7 @@
lt_cv_dlopen_libs=
case $host_os in
beos*)
beos* | haiku* )
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -11157,7 +11156,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11160 "configure"
#line 11159 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11263,7 +11262,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11266 "configure"
#line 11265 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12123,8 +12122,6 @@
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static_FC=
;;
hpux*)
@@ -14001,8 +13998,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -15086,7 +15084,6 @@
*)
# Check to see if -pthread or -lpthread is needed. Prefer the former.
# In case the pthread.h system header is not found, this test will fail.
CFLAGS="$CFLAGS -pthread"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
@@ -15100,13 +15097,29 @@
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
XPCFLAGS=" -Wc,-pthread"
else
CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
CFLAGS="$CFLAGS -pthread"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
void *g(void *d) { return NULL; }
int
main ()
{
pthread_t t; pthread_create(&t,NULL,g,NULL);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
XPCFLAGS=" -Wc,-pthread"
else
CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
void *g(void *d) { return NULL; }
int
main ()
{
@@ -15119,6 +15132,9 @@
else
as_fn_error "Pthreads are required to build libgomp" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -188,21 +188,27 @@
*)
# Check to see if -pthread or -lpthread is needed. Prefer the former.
# In case the pthread.h system header is not found, this test will fail.
CFLAGS="$CFLAGS -pthread"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[XPCFLAGS=" -Wc,-pthread"],
[CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
[],
[CFLAGS="$CFLAGS -pthread"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[],
[AC_MSG_ERROR([Pthreads are required to build libgomp])])])
[XPCFLAGS=" -Wc,-pthread"],
[CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
void *g(void *d) { return NULL; }],
[pthread_t t; pthread_create(&t,NULL,g,NULL);])],
[],
[AC_MSG_ERROR([Pthreads are required to build libgomp])])])])
esac
if test x$libgomp_use_pthreads != xno; then
@@ -4299,6 +4299,9 @@
solaris*)
enable_libstdcxx_filesystem_ts=yes
;;
haiku*)
enable_libstdcxx_filesystem_ts=yes
;;
*)
enable_libstdcxx_filesystem_ts=no
;;
@@ -8672,8 +8672,6 @@
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static=
;;
hpux*)
@@ -10794,8 +10792,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -13556,8 +13555,6 @@
;;
haiku*)
# PIC is the default for Haiku.
# The "-static" flag exists, but is broken.
lt_prog_compiler_static_CXX=
;;
interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
@@ -14478,8 +14475,9 @@
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
hardcode_into_libs=yes
sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -80142,6 +80140,9 @@
enable_libstdcxx_filesystem_ts=yes
;;
solaris*)
enable_libstdcxx_filesystem_ts=yes
;;
haiku*)
enable_libstdcxx_filesystem_ts=yes
;;
*)
@@ -1,0 +1,21 @@
/* Operating system specific prototypes to be used when targeting GCC for Haiku.
Copyright (C) 2021 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 3, 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 COPYING3. If not see
<http:
extern void haiku_override_options (void);
@@ -1,38 +1,0 @@
#define HAIKU_TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__HAIKU__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_assert ("system=haiku"); \
/* 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"); \
HAIKU_TARGET_CPU_CPP_BUILTINS(); \
} \
while (0)
#define HAIKU_TARGET_CPU_CPP_BUILTINS() do {} while (0)
/* Provide a CPP_SPEC appropriate for Haiku. We just deal with the GCC
option `-posix', and PIC issues. */
#define HAIKU_CPP_SPEC " \
%(cpp_cpu) \
%(cpp_arch) \
%{posix:-D_POSIX_SOURCE}"
#define HAIKU_STARTFILE_SPEC \
"crti.o%s crtbeginS.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s"
#define HAIKU_ENDFILE_SPEC \
"crtendS.o%s crtn.o%s"
#define HAIKU_LIB_SPEC \
"-lroot"
#define HAIKU_DYNAMIC_LINKER \
"/system/runtime_loader"
@@ -1,0 +1,32 @@
/* General Haiku system support.
Copyright (C) 2021 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 3, 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 COPYING3. If not see
<http:
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "target.h"
void
haiku_override_options (void)
{
if (!global_options_set.x_dwarf_strict)
dwarf_strict = 1;
if (!global_options_set.x_dwarf_version)
dwarf_version = 4;
}
@@ -53,6 +53,11 @@
#undef CC1PLUS_SPEC
#define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}"
#define SUBTARGET_OVERRIDE_OPTIONS \
do { \
haiku_override_options (); \
} while (0)
#undef LIB_SPEC
#define LIB_SPEC "-lroot"
@@ -204,14 +209,10 @@
#define NO_IMPLICIT_EXTERN_C
#ifndef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}"
#endif
#define TARGET_NO_JCR_SECTION_NAME 1
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
":-lssp_nonshared}"
#define USE_TM_CLONE_REGISTRY 0
@@ -1,4 +1,9 @@
# There are system headers elsewhere, but these are the ones that
# we are most likely to want to apply any fixes to.
NATIVE_SYSTEM_HEADER_DIR = /boot/system/develop/headers
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]
# Haiku-specific attributes
haiku.o: $(srcdir)/config/haiku.c
$(COMPILE) $<
$(POSTCOMPILE)
@@ -94,7 +94,7 @@
#ifndef _VA_LIST
#ifndef _VA_LIST_T_H
#ifndef __va_list__
typedef __gnuc_va_list va_list;
#endif
@@ -167,7 +167,7 @@
/* 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__
#ifndef __size_t__
#ifndef __SIZE_T__
#ifndef _SIZE_T
#ifndef _SYS_SIZE_T_H
@@ -184,7 +184,7 @@
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
#define __size_t__
#define __size_t__
#define __SIZE_T__
#define _SIZE_T
#define _SYS_SIZE_T_H
@@ -214,7 +214,7 @@
#endif
#if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t;
#ifdef __BEOS__
#if defined(__BEOS__)
typedef long ssize_t;
#endif
#endif
@@ -247,7 +247,7 @@
/* 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__
#ifndef __wchar_t__
#ifndef __WCHAR_T__
#ifndef _WCHAR_T
#ifndef _T_WCHAR_
@@ -264,7 +264,7 @@
#ifndef ___int_wchar_t_h
#ifndef __INT_WCHAR_T_H
#ifndef _GCC_WCHAR_T
#define __wchar_t__
#define __wchar_t__
#define __WCHAR_T__
#define _WCHAR_T
#define _T_WCHAR_
@@ -30,6 +30,15 @@
~type_info ()
{ }
#ifdef __HAIKU__
#ifndef __GXX_MERGED_TYPEINFO_NAMES
#define __GXX_MERGED_TYPEINFO_NAMES 0
#endif
#ifndef __GXX_TYPEINFO_EQUALITY_INLINE
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#endif
#endif
#if !__GXX_TYPEINFO_EQUALITY_INLINE
@@ -113,7 +113,7 @@
%{Wa,*:%*} %{" SPEC_32 ":--32} %{" SPEC_64 ":--64}"
#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
x86_elf_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN);
@@ -1,6 +1,6 @@
@@ -97,6 +97,11 @@
case graph:
__testis = isgraph(__c);
break;
#if __cplusplus >= 201103L
case blank:
__testis = isblank(__c);
break;
#endif
default:
__testis = false;
break;
@@ -117,7 +122,7 @@
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
else
{
const size_t __bitmasksize = 15;
for (;__low < __high; ++__vec, ++__low)
{