Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Jun 2020 20:22:23 +0300
From: Yuval Deutscher <yuval.d@...tsilicon.com>
To: musl@...ts.openwall.com
Cc: Yuval Deutscher <yuval.d@...tsilicon.com>
Subject: [PATCH] build: allow forcing generic implementations of library functions

This change allows excluding chosen functions from ARCH_OBJS thus
causing the library to be built with non-platform-specific versions of
them. The option can be used by setting the FORCE_GENERIC variable when
invoking make.

Signed-off-by: Yuval Deutscher <yuval.d@...tsilicon.com>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index bd8f5c38..c6e5a386 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,8 @@ ARCH_GLOBS = $(addsuffix /$(ARCH)/*.[csS],$(SRC_DIRS))
 BASE_SRCS = $(sort $(wildcard $(BASE_GLOBS)))
 ARCH_SRCS = $(sort $(wildcard $(ARCH_GLOBS)))
 BASE_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(BASE_SRCS)))
-ARCH_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(ARCH_SRCS)))
+ALL_ARCH_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(ARCH_SRCS)))
+ARCH_OBJS = $(filter-out $(addprefix %/,$(addsuffix .o,$(FORCE_GENERIC))), $(ALL_ARCH_OBJS))
 REPLACED_OBJS = $(sort $(subst /$(ARCH)/,/,$(ARCH_OBJS)))
 ALL_OBJS = $(addprefix obj/, $(filter-out $(REPLACED_OBJS), $(sort $(BASE_OBJS) $(ARCH_OBJS))))
 
-- 
2.25.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.