summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/Makefile4
-rw-r--r--libc/unistd/Makefile10
2 files changed, 9 insertions, 5 deletions
diff --git a/libc/Makefile b/libc/Makefile
index 295386c2b..c8587b58d 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -44,12 +44,14 @@ shared: $(TOPDIR)lib/$(LIBNAME)
@rm -rf tmp
@mkdir tmp
@(cd tmp && CC=$(CC) LD=$(LD) NM=$(NM) AR=$(AR) /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh)
- if [ -s ./tmp/libgcc-need.a ] ; then \
+ @if [ -s ./tmp/libgcc-need.a ] ; then \
+ set -e -x; \
$(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
-Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
./$(LIBNAME) ./tmp/libgcc-need.a \
$(LDSO) -Wl,--dynamic-linker,$(DYNAMIC_LINKER); \
else \
+ set -e -x; \
$(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
-Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
./$(LIBNAME) $(LDSO) -Wl,-dynamic-linker,$(DYNAMIC_LINKER); \
diff --git a/libc/unistd/Makefile b/libc/unistd/Makefile
index be002c64c..c325eae3a 100644
--- a/libc/unistd/Makefile
+++ b/libc/unistd/Makefile
@@ -71,13 +71,15 @@ sysconf_tester.o: sysconf.c
gen_sysconf_tester.o: sysconf_tester.o getpagesize_tester.o
@ld -r -o gen_sysconf_tester.o sysconf_tester.o getpagesize_tester.o
- @if nm -s gen_sysconf_tester.o | grep -v "U errno" | grep " U " ;\
- then \
+ @if [ nm -s gen_sysconf_tester.o | grep -v "U errno" | grep " U " ] ; then \
+ set -e -x; \
echo warning: missing symbols in gen_sysconf_tester.o so using generic sysconf.c ;\
cp -f sysconf.c sysconf_src.c ;\
else \
- if ../extra/gcc-uClibc/gcc-uClibc-$(NATIVE_ARCH) -static -D_UCLIBC_GENERATE_SYSCONF_MAIN sysconf.c sysconf_tester.o -o gen_sysconf && \
- ./gen_sysconf > sysconf_$(NATIVE_ARCH).c ;\
+ set -e -x; \
+ if ../extra/gcc-uClibc/gcc-uClibc-$(NATIVE_ARCH) -static \
+ -D_UCLIBC_GENERATE_SYSCONF_MAIN sysconf.c sysconf_tester.o \
+ -o gen_sysconf && ./gen_sysconf > sysconf_$(NATIVE_ARCH).c ;\
then \
echo successfully built sysconf_$(NATIVE_ARCH).c ;\
else \