You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/nss/files/nss-3.14.2-x32.patch

67 lines
1.9 KiB

--- nss-3.14.2/mozilla/security/coreconf/Linux.mk
+++ nss-3.14.2/mozilla/security/coreconf/Linux.mk
@@ -50,21 +50,28 @@
else
ifeq ($(OS_TEST),alpha)
OS_REL_CFLAGS = -D_ALPHA_
CPU_ARCH = alpha
else
ifeq ($(OS_TEST),x86_64)
ifeq ($(USE_64),1)
CPU_ARCH = x86_64
+ ARCHFLAG = -m64
+else
+ifeq ($(USE_x32),1)
+ OS_REL_CFLAGS = -Di386
+ CPU_ARCH = x86
+ ARCHFLAG = -mx32
else
OS_REL_CFLAGS = -Di386
CPU_ARCH = x86
ARCHFLAG = -m32
endif
+endif
else
ifeq ($(OS_TEST),sparc64)
CPU_ARCH = sparc
else
ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
CPU_ARCH = arm
else
ifeq (,$(filter-out parisc%,$(OS_TEST)))
--- nss-3.14.2/mozilla/security/nss/lib/freebl/Makefile
+++ nss-3.14.2/mozilla/security/nss/lib/freebl/Makefile
@@ -188,22 +188,26 @@
# comment the next two lines to turn off intel HW accelleration
DEFINES += -DUSE_HW_AES
ASFILES += intel-aes.s intel-gcm.s
EXTRA_SRCS += intel-gcm-wrap.c
INTEL_GCM = 1
MPI_SRCS += mpi_amd64.c mp_comba.c
endif
ifeq ($(CPU_ARCH),x86)
- ASFILES = mpi_x86.s
- DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
- DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
- DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
- # The floating point ECC code doesn't work on Linux x86 (bug 311432).
- #ECL_USE_FP = 1
+ ifeq ($(USE_x32),1)
+ DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
+ else
+ ASFILES = mpi_x86.s
+ DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
+ DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
+ DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
+ # The floating point ECC code doesn't work on Linux x86 (bug 311432).
+ #ECL_USE_FP = 1
+ endif
endif
ifeq ($(CPU_ARCH),arm)
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
DEFINES += -DMP_USE_UINT_DIGIT
DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
MPI_SRCS += mpi_arm.c
endif
endif # Linux