summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-11-02 14:37:22 +0100
committerGitHub <noreply@github.com>2019-11-02 14:37:22 +0100
commit21b3f6247403c06f85e1f45d219f87549862198f (patch)
tree0038ae92f1cc7aaff0b55d6e5ac59efcc28bdf8f /config
parentff881bdb6795e0f307b93919f98f454bedde4bb6 (diff)
parenta9dc528a4a7b0aaad5308aff70963485ec3e9bec (diff)
downloadUXP-21b3f6247403c06f85e1f45d219f87549862198f.tar
UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar.gz
UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar.lz
UXP-21b3f6247403c06f85e1f45d219f87549862198f.tar.xz
UXP-21b3f6247403c06f85e1f45d219f87549862198f.zip
Merge pull request #1262 from athenian200/solaris-work
Support Modern Solaris
Diffstat (limited to 'config')
-rw-r--r--config/external/ffi/moz.build26
-rw-r--r--config/external/nspr/pr/moz.build15
-rw-r--r--config/external/nspr/prcpucfg.h2
-rw-r--r--config/external/nss/Makefile.in20
-rw-r--r--config/system-headers1
5 files changed, 62 insertions, 2 deletions
diff --git a/config/external/ffi/moz.build b/config/external/ffi/moz.build
index e9ef07de3..01ccd0547 100644
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -35,9 +35,17 @@ else:
'FFI_NO_RAW_API': True,
'HAVE_AS_ASCII_PSEUDO_OP': True,
'HAVE_AS_STRING_PSEUDO_OP': True,
- 'HAVE_AS_X86_64_UNWIND_SECTION_TYPE': True,
})
+# This should NEVER be true on 32-bit x86 systems. It's called x86_64 unwind
+# section type for a reason. By rights the way it was before should have broken
+# all 32-bit builds on x86.
+
+ if CONFIG['FFI_TARGET'] == 'X86':
+ DEFINES['HAVE_AS_X86_64_UNWIND_SECTION_TYPE'] = False
+ else:
+ DEFINES['HAVE_AS_X86_64_UNWIND_SECTION_TYPE'] = True
+
if CONFIG['MOZ_DEBUG']:
DEFINES['FFI_DEBUG'] = True
if not CONFIG['MOZ_NO_DEBUG_RTL']:
@@ -49,14 +57,28 @@ else:
if CONFIG['OS_TARGET'] not in ('WINNT', 'Darwin'):
DEFINES['HAVE_HIDDEN_VISIBILITY_ATTRIBUTE'] = True
- if CONFIG['INTEL_ARCHITECTURE']:
+# Solaris uses datarel encoding for x86. This causes a lot of really stupid
+# problems, like the vast majority of x86 assembler not being considered PIC
+# on Solaris.
+
+ if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['OS_TARGET'] != 'SunOS':
+ DEFINES['HAVE_AS_X86_PCREL'] = True
+
+# Which is why they apparently don't do this anymore on amd64.
+
+ if CONFIG['FFI_TARGET'] == 'X86_64' and CONFIG['OS_TARGET'] == 'SunOS':
DEFINES['HAVE_AS_X86_PCREL'] = True
# Don't bother setting EH_FRAME_FLAGS on Windows.
# Quoted defines confuse msvcc.sh, and the value isn't used there.
if CONFIG['OS_TARGET'] != 'WINNT':
+ # Solaris seems to require EH_FRAME to be writable even on x86.
+ # It works fine most of the time and there's no rule against it,
+ # but it causes a lot of weird problems.
if CONFIG['FFI_TARGET'] == 'ARM':
DEFINES['EH_FRAME_FLAGS'] = '"aw"'
+ elif CONFIG['FFI_TARGET'] == 'X86' and CONFIG['OS_TARGET'] == 'SunOS':
+ DEFINES['EH_FRAME_FLAGS'] = '"aw"'
else:
DEFINES['EH_FRAME_FLAGS'] = '"a"'
diff --git a/config/external/nspr/pr/moz.build b/config/external/nspr/pr/moz.build
index af710f850..1d2df3099 100644
--- a/config/external/nspr/pr/moz.build
+++ b/config/external/nspr/pr/moz.build
@@ -51,6 +51,20 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
]
if not CONFIG['MOZ_IOS']:
DEFINES['HAVE_CRT_EXTERNS_H'] = True
+elif CONFIG['OS_TARGET'] == 'SunOS':
+ DEFINES.update(
+ HAVE_FCNTL_FILE_LOCKING=True,
+ HAVE_SOCKLEN_T=True,
+ _PR_HAVE_OFF64_T=True,
+ _PR_INET6=True,
+ )
+ DEFINES['SOLARIS'] = True
+ SOURCES += ['/nsprpub/pr/src/md/unix/solaris.c']
+ if CONFIG['CPU_ARCH'] == 'x86_64':
+ SOURCES += ['/nsprpub/pr/src/md/unix/os_SunOS_x86_64.s']
+ DEFINES['USE_64'] = True
+ elif CONFIG['CPU_ARCH'] == 'x86':
+ SOURCES += ['/nsprpub/pr/src/md/unix/os_SunOS_x86.s']
elif CONFIG['OS_TARGET'] == 'WINNT':
OS_LIBS += [
'advapi32',
@@ -224,6 +238,7 @@ EXPORTS.nspr.md += [
'/nsprpub/pr/include/md/_linux.cfg',
'/nsprpub/pr/include/md/_netbsd.cfg',
'/nsprpub/pr/include/md/_openbsd.cfg',
+ '/nsprpub/pr/include/md/_solaris.cfg',
'/nsprpub/pr/include/md/_win95.cfg',
]
diff --git a/config/external/nspr/prcpucfg.h b/config/external/nspr/prcpucfg.h
index 5f7962733..8769abeeb 100644
--- a/config/external/nspr/prcpucfg.h
+++ b/config/external/nspr/prcpucfg.h
@@ -22,6 +22,8 @@
#include "md/_openbsd.cfg"
#elif defined(__linux__)
#include "md/_linux.cfg"
+#elif defined(__sun__)
+#include "md/_solaris.cfg"
#else
#error "Unsupported platform!"
#endif
diff --git a/config/external/nss/Makefile.in b/config/external/nss/Makefile.in
index 2c266eb20..71954b403 100644
--- a/config/external/nss/Makefile.in
+++ b/config/external/nss/Makefile.in
@@ -43,6 +43,21 @@ endif
# Default
HAVE_FREEBL_LIBS = 1
+# SunOS SPARC
+
+ifeq ($(OS_ARCH), SunOS)
+ifneq (86,$(findstring 86,$(OS_TEST)))
+ifdef HAVE_64BIT_BUILD
+HAVE_FREEBL_LIBS =
+HAVE_FREEBL_LIBS_64 = 1
+else
+HAVE_FREEBL_LIBS =
+HAVE_FREEBL_LIBS_32FPU = 1
+HAVE_FREEBL_LIBS_32INT64 = 1
+endif
+endif
+endif
+
ifeq ($(OS_TARGET),Linux)
HAVE_FREEBL_LIBS =
HAVE_FREEBL_LIBS_PRIV = 1
@@ -317,6 +332,11 @@ NSS_DIST_DLL_DEST := $(DIST)/bin
NSS_DIST_DLL_TARGET := target
INSTALL_TARGETS += NSS_DIST_DLL
+ifeq ($(OS_ARCH)_$(1), SunOS_softokn3)
+# has to use copy mode on Solaris, see #665509
+$(DIST)/bin/$(DLL_PREFIX)softokn3$(DLL_SUFFIX): INSTALL := $(NSINSTALL) -t
+endif
+
NSS_SDK_LIB_FILES := \
$(addprefix $(DIST)/lib/$(LIB_PREFIX),$(addsuffix .$(LIB_SUFFIX),$(SDK_LIBS))) \
$(addprefix $(DIST)/bin/$(DLL_PREFIX),$(addsuffix $(DLL_SUFFIX),$(NSS_DLLS))) \
diff --git a/config/system-headers b/config/system-headers
index 683c9d337..b4f901792 100644
--- a/config/system-headers
+++ b/config/system-headers
@@ -1,3 +1,4 @@
+atomic.h
nspr.h
plarena.h
plarenas.h