patches/uClibc/0.9.32/150-Rules.mak-Rearrange-appending-UCLIBC_EXTRA_CFLAGS-to-CFLAGS.patch
changeset 2612 a52574521bea
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/uClibc/0.9.32/150-Rules.mak-Rearrange-appending-UCLIBC_EXTRA_CFLAGS-to-CFLAGS.patch	Thu Aug 18 16:05:48 2011 +0200
     1.3 @@ -0,0 +1,38 @@
     1.4 +commit 4642f4eead07080bf46b6d67b873d303eda9fb48
     1.5 +Author: Khem Raj <raj.khem@gmail.com>
     1.6 +Date:   Sat Jun 11 00:15:02 2011 -0700
     1.7 +
     1.8 +    Rules.mak: Rearrange appending UCLIBC_EXTRA_CFLAGS to CFLAGS
     1.9 +    
    1.10 +    UCLIBC_EXTRA_CFLAGS is currently added before the OPTIMIZATION flags
    1.11 +    and OPTIMIZATION is chosen to be Os by default. But in OE we pass the optimisation
    1.12 +    flags through UCLIBC_EXTRA_CFLAGS but they are not effective since -Os is
    1.13 +    specified at last. So we need to change the order of these option flags
    1.14 +    
    1.15 +    Signed-off-by: Khem Raj <raj.khem@gmail.com>
    1.16 +    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    1.17 +
    1.18 +diff --git a/Rules.mak b/Rules.mak
    1.19 +index a00deea..6b8f5b2 100644
    1.20 +--- a/Rules.mak
    1.21 ++++ b/Rules.mak
    1.22 +@@ -585,9 +585,6 @@ CFLAGS := -include $(top_srcdir)include/libc-symbols.h \
    1.23 + 	-nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \
    1.24 + 	-I$(top_srcdir)libc/sysdeps/linux \
    1.25 + 	-I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
    1.26 +-ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
    1.27 +-CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
    1.28 +-endif
    1.29 + 
    1.30 + # We need this to be checked within libc-symbols.h
    1.31 + ifneq ($(HAVE_SHARED),y)
    1.32 +@@ -633,6 +630,9 @@ LDFLAGS += -Wl,-s
    1.33 + else
    1.34 + STRIPTOOL := true -Stripping_disabled
    1.35 + endif
    1.36 ++ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
    1.37 ++CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
    1.38 ++endif
    1.39 + 
    1.40 + ifeq ($(DOMULTI),y)
    1.41 + # we try to compile all sources at once into an object (IMA), but