patches/uClibc/0.9.32/150-Rules.mak-Rearrange-appending-UCLIBC_EXTRA_CFLAGS-to-CFLAGS.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Mar 11 22:11:43 2014 +0100 (2014-03-11)
changeset 3293 e11a8a2e225d
permissions -rw-r--r--
comptools: do not force build of make-3.81 unless really needed

On systems with make-3.82, we forcibly force the build and the use
of make-3.81

But some newer tools break when building with make-3.81. For example,
eglibc-3.18 breaks.

Introduce a new blind options that tools may select if they require
make-3.81. If the system does not have make-3.81, and this option is
selected, then we force the build of make-3.81. Otherwise, we leave
it to the user to decide on his own.

Note that no component selects this option for now. It will come in
later patches as we find them.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 commit 4642f4eead07080bf46b6d67b873d303eda9fb48
     2 Author: Khem Raj <raj.khem@gmail.com>
     3 Date:   Sat Jun 11 00:15:02 2011 -0700
     4 
     5     Rules.mak: Rearrange appending UCLIBC_EXTRA_CFLAGS to CFLAGS
     6     
     7     UCLIBC_EXTRA_CFLAGS is currently added before the OPTIMIZATION flags
     8     and OPTIMIZATION is chosen to be Os by default. But in OE we pass the optimisation
     9     flags through UCLIBC_EXTRA_CFLAGS but they are not effective since -Os is
    10     specified at last. So we need to change the order of these option flags
    11     
    12     Signed-off-by: Khem Raj <raj.khem@gmail.com>
    13     Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    14 
    15 diff --git a/Rules.mak b/Rules.mak
    16 index a00deea..6b8f5b2 100644
    17 --- a/Rules.mak
    18 +++ b/Rules.mak
    19 @@ -585,9 +585,6 @@ CFLAGS := -include $(top_srcdir)include/libc-symbols.h \
    20  	-nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \
    21  	-I$(top_srcdir)libc/sysdeps/linux \
    22  	-I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
    23 -ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
    24 -CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
    25 -endif
    26  
    27  # We need this to be checked within libc-symbols.h
    28  ifneq ($(HAVE_SHARED),y)
    29 @@ -633,6 +630,9 @@ LDFLAGS += -Wl,-s
    30  else
    31  STRIPTOOL := true -Stripping_disabled
    32  endif
    33 +ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
    34 +CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
    35 +endif
    36  
    37  ifeq ($(DOMULTI),y)
    38  # we try to compile all sources at once into an object (IMA), but