diff options
Diffstat (limited to 'dev-libs/libgrapheme/files/libgrapheme-1-make.patch')
-rw-r--r-- | dev-libs/libgrapheme/files/libgrapheme-1-make.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-libs/libgrapheme/files/libgrapheme-1-make.patch b/dev-libs/libgrapheme/files/libgrapheme-1-make.patch new file mode 100644 index 000000000000..363df6cfb51e --- /dev/null +++ b/dev-libs/libgrapheme/files/libgrapheme-1-make.patch @@ -0,0 +1,32 @@ +Adjust config.mk variables, fix cross-compilation, and don't run ldconfig. +--- a/Makefile ++++ b/Makefile +@@ -68,3 +68,6 @@ + $(GEN): +- $(CC) -o $@ $(LDFLAGS) $@.o gen/util.o ++ $(BUILD_CC) -o $@ $(BUILD_LDFLAGS) $@.o gen/util.o ++ ++gen/%.o: ++ $(BUILD_CC) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< + +@@ -84,3 +87,3 @@ + libgrapheme.so: $(SRC:=.o) +- $(CC) -o $@ -shared $? ++ $(CC) -o $@ -shared $(LDFLAGS) $? + +@@ -99,3 +102,2 @@ + cp -f grapheme.h "$(DESTDIR)$(INCPREFIX)" +- ldconfig || true + +--- a/config.mk ++++ b/config.mk +@@ -13,8 +13,4 @@ + CPPFLAGS = -D_DEFAULT_SOURCE +-CFLAGS = -std=c99 -Os -fPIC -Wall -Wextra -Wpedantic +-LDFLAGS = -s ++CFLAGS := -std=c99 -fPIC -Wall -Wextra -Wpedantic $(CFLAGS) + + # tools +-CC = cc +-AR = ar +-RANLIB = ranlib |