Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0502MB388578F799B59B5C5FB38D39E7330@VI1PR0502MB3885.eurprd05.prod.outlook.com>
Date: Thu, 7 Dec 2017 15:55:52 +0000
From: Nicholas Wilson <nicholas.wilson@...lvnc.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: [PATCH] Remove possibly unused lines from Makefile

Hi,

There are a couple of lines I've had to hack out of the Makefile to get Wasm to build. In WebAssembly, we can't use crti.s/crtn.s, because the compiler doesn't support raw assembly chunks like that.

That should be OK, since there are default empty files in "crt/{crti,crtn}.c". Those empty files are currently unused, as all archs provide the assembly versions. For WebAssembly, I'm happy for those empty C files to be used.

There's some clever stuff at the top of the Makefile to construct BASE_SRCS and ARCH_SRCS, and it works fine for WebAssembly: we just compile the dummy .c files if the .s files aren't provided by the arch.

The problem is further down the Makefile, where an apparently unnecessary dependency is placed on the assembly files. I can't work out why these two lines are there, and they need to be removed in one way or another for the Wasm build to succeed. Getting rid of them doesn't seem to have any negative consequences for the standard x86 build.

Patch below.

Thanks,
Nick

============
diff --git a/Makefile b/Makefile
index d2e89979..308ddaae 100644
--- a/Makefile
+++ b/Makefile
@@ -113,10 +113,6 @@ obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart.c
 
 obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC
 
-obj/crt/$(ARCH)/crti.o: $(srcdir)/crt/$(ARCH)/crti.s
-
-obj/crt/$(ARCH)/crtn.o: $(srcdir)/crt/$(ARCH)/crtn.s
-
 OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%))
 $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3
 

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.