OSDN Git Service

docs: restore crt from old svn tree
[uclinux-h8/uClibc.git] / Rules.mak
index 032193e..00e8481 100644 (file)
--- a/Rules.mak
+++ b/Rules.mak
@@ -104,8 +104,8 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR
 # Now config hard core
 MAJOR_VERSION := 0
 MINOR_VERSION := 9
-SUBLEVEL      := 33
-EXTRAVERSION  :=-rc1-git
+SUBLEVEL      := 34
+EXTRAVERSION  :=-git
 VERSION       := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
 ABI_VERSION   := $(MAJOR_VERSION)
 ifneq ($(EXTRAVERSION),)
@@ -158,7 +158,7 @@ endif
 comma:=,
 space:= #
 
-ifndef CROSS_COMPILE
+ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE=$(call qstrip,$(CROSS_COMPILER_PREFIX))
 endif
 
@@ -176,7 +176,7 @@ check_ld=$(shell \
 # Use variable indirection here so that we can have variable
 # names with fun chars in them like equal signs
 define check-tool-var
-ifeq ($(filter clean CLEAN_%,$(MAKECMDGOALS)),)
+ifeq ($(filter $(clean_targets) CLEAN_%,$(MAKECMDGOALS)),)
 _v = $(2)_$(3)
 ifndef $$(_v)
 $$(_v) := $$(call $(1),$(subst %, ,$(3)))
@@ -197,7 +197,8 @@ endef
 # as well CFLAG_-Wa<flag> (for invoking the compiler driver).
 define check-as-var
 $(call check-tool-var,check_as,ASFLAG,$(1))
-export CFLAG_-Wa$(1) = $$(if $$(ASFLAG_$(1)),-Wa$(comma)$$(ASFLAG_$(1)))
+_v = CFLAG_-Wa$(1)
+export $$(_v) = $$(if $$(ASFLAG_$(1)),-Wa$$(comma)$$(ASFLAG_$(1)))
 endef
 # Usage: check-ld-var,<flag>
 # Check the linker to see if it supports <flag>.  Export the
@@ -205,7 +206,8 @@ endef
 # as well CFLAG_-Wl<flag> (for invoking the compiler driver).
 define check-ld-var
 $(call check-tool-var,check_ld,LDFLAG,$(1))
-export CFLAG_-Wl$(1) = $$(if $$(LDFLAG_$(1)),-Wl$(comma)$$(LDFLAG_$(1)))
+_v = CFLAG_-Wl$(1)
+export $$(_v) = $$(if $$(LDFLAG_$(1)),-Wl$$(comma)$$(LDFLAG_$(1)))
 endef
 # Usage: cache-output-var,<variable>,<shell command>
 # Execute <shell command> and cache the output in <variable>.
@@ -359,8 +361,8 @@ endif
        #   0 .text         xxxxxxxx  00000000  00000000  xxxxxxxx  2**2 <===!
        CPU_CFLAGS-y  += $(CFLAG_-ffunction-sections) $(CFLAG_-fdata-sections)
        CPU_LDFLAGS-y += $(CFLAG_-Wl--sort-common)
-$(eval $(call check-ld-var,--sort-section%alignment))
-       CPU_LDFLAGS-y += $(CFLAG_-Wl--sort-section%alignment)
+$(eval $(call check-ld-var,--sort-section=alignment))
+       CPU_LDFLAGS-y += $(CFLAG_-Wl--sort-section=alignment)
 
        CPU_LDFLAGS-y+=-m32
        CPU_CFLAGS-y+=-m32
@@ -659,7 +661,7 @@ ifeq ($(LDSO_GNU_HASH_SUPPORT),y)
 # Be sure that binutils support it
 $(eval $(call check-ld-var,--hash-style=gnu))
 ifeq ($(LDFLAG_--hash-style=gnu),)
-ifneq ($(filter-out $(clean_targets) install_headers headers-y,$(MAKECMDGOALS)),)
+ifneq ($(filter-out $(clean_targets) CLEAN_% install_headers headers-y,$(MAKECMDGOALS)),)
 $(error Your binutils do not support --hash-style option, while you want to use it)
 endif
 else
@@ -764,7 +766,7 @@ CFLAGS += -I$(top_srcdir)libc/sysdeps/linux/common
 CFLAGS += -I$(KERNEL_HEADERS)
 
 #CFLAGS += -iwithprefix include-fixed -iwithprefix include
-$(eval $(call cache-output-var,CC_IPREFIX,$(CC) --print-file-name=include))
+$(eval $(call cache-output-var,CC_IPREFIX,$(CC) -print-file-name=include))
 CC_INC := -isystem $(dir $(CC_IPREFIX))include-fixed -isystem $(CC_IPREFIX)
 CFLAGS += $(CC_INC)