Bug 53183 - [4.7/4.8 Regression] libgcc does not always figure out the size of double/long double
Summary: [4.7/4.8 Regression] libgcc does not always figure out the size of double/lon...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.1
Assignee: Andrew Pinski
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords: build, patch
Depends on:
Blocks:
 
Reported: 2012-05-02 01:58 UTC by Andrew Pinski
Modified: 2012-05-22 05:12 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-05-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2012-05-02 01:58:19 UTC
When compiling for a cross compiler to mips64-linux-gnu, we need to build a minimal compiler which does not have any libc headers including stdio.h.

So when we go to link n32 (or n64) glibc, it fails saying undefined symbols for the TF functions.  

The reason why it fails is because libgcc's configure did not figure out the size of long double.  The reason why that test fails is because there is an include for stdio.h.  The default AC_CHECK_SIZEOF uses the default include requirements which include stdio.h unconditionally.

Add to configure.ac and regenerate.
# The libgcc should not depend on any header files
AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
  [m4_divert_text([DEFAULTS],
    [ac_includes_default='/* none */'])]) 

--- CUT ---

I will submit this patch after I finish testing it but I wanted to file this as a bug so it does not get lost.
Comment 1 Andrew Pinski 2012-05-20 19:43:22 UTC
Mine.
Comment 2 Andrew Pinski 2012-05-21 18:56:53 UTC
Author: pinskia
Date: Mon May 21 18:56:35 2012
New Revision: 187732

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187732
Log:
2012-05-21  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/53183
        * configure.ac: Define the default includes to being none.
        * configure: Regenerate.


Modified:
    trunk/libgcc/ChangeLog
    trunk/libgcc/configure
    trunk/libgcc/configure.ac
Comment 3 Andrew Pinski 2012-05-21 19:02:28 UTC
Author: pinskia
Date: Mon May 21 19:02:11 2012
New Revision: 187733

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187733
Log:
2012-05-21  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/53183
        * configure.ac: Define the default includes to being none.
        * configure: Regenerate.



Modified:
    branches/gcc-4_7-branch/libgcc/   (props changed)
    branches/gcc-4_7-branch/libgcc/ChangeLog
    branches/gcc-4_7-branch/libgcc/configure
    branches/gcc-4_7-branch/libgcc/configure.ac

Propchange: branches/gcc-4_7-branch/libgcc/
            ('svn:mergeinfo' added)
Comment 4 Andrew Pinski 2012-05-22 05:12:11 UTC
Fixed.