diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2020-08-25 23:58:43 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2020-08-25 23:59:29 +0200 |
commit | 5af3499dd3953c3496c0df4543001e7fde9f58e0 (patch) | |
tree | 13ffe4b1122c7e99267ede729272c026fd7e24fa /app-benchmarks/wrk | |
parent | games-fps/duke3d-demodata: update SRC_URI (diff) | |
download | gentoo-5af3499dd3953c3496c0df4543001e7fde9f58e0.tar.gz gentoo-5af3499dd3953c3496c0df4543001e7fde9f58e0.tar.bz2 gentoo-5af3499dd3953c3496c0df4543001e7fde9f58e0.zip |
app-benchmarks/wrk: fix compilation with clang
Closes: https://bugs.gentoo.org/732892
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-benchmarks/wrk')
-rw-r--r-- | app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch | 37 | ||||
-rw-r--r-- | app-benchmarks/wrk/files/wrk-4.1.0-r2-makefile.patch | 63 | ||||
-rw-r--r-- | app-benchmarks/wrk/wrk-4.1.0-r2.ebuild | 11 |
3 files changed, 66 insertions, 45 deletions
diff --git a/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch b/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch deleted file mode 100644 index 6e7dd317b8fb..000000000000 --- a/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/Makefile 2018-01-21 07:00:58.000000000 +0100 -+++ b/Makefile 2018-11-09 11:58:57.000000000 +0100 -@@ -1,4 +1,4 @@ --CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT -+CFLAGS += -std=c99 -Wall -D_REENTRANT - LIBS := -lpthread -lm -lssl -lcrypto - - TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown) -@@ -24,7 +24,7 @@ - - ODIR := obj - OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o $(ODIR)/version.o --LIBS := -lluajit-5.1 $(LIBS) -+LIBS := $(shell pkg-config luajit --libs) $(LIBS) - - DEPS := - CFLAGS += -I$(ODIR)/include -@@ -51,8 +51,7 @@ - $(RM) -rf $(BIN) obj/* - - $(BIN): $(OBJ) -- @echo LINK $(BIN) -- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - - $(OBJ): config.h Makefile $(DEPS) | $(ODIR) - -@@ -67,8 +66,7 @@ - @echo 'const char *VERSION="$(VER)";' | $(CC) -xc -c -o $@ - - - $(ODIR)/%.o : %.c -- @echo CC $< -- @$(CC) $(CFLAGS) -c -o $@ $< -+ $(CC) $(CFLAGS) -c -o $@ $< - - # Dependencies - diff --git a/app-benchmarks/wrk/files/wrk-4.1.0-r2-makefile.patch b/app-benchmarks/wrk/files/wrk-4.1.0-r2-makefile.patch new file mode 100644 index 000000000000..85de3eaf3c3e --- /dev/null +++ b/app-benchmarks/wrk/files/wrk-4.1.0-r2-makefile.patch @@ -0,0 +1,63 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ +-CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT +-LIBS := -lpthread -lm -lssl -lcrypto ++CFLAGS += -std=c99 -Wall -D_REENTRANT ++LIBS := -lm -lssl -lcrypto -lpthread + + TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown) + +@@ -24,15 +24,13 @@ + + ODIR := obj + OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o $(ODIR)/version.o +-LIBS := -lluajit-5.1 $(LIBS) ++LIBS := $(shell pkg-config luajit --libs) $(LIBS) + + DEPS := + CFLAGS += -I$(ODIR)/include +-LDFLAGS += -L$(ODIR)/lib + + ifneq ($(WITH_LUAJIT),) + CFLAGS += -I$(WITH_LUAJIT)/include +- LDFLAGS += -L$(WITH_LUAJIT)/lib + else + CFLAGS += -I$(ODIR)/include/luajit-2.1 + DEPS += $(ODIR)/lib/libluajit-5.1.a +@@ -40,7 +38,6 @@ + + ifneq ($(WITH_OPENSSL),) + CFLAGS += -I$(WITH_OPENSSL)/include +- LDFLAGS += -L$(WITH_OPENSSL)/lib + else + DEPS += $(ODIR)/lib/libssl.a + endif +@@ -51,15 +48,14 @@ + $(RM) -rf $(BIN) obj/* + + $(BIN): $(OBJ) +- @echo LINK $(BIN) +- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + $(OBJ): config.h Makefile $(DEPS) | $(ODIR) + + $(ODIR): + @mkdir -p $@ + +-$(ODIR)/bytecode.o: src/wrk.lua ++$(ODIR)/bytecode.c: src/wrk.lua + @echo LUAJIT $< + @$(SHELL) -c 'PATH=obj/bin:$(PATH) luajit -b $(CURDIR)/$< $(CURDIR)/$@' + +@@ -67,8 +63,7 @@ + @echo 'const char *VERSION="$(VER)";' | $(CC) -xc -c -o $@ - + + $(ODIR)/%.o : %.c +- @echo CC $< +- @$(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS) -c -o $@ $< + + # Dependencies + diff --git a/app-benchmarks/wrk/wrk-4.1.0-r2.ebuild b/app-benchmarks/wrk/wrk-4.1.0-r2.ebuild index 23ba20045cbb..34bc8be4849a 100644 --- a/app-benchmarks/wrk/wrk-4.1.0-r2.ebuild +++ b/app-benchmarks/wrk/wrk-4.1.0-r2.ebuild @@ -32,14 +32,9 @@ BDEPEND=" virtual/pkgconfig " -DOCS=( - "CHANGES" - "NOTICE" - "README.md" - "SCRIPTING" -) - -PATCHES=( "${FILESDIR}/${P}-r1-makefile.patch" ) +DOCS=( "CHANGES" "NOTICE" "README.md" "SCRIPTING" ) + +PATCHES=( "${FILESDIR}/${P}-r2-makefile.patch" ) src_compile() { myemakeargs=( |