From 5f374c1fe85a1da95c15a5cac217f8ab762ce6dd Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 31 Mar 2015 22:44:12 +0200 Subject: buildsys: Fix setting LIBGCC We were ending up with multiple entries in LIBGCC for recursive child make instances, avoid that. Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index ea254f1a2..cf0c5bc8b 100644 --- a/Rules.mak +++ b/Rules.mak @@ -807,12 +807,12 @@ endif ASFLAGS += $(ASFLAG_--noexecstack) LIBGCC_CFLAGS ?= $(CFLAGS) $(CPU_CFLAGS-y) -$(eval $(call cache-output-var,LIBGCC,$(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)) +$(eval $(call cache-output-var,LIBGCC_A,$(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)) $(eval $(call cache-output-var,LIBGCC_EH,$(CC) $(LIBGCC_CFLAGS) -print-file-name=libgcc_eh.a)) # with -O0 we (e.g. lockf) might end up with references to # _Unwind_Resume, so pull in gcc_eh in this case.. -LIBGCC_DIR:=$(dir $(LIBGCC)) -LIBGCC += $(if $(DODEBUG),$(LIBGCC_EH)) +LIBGCC_DIR := $(dir $(LIBGCC_A)) +LIBGCC := $(LIBGCC_A) $(if $(DODEBUG),$(LIBGCC_EH)) # moved from libpthread/linuxthreads ifeq ($(UCLIBC_CTOR_DTOR),y) -- cgit v1.2.3 From e51d746b4b9ed54ddeed48d9e65ffd0811298c49 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 31 Mar 2015 22:44:19 +0200 Subject: buildsys: tweak ucontext_i.h prerequisites ucontext_i.h too depends on uClibc_config.h. Update it to look like the other MANGLE generated files and tweak prereqs Fixes: make realclean ; make -j libc/misc/internals/__uClibc_main.i Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index cf0c5bc8b..c68153e36 100644 --- a/Rules.mak +++ b/Rules.mak @@ -168,7 +168,8 @@ libpthread.depend := $(top_builddir)lib/libpthread.so endif interp := $(top_builddir)lib/interp.os ldso := $(top_builddir)lib/$(UCLIBC_LDSO) -headers_dep := $(top_builddir)include/bits/sysnum.h +headers_dep := $(top_builddir)include/bits/sysnum.h \ + $(top_builddir)include/bits/uClibc_config.h sub_headers := $(headers_dep) #LIBS :=$(interp) -L$(top_builddir)lib -lc -- cgit v1.2.3 From f820f4ce071ae0985d84e09ea74dc42d55081e86 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 14 Apr 2015 23:58:41 +0200 Subject: buildsys: pass -O to ld unless DODEBUG Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index c68153e36..83d78ff28 100644 --- a/Rules.mak +++ b/Rules.mak @@ -687,14 +687,18 @@ LDFLAGS_NOSTRIP += $(CFLAG_-Wl--hash-style=gnu) endif endif -LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs ifeq ($(DODEBUG),y) CFLAGS += -O0 -g3 -DDEBUG else CFLAGS += $(OPTIMIZATION) CFLAGS += $(OPTIMIZATION-$(GCC_MAJOR_VER)) CFLAGS += $(OPTIMIZATION-$(GCC_MAJOR_VER).$(GCC_MINOR_VER)) +$(eval $(call check-ld-var,-O2)) +LDFLAGS_NOSTRIP += $(CFLAG_-Wl-O2) endif + +LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs + ifeq ($(DOSTRIP),y) LDFLAGS += -Wl,-s else -- cgit v1.2.3 From 1df50b08dfe4133d306156483a224f5a478f7dff Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 14 Apr 2015 23:58:41 +0200 Subject: prelink: handle _begin in a gold-agnostic way The nostartfiles is redundant but better be safe Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 1 + 1 file changed, 1 insertion(+) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index 83d78ff28..71ceb9022 100644 --- a/Rules.mak +++ b/Rules.mak @@ -255,6 +255,7 @@ ARFLAGS:=cr # Note: The check for -nostdlib has to be before all calls to check_ld $(eval $(call check-gcc-var,-nostdlib)) +$(eval $(call check-gcc-var,-nostartfiles)) # deliberately not named CFLAG-fuse-ld since unchecked and from user LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(call qstrip,$(UCLIBC_EXTRA_CFLAGS))) # failed to merge target specific data of file /dev/null -- cgit v1.2.3