]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/commitdiff
powerpc: Fix FPU post related link warnings
authorKumar Gala <galak@kernel.crashing.org>
Tue, 25 Jan 2011 09:00:08 +0000 (03:00 -0600)
committerWolfgang Denk <wd@denx.de>
Tue, 25 Jan 2011 20:16:08 +0000 (21:16 +0100)
If we built POST on PPC's that didn't enable CONFIG_SYS_POST_FPU we'd
get the following warning with newer toolchains:

powerpc-linux-gnu-ld: Warning: lib_powerpc/fpu/libpostpowerpcfpu.o
      uses hard float, libpost.o uses soft float

We actually worked around this sometime ago with the following commit:

commit ce82ff05388b5ddafdf6082ef0776cce72c40b1c
Author: Yuri Tikhonov <yur@emcraft.com>
Date:   Sat Dec 20 14:54:21 2008 +0300

   FPU POST: fix warnings when building with 2.18 binutils

However, this only took into effect if CONFIG_SYS_POST_FPU was enabled.
We can simply move the GNU_FPOST_ATTR out of the CONFIG_SYS_POST_FPU
ifdef block to address the issue.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
post/lib_powerpc/fpu/20001122-1.c
post/lib_powerpc/fpu/20010114-2.c
post/lib_powerpc/fpu/20010226-1.c
post/lib_powerpc/fpu/980619-1.c
post/lib_powerpc/fpu/acc1.c
post/lib_powerpc/fpu/compare-fp-1.c
post/lib_powerpc/fpu/fpu.c
post/lib_powerpc/fpu/mul-subnormal-single-1.c

index bef80c5f79e72e660dc81622e24adbfc067906a0..4af300d880ac1c21a44a1eba919d3940b3465a3d 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 int fpu_post_test_math1 (void)
 {
        volatile double a, *p;
index ee564e8d621f439cf15a621aecb00a8bdf8b6f7d..dab4d7e59027f8312359fbe02d0ce93a53587925 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 static float rintf (float x)
 {
        volatile float TWO23 = 8388608.0;
index 099ca4a64f7dcca83b2e7f2db7c2eaa9bb9bc374..c644bc97ae99cad1aacb86903b28a2ae7375f50d 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 int fpu_post_test_math3 (void)
 {
        volatile long double dfrom = 1.1;
index 46a31aec45f95ffe4ba576daa2d3eef31eb6aa7e..0c195c1e52fe9f613654e0ca304ea55a122d2787 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 int fpu_post_test_math4 (void)
 {
        volatile float reale = 1.0f;
index 9fca9b3788a32e27efe9ebfa3e3e1dcf7e813fda..4dc1362fecbcbfb74c7546748a9816a1e44a72ab 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 static double func (const double *array)
 {
        double d = *array;
index f836b29c08ede62ae9b68ed89ca699845a8f0de8..a0859f874b18957b7d89db44c191d73651d7a6d4 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 static int failed;
 
 #define TEST(c) if ((c) != ok) failed++
index 3f3adea197baf57c9f1a1eb2a5bf1203aeb4b746..a4369f13efaccc55665112d1a78aef41769fee28 100644 (file)
 
 #include <post.h>
 
+GNU_FPOST_ATTR
+
 #if CONFIG_POST & CONFIG_SYS_POST_FPU
 
 #include <watchdog.h>
 
-GNU_FPOST_ATTR
-
 extern int fpu_status (void);
 extern void fpu_enable (void);
 extern void fpu_disable (void);
index 1f3732d9243fc193679497cad13f4d4e34d1deff..23a3f302e8fe8a9ca454ad59b71a376deaf2e981 100644 (file)
 
 #include <post.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
-
 GNU_FPOST_ATTR
 
+#if CONFIG_POST & CONFIG_SYS_POST_FPU
+
 union uf
 {
        unsigned int u;