fix out-of-tree build of crt files with stack protector enabled
authorRich Felker <dalias@aerifal.cx>
Sat, 24 Mar 2018 16:15:43 +0000 (12:15 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 24 Mar 2018 16:15:43 +0000 (12:15 -0400)
the makefile logic for these files was wrong in the out-of-tree case,
but it likely only affected the "all" level of stack protector.

Makefile

index 308ddaae582e443167ef87f687e48c26d1eb6fe1..46fc91ec913d13081bc1239476b93d2e24235b82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -119,7 +119,7 @@ $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo):
 MEMOPS_SRCS = src/string/memcpy.c src/string/memmove.c src/string/memcmp.c src/string/memset.c
 $(MEMOPS_SRCS:%.c=obj/%.o) $(MEMOPS_SRCS:%.c=obj/%.lo): CFLAGS_ALL += $(CFLAGS_MEMOPS)
 
-NOSSP_SRCS = $(wildcard crt/*.c) \
+NOSSP_SRCS = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/crt/*.c)) \
        src/env/__libc_start_main.c src/env/__init_tls.c \
        src/env/__stack_chk_fail.c \
        src/thread/__set_thread_area.c src/thread/$(ARCH)/__set_thread_area.c \