mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Add support for the OpenBSD for Bitrig.
Patch by David Hill. llvm-svn: 161344
This commit is contained in:
parent
03f8384c4e
commit
f5132794cd
4
autoconf/config.guess
vendored
4
autoconf/config.guess
vendored
@ -206,6 +206,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -1560,7 +1560,7 @@ EOF
|
||||
# These systems don't actually have a C library (as such)
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
|
||||
# Do not include libc due to us having libc/libc_r.
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
@ -1580,7 +1580,7 @@ EOF
|
||||
esac
|
||||
elif test "X$arg" = "X-lc_r"; then
|
||||
case $host in
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | -*-*-bitrig*)
|
||||
# Do not include libc_r directly, use -pthread flag.
|
||||
continue
|
||||
;;
|
||||
@ -3464,7 +3464,7 @@ EOF
|
||||
*-*-netbsd*)
|
||||
# Don't link with libc until the a.out ld.so is fixed.
|
||||
;;
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
|
||||
# Do not include libc due to us having libc/libc_r.
|
||||
;;
|
||||
*-*-sco3.2v5* | *-*-sco5v6*)
|
||||
|
10
autoconf/m4/libtool.m4
vendored
10
autoconf/m4/libtool.m4
vendored
@ -176,7 +176,7 @@ old_postuninstall_cmds=
|
||||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
openbsd*)
|
||||
openbsd* | bitrig*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
|
||||
;;
|
||||
*)
|
||||
@ -729,7 +729,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | bitrig*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
@ -1631,7 +1631,7 @@ nto-qnx*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
openbsd* | bitrig*)
|
||||
version_type=sunos
|
||||
sys_lib_dlsearch_path_spec="/usr/lib"
|
||||
need_lib_prefix=no
|
||||
@ -3382,7 +3382,7 @@ case $host_os in
|
||||
# C++ shared libraries are fairly broken
|
||||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
openbsd*)
|
||||
openbsd* | bitrig*)
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
@ -6003,7 +6003,7 @@ _LT_EOF
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
openbsd* | bitrig*)
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
|
2
configure
vendored
2
configure
vendored
@ -8947,7 +8947,7 @@ nto-qnx*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
openbsd* | bitrig*)
|
||||
version_type=sunos
|
||||
sys_lib_dlsearch_path_spec="/usr/lib"
|
||||
need_lib_prefix=no
|
||||
|
@ -98,7 +98,8 @@ public:
|
||||
Minix,
|
||||
RTEMS,
|
||||
NativeClient,
|
||||
CNK // BG/P Compute-Node Kernel
|
||||
CNK, // BG/P Compute-Node Kernel
|
||||
Bitrig
|
||||
};
|
||||
enum EnvironmentType {
|
||||
UnknownEnvironment,
|
||||
|
@ -59,7 +59,8 @@ MutexImpl::MutexImpl( bool recursive)
|
||||
errorcode = pthread_mutexattr_settype(&attr, kind);
|
||||
assert(errorcode == 0);
|
||||
|
||||
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
|
||||
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \
|
||||
!defined(__DragonFly__) && !defined(__Bitrig__)
|
||||
// Make it a process local mutex
|
||||
errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE);
|
||||
assert(errorcode == 0);
|
||||
|
@ -124,6 +124,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
|
||||
case RTEMS: return "rtems";
|
||||
case NativeClient: return "nacl";
|
||||
case CNK: return "cnk";
|
||||
case Bitrig: return "bitrig";
|
||||
}
|
||||
|
||||
llvm_unreachable("Invalid OSType");
|
||||
@ -293,6 +294,7 @@ static Triple::OSType parseOS(StringRef OSName) {
|
||||
.StartsWith("rtems", Triple::RTEMS)
|
||||
.StartsWith("nacl", Triple::NativeClient)
|
||||
.StartsWith("cnk", Triple::CNK)
|
||||
.StartsWith("bitrig", Triple::Bitrig)
|
||||
.Default(Triple::UnknownOS);
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ Path::GetCurrentDirectory() {
|
||||
return Path(pathname);
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined (__NetBSD__) || \
|
||||
#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
|
||||
defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__)
|
||||
static int
|
||||
test_dir(char buf[PATH_MAX], char ret[PATH_MAX],
|
||||
@ -329,7 +329,7 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
|
||||
if (realpath(exe_path, link_path))
|
||||
return Path(link_path);
|
||||
}
|
||||
#elif defined(__FreeBSD__) || defined (__NetBSD__) || \
|
||||
#elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
|
||||
defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__)
|
||||
char exe_path[PATH_MAX];
|
||||
|
||||
|
@ -20,9 +20,10 @@
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
// DragonFly BSD has deprecated <malloc.h> for <stdlib.h> instead,
|
||||
// Unix.h includes this for us already.
|
||||
#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__)
|
||||
// DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for
|
||||
// <stdlib.h> instead. Unix.h includes this for us already.
|
||||
#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \
|
||||
!defined(__OpenBSD__) && !defined(__Bitrig__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_MALLOC_H
|
||||
|
@ -91,9 +91,10 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
|
||||
// Exceptions handling
|
||||
ExceptionsType = ExceptionHandling::DwarfCFI;
|
||||
|
||||
// OpenBSD has buggy support for .quad in 32-bit mode, just split into two
|
||||
// .words.
|
||||
if (T.getOS() == Triple::OpenBSD && T.getArch() == Triple::x86)
|
||||
// OpenBSD and Bitrig have buggy support for .quad in 32-bit mode, just split
|
||||
// into two .words.
|
||||
if ((T.getOS() == Triple::OpenBSD || T.getOS() == Triple::Bitrig) &&
|
||||
T.getArch() == Triple::x86)
|
||||
Data64bitsDirective = 0;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ ifeq ($(HOST_OS),Darwin)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU))
|
||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU Bitrig))
|
||||
# Include everything from the .a's into the shared library.
|
||||
LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
|
||||
-Wl,--no-whole-archive
|
||||
|
Loading…
Reference in New Issue
Block a user