View Issue Details

IDProjectCategoryView StatusLast Update
0000503Perl for OS/2Bugpublic2020-08-24 03:11
Reporterkomh Assigned Topsmedley  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0000503: -static-libgcc does not work with gcc 4.4.6
DescriptionHi/2.

When using libtool, -static-libgcc does not work with gcc 4.4.6.

That is, even though -static-libgcc is specified on command line or in GCCOPT env var, the executable always depends on gcc446.dll.

Steps To Reproducesh libtool --tag=CXX --mode=link g++ xs.cpp -o xs.exe x:/path/to/usr/local446/lib/libstdc++.la -static-libgcc

----- xs.cpp
#include <iostream>
using namespace std;
int main() {
    try {
        throw "Throw exception!";
    }
    catch( char const *s ) {
        cout << "Catched exception = " << s << endl;
    }

    return 0;
}
-----
Additional InformationThis is due to -lgcc_so_d dependency of libstdc++.la

Removing -lgcc_so_d from 'dependency_libs' of libstdc++.la solves this problem.

But I don't know this is a right way.
TagsNo tags attached.

Activities

psmedley

2011-12-27 08:02

administrator   ~0002082

Your solution is correct (ie modifying libstdc++.la)

I will fix this for the next release

komh

2011-12-31 12:21

reporter   ~0002113

The reason why I am not sure, is that the other versions of gcc(4.3.4, 4.4.5, 4.5.2) don't have to this fix.

They all have -lgcc_so_d dependency.

psmedley

2013-10-11 11:09

administrator   ~0002561

does this work ok in 4.7.3 as released? I don't plan on updated older gcc versions

komh

2013-10-15 13:40

reporter   ~0002567

Yes, this works in 4.7.3. You don't have to update older ones. ^^

psmedley

2013-10-15 18:48

administrator   ~0002568

Fixed in gcc 4.7

Issue History

Date Modified Username Field Change
2011-12-26 14:36 komh New Issue
2011-12-27 08:02 psmedley Note Added: 0002082
2011-12-31 12:21 komh Note Added: 0002113
2013-10-11 11:09 psmedley Note Added: 0002561
2013-10-15 13:40 komh Note Added: 0002567
2013-10-15 18:48 psmedley Note Added: 0002568
2013-10-15 18:48 psmedley Status new => resolved
2013-10-15 18:48 psmedley Resolution open => fixed
2013-10-15 18:48 psmedley Assigned To => psmedley
2020-08-24 03:11 psmedley Status resolved => closed