summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2013-01-30 19:52:20 +0000
committerwtc%google.com <devnull@localhost>2013-01-30 19:52:20 +0000
commit6e351ce7c798b27a3bac2ca9fd3335236f3dfe38 (patch)
treeb5d0128ec910c6c17b20d864a24538e96c0f428d
parent3e273eada9a71da1a96b929f02632c65c21bc90d (diff)
downloadnss-hg-6e351ce7c798b27a3bac2ca9fd3335236f3dfe38.tar.gz
Bug 805604: use target-specific variable values to add an extra compiler or
assembler flag to just one source file. r=kaie.
-rw-r--r--security/nss/lib/freebl/Makefile33
1 files changed, 14 insertions, 19 deletions
diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile
index 9d64b2abe..7f9adac0f 100644
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -188,16 +188,8 @@ ifeq ($(CPU_ARCH),x86_64)
# comment the next two lines to turn off intel HW accelleration
DEFINES += -DUSE_HW_AES
ASFILES += intel-aes.s intel-gcm.s
- # The integrated assembler in Clang 3.0 does not support % in the
- # expression of a .set directive. intel-gcm.s uses .set to give
- # symbolic names to registers, for example,
- # .set Htbl, %rdi
- # So we can't use Clang's integrated assembler with intel-gcm.s.
- ifneq (,$(findstring clang,$(AS)))
- ASFLAGS += -no-integrated-as
- endif
- EXTRA_SRCS += intel-gcm-wrap.c
- INTEL_GCM=1
+ EXTRA_SRCS += intel-gcm-wrap.c
+ INTEL_GCM = 1
MPI_SRCS += mpi_amd64.c mp_comba.c
endif
ifeq ($(CPU_ARCH),x86)
@@ -453,8 +445,8 @@ else
# 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
+ EXTRA_SRCS += intel-gcm-wrap.c
+ INTEL_GCM = 1
MPI_SRCS += mpi_amd64.c
else
# Solaris x86
@@ -658,13 +650,16 @@ endif
ifdef INTEL_GCM
#
-# GCM binary needs -msse4
+# GCM binary needs -mssse3
#
-$(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(OBJ_SUFFIX): intel-gcm-wrap.c
- @$(MAKE_OBJDIR)
-ifdef NEED_ABSOLUTE_PATH
- $(CC) -o $@ -c -mssse3 $(CFLAGS) $(call core_abspath,$<)
-else
- $(CC) -o $@ -c -mssse3 $(CFLAGS) $<
+$(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(OBJ_SUFFIX): CFLAGS += -mssse3
+
+# The integrated assembler in Clang 3.2 does not support % in the
+# expression of a .set directive. intel-gcm.s uses .set to give
+# symbolic names to registers, for example,
+# .set Htbl, %rdi
+# So we can't use Clang's integrated assembler with intel-gcm.s.
+ifneq (,$(findstring clang,$(AS)))
+$(OBJDIR)/$(PROG_PREFIX)intel-gcm$(OBJ_SUFFIX): ASFLAGS += -no-integrated-as
endif
endif