diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-28 23:12:43 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-28 23:12:43 +0000 |
commit | 317964651ced8ba016841cfe015e3ae09831b5c8 (patch) | |
tree | 58f802dc02af2e2ac8a1cbc35a0a094313629843 | |
parent | 3bbb872db24d775c326126378821d36aefb42251 (diff) |
Partially revent "make utils" fix. This version is less intrusive,
but still works! :)
-rw-r--r-- | Makerules | 4 | ||||
-rw-r--r-- | utils/Makefile.in | 67 |
2 files changed, 17 insertions, 54 deletions
@@ -190,9 +190,7 @@ cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) \ $(CFLAGS_gen.dep) cmd_compile.i = $(cmd_compile.c:-c=-E -dD $(EXTRA_CPPFLAGS)) cmd_compile.s = $(cmd_compile.c:-c=-S) -#vda -###_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep) -cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep) +cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep) cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@)) cmd_compile.mi= $(cmd_compile.m:-c=-E -dD $(EXTRA_CPPFLAGS)) diff --git a/utils/Makefile.in b/utils/Makefile.in index f9a30af7d..8023a2843 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -4,12 +4,15 @@ # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # "make utils" flags -# ldconfig,ldd,readelf had also: -# -Wl,-rpath,/lib -# -Wl,--dynamic-linker,/lib/ld-uClibc.so.0 -# -Wl,--hash-style=gnu +CFLAGS-utils := \ + $(SSP_ALL_CFLAGS) \ + -I$(top_srcdir)/$(KERNEL_HEADERS) \ + -DNOT_IN_libc \ + -B$(top_builddir)lib \ + -Wl,-rpath-link,$(top_builddir)lib ifeq ($(UCLIBC_BUILD_PIE),y) CFLAGS-utils-shared := $(PIEFLAG) $(LDPIEFLAG) @@ -24,53 +27,23 @@ CFLAGS-ldconfig := \ ifeq ($(UCLIBC_STATIC_LDCONFIG),y) CFLAGS-ldconfig += -static else -CFLAGS-ldconfig += \ - $(CFLAGS-utils-shared) \ - -Wl,-rpath-link,$(top_builddir)lib +CFLAGS-ldconfig += $(CFLAGS-utils-shared) endif -# Can't just pull in $(CFLAGS), there are bad include paths. -# We want to use "sanitized" headers in LOCAL_INSTALL_PATH. -CFLAGS-ldconfig += \ - $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) $(OPTIMIZATION) \ - -nostdinc \ - -I $(top_builddir)/$(LOCAL_INSTALL_PATH)/usr/include \ - $(CC_INC) \ - -B$(top_builddir)lib \ CFLAGS-ldd := \ - $(CFLAGS-utils-shared) \ - $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) $(OPTIMIZATION) \ - -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=$(UCLIBC_LDSO) \ - -nostdinc \ -I$(top_srcdir)ldso/include \ - -I$(top_builddir)/$(LOCAL_INSTALL_PATH)/usr/include \ - $(CC_INC) \ - -B$(top_builddir)lib \ - -Wl,-rpath-link,$(top_builddir)lib \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ + -DUCLIBC_LDSO=$(UCLIBC_LDSO) \ + $(CFLAGS-utils-shared) -CFLAGS-readelf := \ - $(CFLAGS-utils-shared) \ - $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) $(OPTIMIZATION) \ - -nostdinc \ - -I $(top_builddir)/$(LOCAL_INSTALL_PATH)/usr/include \ - $(CC_INC) \ - -B$(top_builddir)lib \ - -Wl,-rpath-link,$(top_builddir)lib \ +CFLAGS-readelf := $(CFLAGS-utils-shared) -# iconv and locale use non-sanitized headers by just pulling in $(CFLAGS) -CFLAGS-iconv := \ - $(CFLAGS) $(CFLAGS-utils-shared) \ - -DNOT_IN_libc \ +# Need CFLAGS-utils explicitly, because the source file is not located in utils +CFLAGS-iconv := $(CFLAGS-utils) \ + $(CFLAGS-utils-shared) \ -DL_iconv_main \ - -I$(top_srcdir)/$(KERNEL_HEADERS) \ - -B$(top_builddir)lib \ - -Wl,-rpath-link,$(top_builddir)lib \ -CFLAGS-locale := \ - $(CFLAGS) $(CFLAGS-utils-shared) \ - -DNOT_IN_libc \ - -B$(top_builddir)lib \ - -Wl,-rpath-link,$(top_builddir)lib \ +CFLAGS-locale := $(CFLAGS-utils) # "make hostutils" flags @@ -134,14 +107,6 @@ $(utils_OUT)/iconv: $(top_srcdir)libc/misc/wchar/wchar.c | $(libc) $(utils_OUT)/locale: $(top_srcdir)extra/locale/programs/locale.c | $(libc) $(compile.u) -# Instruct make to install uclibc locally before buiding target utils -$(utils_OBJ): | $(top_builddir)/$(LOCAL_INSTALL_PATH) -$(utils_OUT)/iconv: | $(top_builddir)/$(LOCAL_INSTALL_PATH) -$(utils_OUT)/locale: | $(top_builddir)/$(LOCAL_INSTALL_PATH) - -$(top_builddir)/$(LOCAL_INSTALL_PATH): - $(Q)$(MAKE) -C $(top_builddir) $(LOCAL_INSTALL_PATH) - hostutils: $(hostutils_OBJ) $(hostutils_OBJ): $(utils_OUT)/%.host : $(utils_DIR)/%.c |