From patchwork Thu Apr 4 19:53:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 233931 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A0EE12C0079 for ; Fri, 5 Apr 2013 06:54:45 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=hwx1dxha9nHeOeqJNoJaqA7IA2FwgLyoi2j6aaHZ/x7E0v4M7bSSY 9TR1SuupNHTHYUc+2gKTHSwAzWU+BLjn/hyPv/DjcO+I+pkKJZUyIARaQLAb1U2P +eRE82ssmQ/FpRjVhragGbAlOrtZM32YB3pkSz/s5JaF9IMERgrArk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=v3WruyK3IhR8iPk34BsVxnAVo4Q=; b=O8ufEOLJdhxF9/86t3YQ PZLYmCZPHzsI7DMIJ7hYVJ6wZknmQDcJdjpG7zwqQIK9vTqTf+2qCY1DTQdZ1+IG SGcakDxcRqO5SKfmFeELVC6RV6cF1fJY6F2kNYrYsL40NnE4VKBOoKLlFG9MD4r6 eMByXm6lFP1QUnlPTb22M0k= Received: (qmail 9804 invoked by alias); 4 Apr 2013 19:54:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9777 invoked by uid 89); 4 Apr 2013 19:54:06 -0000 X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_DF autolearn=ham version=3.3.1 Received: from mail-bk0-f41.google.com (HELO mail-bk0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 04 Apr 2013 19:54:04 +0000 Received: by mail-bk0-f41.google.com with SMTP id i18so1756862bkv.0 for ; Thu, 04 Apr 2013 12:54:02 -0700 (PDT) X-Received: by 10.205.43.133 with SMTP id uc5mr5443395bkb.22.1365105242102; Thu, 04 Apr 2013 12:54:02 -0700 (PDT) Received: from s42.loc (91-119-221-41.dynamic.xdsl-line.inode.at. [91.119.221.41]) by mx.google.com with ESMTPS id fs20sm7064624bkc.8.2013.04.04.12.54.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 12:54:01 -0700 (PDT) Received: from cow by s42.loc with local (Exim 4.80) (envelope-from ) id 1UNqES-0004Jd-04; Thu, 04 Apr 2013 21:54:00 +0200 From: Bernhard Reutner-Fischer To: gcc-patches@gcc.gnu.org Cc: Bernhard Reutner-Fischer , ian@airs.com Subject: [PATCH 1/3] libgcc: check for fenv.h in dfp configure check Date: Thu, 4 Apr 2013 21:53:28 +0200 Message-Id: <1365105210-16552-2-git-send-email-rep.dot.nop@gmail.com> In-Reply-To: <1365105210-16552-1-git-send-email-rep.dot.nop@gmail.com> References: <1365105210-16552-1-git-send-email-rep.dot.nop@gmail.com> X-IsSubscribed: yes uClibc can be built without fenv support, extend the configure check for decimal floating point to probe the existance of fenv.h, too. libgcc/ChangeLog: 2013-03-24 Bernhard Reutner-Fischer * configure.ac (libgcc_cv_dfp): Extend check to probe fenv.h availability. * configure: Regenerate Signed-off-by: Bernhard Reutner-Fischer --- libgcc/configure | 13 +++++++++++++ libgcc/configure.ac | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 1425df6..90936e8 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -4048,7 +4048,20 @@ if test "${libgcc_cv_dfp+set}" = set; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +#include + +int +main () +{ + _Decimal32 x; +int fe_except = + FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT; + + ; + return 0; +} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libgcc_cv_dfp=yes diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 8b7aba5..e3d713d 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -172,7 +172,14 @@ AC_SUBST(long_double_type_size) # Check for decimal float support. AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp], - [AC_COMPILE_IFELSE([_Decimal32 x;], [libgcc_cv_dfp=yes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +]], [[ +_Decimal32 x; +int fe_except = + FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT; +]])], + [libgcc_cv_dfp=yes], [libgcc_cv_dfp=no])]) decimal_float=$libgcc_cv_dfp AC_SUBST(decimal_float)