summaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/uClibc-0.9.32.1-Fix-e500-__fe_nomask_env-use-of-__set_errno.patch
blob: 1908925a330119900f91382c63e41c263ff1e0c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
>From 49f58308779cb0b798f5e7bc902bbc515c1ec394 Mon Sep 17 00:00:00 2001
From: Jason Woodward <jason.woodward@timesys.com>
Date: Sat, 11 Jun 2011 22:00:59 -0400
Subject: [PATCH] Fix e500 __fe_nomask_env use of __set_errno w/o CFLAGS-libm

Since the new _LIBC guard in 96c9a8f7d00cdf6bb7968a2390b9d87da8a45e2d we need
to use CFLAGS-libm (-DNOT_IN_libc -DIS_IN_libm) or we end up with linker
errors like:

  lib/libm.a(fe_nomask.os): In function `__fe_nomask_env':
  fe_nomask.c:(.text+0x26): undefined reference to `__libc_errno'
  collect2: ld returned 1 exit status

Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
---
 libm/powerpc/e500/fpu/Makefile.arch |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libm/powerpc/e500/fpu/Makefile.arch b/libm/powerpc/e500/fpu/Makefile.arch
index 904561e..a64843f 100644
--- a/libm/powerpc/e500/fpu/Makefile.arch
+++ b/libm/powerpc/e500/fpu/Makefile.arch
@@ -11,6 +11,8 @@ libm_ARCH_SRC:=$(wildcard $(libm_ARCH_fpu_DIR)/*.c)
 libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_fpu_DIR)/%.c,$(libm_ARCH_fpu_OUT)/%.o,$(libm_ARCH_SRC))
 endif
 
+CFLAGS-fe_nomask.c := $(CFLAGS-libm)
+
 libm_ARCH_OBJS:=$(libm_ARCH_OBJ)
 
 ifeq ($(DOPIC),y)
-- 
1.7.0.4