User account creation filtered due to spam.

Bug 11903 - [3.3 only] -pthread fails to link due to error in spec file on sh4
Summary: [3.3 only] -pthread fails to link due to error in spec file on sh4
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 3.3.2
Assignee: Kazumoto Kojima
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-13 03:48 UTC by dank
Modified: 2003-08-13 04:25 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: sh4-*-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-08-13 03:52:56


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dank 2003-08-13 03:48:58 UTC
Linking any program with -pthread fails with error
"ld: cannot find -lthread".  This is a silly mistake
in the spec file.  A patch to fix this is at 
http://www.kegel.com/crosstool/current/gcc-3.3-patches/sh4-pthread.patch
Please apply for gcc-3.3.2.
Comment 1 Andrew Pinski 2003-08-13 03:52:56 UTC
Same as before:
        * config/sh/linux.h (SUBTARGET_LINK_SPEC): Don't set rpath.
        (LIB_SPEC): Set -lpthread always when -pthread set.  Set -lieee
        when -mieee-fp set and -shared not set.   
        (SH_FALLBACK_FRAME_FLOAT_STATE): Don't define for SH5.
In fact this and bug 11902 can be fixed in one commit.
Comment 2 kkojima@rr.iij4u.or.jp 2003-08-13 04:11:52 UTC
Subject: Re:  [3.3 only] -pthread fails to link due to error
 in spec file on sh4

> Same as before:
>         * config/sh/linux.h (SUBTARGET_LINK_SPEC): Don't set rpath.
>         (LIB_SPEC): Set -lpthread always when -pthread set.  Set -lieee
>         when -mieee-fp set and -shared not set.   
>         (SH_FALLBACK_FRAME_FLOAT_STATE): Don't define for SH5.
> In fact this and bug 11902 can be fixed in one commit.

Yes. This is also fixed already on 3.3.2 with:
2003-08-08  Kaz Kojima  <kkojima@gcc.gnu.org>

        * config/sh/linux.h (SUBTARGET_LINK_SPEC): Don't set rpath.
        (LIB_SPEC): Set -lpthread always when -pthread set.  Set -lieee
        when -mieee-fp set and -shared not set.
Comment 3 Andrew Pinski 2003-08-13 04:16:09 UTC
Closing as fixed.  I should have looked before confirming bugs (it is too late for me need sleep).
Comment 4 dank 2003-08-13 04:25:18 UTC
Sorry for the noise!