lua-bcrypt

Secure password hashing for Lua
Log | Files | Refs

commit 2922c1ac7403f9900042b80403949219576f5514
parent ff15043cc98b6557916c5dcce37f0342aa288254
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat, 27 Dec 2014 08:56:56 +0000

Compile compat/safebfuns.c with -O0

Only very recent versions of clang support `optnone`, so this is the
best we can do until we can assume everyone has updated. See #6

Diffstat:
Makefile | 4++--
Makefile.mess | 3+++
compat/safebfuns.c | 2+-
3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,3 +1,5 @@ +all: bcrypt.so + include Makefile.mess SRCS += src/main.c @@ -7,8 +9,6 @@ CFLAGS += -O2 -fPIC -DNDEBUG OBJS := $(patsubst %.c,%.o,$(SRCS)) -all: bcrypt.so - debug: CFLAGS += -ggdb3 -UNDEBUG debug: all diff --git a/Makefile.mess b/Makefile.mess @@ -42,3 +42,6 @@ endif ifeq ($(uname),FreeBSD) SRCS += compat/getentropy/getentropy_freebsd.c endif + +compat/safebfuns.o: compat/safebfuns.c + $(CC) $(CFLAGS) -O0 -c -o $@ $^ diff --git a/compat/safebfuns.c b/compat/safebfuns.c @@ -8,7 +8,7 @@ * http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-December/040627.html */ #if __has_attribute( noinline ) && __has_attribute( optnone ) - #define NOOPT __attribute__ (( optnone )) + #define NOOPT /* __attribute__ (( optnone )) */ #define NOINLINE __attribute__ (( noinline )) #else #error "require clang with noinline and optnone attributes"