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.15-x32.patch

49 lines
1.3 KiB

https://bugzilla.mozilla.org/show_bug.cgi?id=966596
--- nss-3.15/nss/coreconf/Linux.mk
+++ nss-3.15/nss/coreconf/Linux.mk
@@ -55,11 +55,18 @@
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
--- nss-3.15/nss/lib/freebl/Makefile
+++ nss-3.15/nss/lib/freebl/Makefile
@@ -193,12 +193,16 @@
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