All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] powerpc: Fix FPU post related link warnings
@ 2011-01-25  9:00 Kumar Gala
  2011-01-25 20:16 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2011-01-25  9:00 UTC (permalink / raw)
  To: u-boot

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>
---

Wolfgang, I request we think about include this patch in v2011.03 tree so we
can all stop getting these build warnings :)

- k

 post/lib_powerpc/fpu/20001122-1.c             |    4 ++--
 post/lib_powerpc/fpu/20010114-2.c             |    4 ++--
 post/lib_powerpc/fpu/20010226-1.c             |    4 ++--
 post/lib_powerpc/fpu/980619-1.c               |    4 ++--
 post/lib_powerpc/fpu/acc1.c                   |    4 ++--
 post/lib_powerpc/fpu/compare-fp-1.c           |    4 ++--
 post/lib_powerpc/fpu/fpu.c                    |    4 ++--
 post/lib_powerpc/fpu/mul-subnormal-single-1.c |    4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/post/lib_powerpc/fpu/20001122-1.c b/post/lib_powerpc/fpu/20001122-1.c
index bef80c5..4af300d 100644
--- a/post/lib_powerpc/fpu/20001122-1.c
+++ b/post/lib_powerpc/fpu/20001122-1.c
@@ -28,10 +28,10 @@
 
 #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;
diff --git a/post/lib_powerpc/fpu/20010114-2.c b/post/lib_powerpc/fpu/20010114-2.c
index ee564e8..dab4d7e 100644
--- a/post/lib_powerpc/fpu/20010114-2.c
+++ b/post/lib_powerpc/fpu/20010114-2.c
@@ -28,10 +28,10 @@
 
 #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;
diff --git a/post/lib_powerpc/fpu/20010226-1.c b/post/lib_powerpc/fpu/20010226-1.c
index 099ca4a..c644bc9 100644
--- a/post/lib_powerpc/fpu/20010226-1.c
+++ b/post/lib_powerpc/fpu/20010226-1.c
@@ -28,10 +28,10 @@
 
 #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;
diff --git a/post/lib_powerpc/fpu/980619-1.c b/post/lib_powerpc/fpu/980619-1.c
index 46a31ae..0c195c1 100644
--- a/post/lib_powerpc/fpu/980619-1.c
+++ b/post/lib_powerpc/fpu/980619-1.c
@@ -28,10 +28,10 @@
 
 #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;
diff --git a/post/lib_powerpc/fpu/acc1.c b/post/lib_powerpc/fpu/acc1.c
index 9fca9b3..4dc1362 100644
--- a/post/lib_powerpc/fpu/acc1.c
+++ b/post/lib_powerpc/fpu/acc1.c
@@ -28,10 +28,10 @@
 
 #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;
diff --git a/post/lib_powerpc/fpu/compare-fp-1.c b/post/lib_powerpc/fpu/compare-fp-1.c
index f836b29..a0859f8 100644
--- a/post/lib_powerpc/fpu/compare-fp-1.c
+++ b/post/lib_powerpc/fpu/compare-fp-1.c
@@ -30,10 +30,10 @@
 
 #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++
diff --git a/post/lib_powerpc/fpu/fpu.c b/post/lib_powerpc/fpu/fpu.c
index 3f3adea..a4369f1 100644
--- a/post/lib_powerpc/fpu/fpu.c
+++ b/post/lib_powerpc/fpu/fpu.c
@@ -36,12 +36,12 @@
 
 #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);
diff --git a/post/lib_powerpc/fpu/mul-subnormal-single-1.c b/post/lib_powerpc/fpu/mul-subnormal-single-1.c
index 1f3732d..23a3f30 100644
--- a/post/lib_powerpc/fpu/mul-subnormal-single-1.c
+++ b/post/lib_powerpc/fpu/mul-subnormal-single-1.c
@@ -30,10 +30,10 @@
 
 #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;
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] powerpc: Fix FPU post related link warnings
  2011-01-25  9:00 [U-Boot] [PATCH] powerpc: Fix FPU post related link warnings Kumar Gala
@ 2011-01-25 20:16 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2011-01-25 20:16 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <1295946008-11905-1-git-send-email-galak@kernel.crashing.org> you wrote:
> 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>
> ---
> 
> Wolfgang, I request we think about include this patch in v2011.03 tree so we
> can all stop getting these build warnings :)
> 
> - k
> 
>  post/lib_powerpc/fpu/20001122-1.c             |    4 ++--
>  post/lib_powerpc/fpu/20010114-2.c             |    4 ++--
>  post/lib_powerpc/fpu/20010226-1.c             |    4 ++--
>  post/lib_powerpc/fpu/980619-1.c               |    4 ++--
>  post/lib_powerpc/fpu/acc1.c                   |    4 ++--
>  post/lib_powerpc/fpu/compare-fp-1.c           |    4 ++--
>  post/lib_powerpc/fpu/fpu.c                    |    4 ++--
>  post/lib_powerpc/fpu/mul-subnormal-single-1.c |    4 ++--
>  8 files changed, 16 insertions(+), 16 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No more blah, blah, blah!
	-- Kirk, "Miri", stardate 2713.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-25 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25  9:00 [U-Boot] [PATCH] powerpc: Fix FPU post related link warnings Kumar Gala
2011-01-25 20:16 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.