Closed Bug 650467 Opened 9 years ago Closed 9 years ago

Build failure with LDFLAGS=-static-libstdc++

Categories

(Firefox Build System :: General, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla6

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(2 files)

The flag is used on c-c, aiui, and leads to:
/tools/gcc-4.5/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../libstdc++.a(ctype.o): In function `std::ctype<char>::_M_widen_init() const':
(.text._ZNKSt5ctypeIcE13_M_widen_initEv+0x0): multiple definition of `std::ctype<char>::_M_widen_init() const'
host_stdc++compat.o:/builds/slave/comm-cen-trunk-lnx/build/mozilla/build/stdc++compat.cpp:111: first defined here
/usr/bin/ld: Warning: size of symbol `std::ctype<char>::_M_widen_init() const' changed from 1 in host_stdc++compat.o to 176 in /tools/gcc-4.5/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../libstdc++.a(ctype.o)

While the flag can now be removed, because what it was used for is gone with bug 643690, other people may be using it as well and it's probably safer to disable our libstdc++ compatibility hack when it's used.

I also added another auto-disable when the C++ compiler is not gcc.
Attachment #526463 - Flags: review?(khuey)
I'm starting to wonder if it wouldn't be better to invert the libstdc++ compatibility hack setup in configure, and make it opt-in instead of opt-out
Assignee: nobody → mh+mozilla
I'm tempted to say it's better this way, since this is really only a constraint for our (Mozilla) builds, which thus needs to be addressed in our mozconfigs.
Attachment #526477 - Flags: review?(khuey)
Comment on attachment 526477 [details] [diff] [review]
Alternative: make libstdc++ compatibility opt-in instead of opt-out

I think I like this approach more.  r=me
Attachment #526477 - Flags: review?(khuey) → review+
http://hg.mozilla.org/mozilla-central/rev/98094f3afb93
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.