pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/argon2 argon2: don't test if opt.c can build ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/37ed1750d952
branches:  trunk
changeset: 396257:37ed1750d952
user:      maya <maya%pkgsrc.org@localhost>
date:      Mon May 27 01:17:21 2019 +0000

description:
argon2: don't test if opt.c can build with -march=native.

Avoid a situation where a build host can use SSE2, but opt.c is then
compiled without SSE2 support (which fails).

Also check for CFLAGS for this compile test while here.

amend comment: we avoid -march=native not because of netbsd, but because
it results in shiny package builders creating packages not usable by
some users with older machines.

PR pkg/54238: security/argon2 build fails on i386-current (8.99.41)

diffstat:

 security/argon2/distinfo               |   4 ++--
 security/argon2/patches/patch-Makefile |  18 ++++++++++++++----
 2 files changed, 16 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 6ad8a8bf234e -r 37ed1750d952 security/argon2/distinfo
--- a/security/argon2/distinfo  Sun May 26 20:25:25 2019 +0000
+++ b/security/argon2/distinfo  Mon May 27 01:17:21 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.4 2018/01/10 09:36:54 adam Exp $
+$NetBSD: distinfo,v 1.5 2019/05/27 01:17:21 maya Exp $
 
 SHA1 (phc-winner-argon2-20171227.tar.gz) = c398df55c8fffe70c9a952dd3f696115437234d8
 RMD160 (phc-winner-argon2-20171227.tar.gz) = e4cf2482f11724f580da0051a8c982f9237d3451
 SHA512 (phc-winner-argon2-20171227.tar.gz) = 9c9e1a3905e61ac6913d1e073c104477e419ddd0506adc4487e88e98d19165ed8901fe8bb11246ed0cc71b3523c190da9692d5926642f86be09c3e67510afe4d
 Size (phc-winner-argon2-20171227.tar.gz) = 1503745 bytes
-SHA1 (patch-Makefile) = d075b01a8452d7d7beac22b72521662ad8527b10
+SHA1 (patch-Makefile) = d3efbe77767a174cbc27d6e9b255e774afbebb2b
diff -r 6ad8a8bf234e -r 37ed1750d952 security/argon2/patches/patch-Makefile
--- a/security/argon2/patches/patch-Makefile    Sun May 26 20:25:25 2019 +0000
+++ b/security/argon2/patches/patch-Makefile    Mon May 27 01:17:21 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-Makefile,v 1.4 2018/01/10 09:36:54 adam Exp $
+$NetBSD: patch-Makefile,v 1.5 2019/05/27 01:17:21 maya Exp $
 
 Remove -O3 -g compiler flags.
 Disable -march=native since it causes problems on NetBSD.
@@ -15,7 +15,17 @@
  
  ifeq ($(NO_THREADS), 1)
  CFLAGS += -DARGON2_NO_THREADS
-@@ -50,7 +50,6 @@ $(info Building without optimizations)
+@@ -41,8 +41,7 @@ endif
+ CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
+                               -Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
+ 
+-OPTTARGET ?= native
+-OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
++OPTTEST := $(shell $(CC) $(CFLAGS) -Iinclude -Isrc src/opt.c -c \
+                       -o /dev/null 2>/dev/null; echo $$?)
+ # Detect compatible platform
+ ifneq ($(OPTTEST), 0)
+@@ -50,7 +49,6 @@ $(info Building without optimizations)
        SRC += src/ref.c
  else
  $(info Building with optimizations for $(OPTTARGET))
@@ -23,7 +33,7 @@
        SRC += src/opt.c
  endif
  
-@@ -59,7 +58,7 @@ KERNEL_NAME := $(shell uname -s)
+@@ -59,7 +57,7 @@ KERNEL_NAME := $(shell uname -s)
  
  LIB_NAME=argon2
  ifeq ($(KERNEL_NAME), Linux)
@@ -32,7 +42,7 @@
        LIB_CFLAGS := -shared -fPIC -fvisibility=hidden -DA2_VISCTL=1
        SO_LDFLAGS := -Wl,-soname,lib$(LIB_NAME).$(LIB_EXT)
        LINKED_LIB_EXT := so
-@@ -69,8 +68,8 @@ ifeq ($(KERNEL_NAME), $(filter $(KERNEL_
+@@ -69,8 +67,8 @@ ifeq ($(KERNEL_NAME), $(filter $(KERNEL_
        LIB_CFLAGS := -shared -fPIC
  endif
  ifeq ($(KERNEL_NAME), Darwin)



Home | Main Index | Thread Index | Old Index