The default bug view has changed. See this FAQ.

Build failure with LDFLAGS=-static-libstdc++

RESOLVED FIXED in mozilla6

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
8 months ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla6
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 years ago
Created attachment 526463 [details] [diff] [review]
Disable libstdc++ compatibility hack when -static-libstdc++ is used or when the C++ compiler is not gcc

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)
(Assignee)

Comment 1

6 years ago
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
(Assignee)

Comment 2

6 years ago
Created attachment 526477 [details] [diff] [review]
Alternative: make libstdc++ compatibility opt-in instead of opt-out

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+
Attachment #526463 - Flags: review?(khuey)
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/mozilla-central/rev/98094f3afb93
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Blocks: 1294157
You need to log in before you can comment on or make changes to this bug.