зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla bug #41524: fixed build problems on NetBSD-current with ELF
object format. r=taya@sm.sony.co.jp. a=brendan@mozilla.org. Modified files: NetBSD.mk, _netbsd.h, prlink.c
This commit is contained in:
Родитель
f422b9aaac
Коммит
3b22399c97
|
@ -41,6 +41,10 @@ CC = gcc
|
|||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
ifndef OBJECT_FMT
|
||||
OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi)
|
||||
endif
|
||||
|
||||
OS_REL_CFLAGS =
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CPU_ARCH = x86
|
||||
|
@ -60,19 +64,14 @@ endif
|
|||
|
||||
ARCH = netbsd
|
||||
|
||||
ifeq ($(OBJECT_FMT),ELF)
|
||||
DLL_SUFFIX = so
|
||||
else
|
||||
DLL_SUFFIX = so.1.0
|
||||
endif
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -Bshareable
|
||||
ifeq ($(OS_TEST),alpha)
|
||||
DSO_LDOPTS = -shared
|
||||
endif
|
||||
ifeq ($(OS_TEST),mips)
|
||||
DSO_LDOPTS = -shared
|
||||
endif
|
||||
ifeq ($(OS_TEST),pmax)
|
||||
DSO_LDOPTS = -shared
|
||||
endif
|
||||
DSO_CFLAGS = -fPIC -DPIC
|
||||
DSO_LDOPTS = -x -shared
|
||||
|
||||
ifdef LIBRUNPATH
|
||||
DSO_LDOPTS += -R$(LIBRUNPATH)
|
||||
|
|
|
@ -55,7 +55,11 @@
|
|||
#define _PR_SI_ARCHITECTURE "arm32"
|
||||
#endif
|
||||
|
||||
#if defined(__ELF__)
|
||||
#define PR_DLL_SUFFIX ".so"
|
||||
#else
|
||||
#define PR_DLL_SUFFIX ".so.1.0"
|
||||
#endif
|
||||
|
||||
#define _PR_VMBASE 0x30000000
|
||||
#define _PR_STACK_VMBASE 0x50000000
|
||||
|
@ -68,6 +72,8 @@
|
|||
#define _PR_HAVE_SOCKADDR_LEN
|
||||
#define _PR_NO_LARGE_FILES
|
||||
#define _PR_STAT_HAS_ST_ATIMESPEC
|
||||
#define _PR_POLL_AVAILABLE
|
||||
#define _PR_USE_POLL
|
||||
#define _PR_HAVE_SYSV_SEMAPHORES
|
||||
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
|
||||
|
||||
|
@ -226,7 +232,10 @@ struct _MDCPU {
|
|||
* unwrapped version.
|
||||
*/
|
||||
#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv)
|
||||
#if defined(_PR_POLL_AVAILABLE)
|
||||
#include <poll.h>
|
||||
#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout)
|
||||
#endif
|
||||
|
||||
#if NetBSD1_3 == 1L
|
||||
typedef unsigned int nfds_t;
|
||||
|
|
|
@ -80,7 +80,8 @@
|
|||
* On these platforms, symbols have a leading '_'.
|
||||
*/
|
||||
#if defined(SUNOS4) || defined(RHAPSODY) || defined(NEXTSTEP) \
|
||||
|| defined(OPENBSD) || defined(WIN16) || defined(NETBSD)
|
||||
|| defined(OPENBSD) || defined(WIN16) \
|
||||
|| (defined(NETBSD) && !defined(__ELF__))
|
||||
#define NEED_LEADING_UNDERSCORE
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче