Skip to content
Snippets Groups Projects
Commit e009cdeb authored by Kumar Gala's avatar Kumar Gala Committed by Wolfgang Denk
Browse files

powerpc: Fix FPU post related link warnings


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 ce82ff05
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: default avatarKumar Gala <galak@kernel.crashing.org>
parent 2b21ec92
No related branches found
No related tags found
No related merge requests found
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
int fpu_post_test_math1 (void) int fpu_post_test_math1 (void)
{ {
volatile double a, *p; volatile double a, *p;
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
static float rintf (float x) static float rintf (float x)
{ {
volatile float TWO23 = 8388608.0; volatile float TWO23 = 8388608.0;
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
int fpu_post_test_math3 (void) int fpu_post_test_math3 (void)
{ {
volatile long double dfrom = 1.1; volatile long double dfrom = 1.1;
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
int fpu_post_test_math4 (void) int fpu_post_test_math4 (void)
{ {
volatile float reale = 1.0f; volatile float reale = 1.0f;
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
static double func (const double *array) static double func (const double *array)
{ {
double d = *array; double d = *array;
......
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
static int failed; static int failed;
#define TEST(c) if ((c) != ok) failed++ #define TEST(c) if ((c) != ok) failed++
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
#include <post.h> #include <post.h>
GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CONFIG_POST & CONFIG_SYS_POST_FPU
#include <watchdog.h> #include <watchdog.h>
GNU_FPOST_ATTR
extern int fpu_status (void); extern int fpu_status (void);
extern void fpu_enable (void); extern void fpu_enable (void);
extern void fpu_disable (void); extern void fpu_disable (void);
......
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_FPU
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU
union uf union uf
{ {
unsigned int u; unsigned int u;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment