From patchwork Tue Jan 25 09:00:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumar Gala X-Patchwork-Id: 80337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B1F7A1007D1 for ; Tue, 25 Jan 2011 20:00:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EEE4B280A9; Tue, 25 Jan 2011 10:00:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dDhvbdzYdpbg; Tue, 25 Jan 2011 10:00:19 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E5BA528099; Tue, 25 Jan 2011 10:00:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0FFF128099 for ; Tue, 25 Jan 2011 10:00:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HHIZHzaLxKv3 for ; Tue, 25 Jan 2011 10:00:14 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by theia.denx.de (Postfix) with ESMTPS id 0500928098 for ; Tue, 25 Jan 2011 10:00:12 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id p0P908Cm001876; Tue, 25 Jan 2011 03:00:09 -0600 From: Kumar Gala To: u-boot@lists.denx.de Date: Tue, 25 Jan 2011 03:00:08 -0600 Message-Id: <1295946008-11905-1-git-send-email-galak@kernel.crashing.org> X-Mailer: git-send-email 1.6.0.6 Subject: [U-Boot] [PATCH] powerpc: Fix FPU post related link warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 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 --- 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 -#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 -#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 -#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 -#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 -#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 -#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 +GNU_FPOST_ATTR + #if CONFIG_POST & CONFIG_SYS_POST_FPU #include -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 -#if CONFIG_POST & CONFIG_SYS_POST_FPU - GNU_FPOST_ATTR +#if CONFIG_POST & CONFIG_SYS_POST_FPU + union uf { unsigned int u;