mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-08 18:30:04 +00:00
Fix the build under Debian GNU/Hurd.
Thanks to Pino Toscano for the patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
611afc0620
commit
6fc30c26b7
@ -1432,7 +1432,7 @@ LD.Flags += -Wl,-exported_symbol,_main
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD))
|
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU))
|
||||||
ifneq ($(ARCH), Mips)
|
ifneq ($(ARCH), Mips)
|
||||||
LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
|
LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
|
||||||
endif
|
endif
|
||||||
|
@ -60,6 +60,11 @@
|
|||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// For GNU Hurd
|
||||||
|
#if defined(__GNU__) && !defined(MAXPATHLEN)
|
||||||
|
# define MAXPATHLEN 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
// Put in a hack for Cygwin which falsely reports that the mkdtemp function
|
// Put in a hack for Cygwin which falsely reports that the mkdtemp function
|
||||||
// is available when it is not.
|
// is available when it is not.
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
@ -46,6 +46,11 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// For GNU Hurd
|
||||||
|
#if defined(__GNU__) && !defined(PATH_MAX)
|
||||||
|
# define PATH_MAX 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -96,7 +101,12 @@ namespace sys {
|
|||||||
namespace fs {
|
namespace fs {
|
||||||
|
|
||||||
error_code current_path(SmallVectorImpl<char> &result) {
|
error_code current_path(SmallVectorImpl<char> &result) {
|
||||||
|
#ifdef MAXPATHLEN
|
||||||
result.reserve(MAXPATHLEN);
|
result.reserve(MAXPATHLEN);
|
||||||
|
#else
|
||||||
|
// For GNU Hurd
|
||||||
|
result.reserve(1024);
|
||||||
|
#endif
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (::getcwd(result.data(), result.capacity()) == 0) {
|
if (::getcwd(result.data(), result.capacity()) == 0) {
|
||||||
|
@ -136,7 +136,7 @@ int Process::GetCurrentGroupId() {
|
|||||||
return getgid();
|
return getgid();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MACH_MACH_H
|
#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ void Process::PreventCoreFiles() {
|
|||||||
setrlimit(RLIMIT_CORE, &rlim);
|
setrlimit(RLIMIT_CORE, &rlim);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MACH_MACH_H
|
#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
|
||||||
// Disable crash reporting on Mac OS X 10.0-10.4
|
// Disable crash reporting on Mac OS X 10.0-10.4
|
||||||
|
|
||||||
// get information about the original set of exception ports for the task
|
// get information about the original set of exception ports for the task
|
||||||
|
@ -63,7 +63,7 @@ ifeq ($(HOST_OS),Darwin)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD))
|
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU))
|
||||||
# Include everything from the .a's into the shared library.
|
# Include everything from the .a's into the shared library.
|
||||||
LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
|
LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
|
||||||
-Wl,--no-whole-archive
|
-Wl,--no-whole-archive
|
||||||
@ -71,7 +71,7 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD))
|
|||||||
LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
|
LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),Linux)
|
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU))
|
||||||
# Don't allow unresolved symbols.
|
# Don't allow unresolved symbols.
|
||||||
LLVMLibsOptions += -Wl,--no-undefined
|
LLVMLibsOptions += -Wl,--no-undefined
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user