Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.

CC = gcc
CC = cc
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: I did not guard this. Problem?

LD = $(CC)
RM = rm -f
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
OMPFLAGS = -Xpreprocessor -fopenmp -I$(shell brew --prefix libomp)/include
OMPFLAGS_MAYBE = $(OMPFLAGS)
CFLAGS = -Wall -O2 -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
LDFLAGS = -L$(shell brew --prefix libomp)/lib -lomp $(OMPFLAGS_MAYBE)
else
OMPFLAGS = -fopenmp
OMPFLAGS_MAYBE = $(OMPFLAGS)
#CFLAGS = -Wall -O2 -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
CFLAGS = -Wall -O2 -march=native -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
#CFLAGS = -Wall -O2 -funroll-loops -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
#CFLAGS = -Wall -O2 -march=native -funroll-loops -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
# -lrt is for userom's use of clock_gettime()
LDFLAGS = -s -lrt $(OMPFLAGS_MAYBE)
endif

PROJ = tests phc-test initrom userom
OBJS_CORE = yescrypt-opt.o
Expand Down
2 changes: 2 additions & 0 deletions userom.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ int main(int argc, const char * const *argv)

unsigned long long count1 = count, count_restart = 0;

#ifndef __APPLE__
if (!geteuid()) {
puts("Running as root, so trying to set SCHED_RR");
#pragma omp parallel
Expand All @@ -306,6 +307,7 @@ int main(int argc, const char * const *argv)
perror("sched_setscheduler");
}
}
#endif

start = times(&start_tms);

Expand Down
Loading