Closed
Bug 5770
Opened 25 years ago
Closed 25 years ago
Patch so Mozilla builds on FreeBSD with gcc 2.7.2.1
Categories
(SeaMonkey :: Build Config, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
M6
People
(Reporter: lennox, Assigned: briano)
Details
Attachments
(1 file)
2.77 KB,
patch
|
Details | Diff | Splinter Review |
This patch enables Mozilla to build on FreeBSD 3.1-STABLE using the version of gcc and g++ that come with the system (2.7.2.1). The problem is that two libraries (libxpt and libmozdbm) contain only C code, but they are linked as shared libraries using 'g++ -shared'. When they are linked into binaries that also contain only C code (e.g. PrimitiveTest) there's a dependency on libc++, but the necessary libgcc C++ symbols are never pulled in (since nothing uses them), so we get a link failure that looks like this: gcc -o PrimitiveTest PrimitiveTest.o -Wall -pipe -pthread -g -L../../../dist/./b in -L../../../dist/./lib -L../../../dist/./bin -lxpt -ll -lutil -lm /usr/lib/libstdc++.so.2: undefined reference to `__unwind_function' /usr/lib/libstdc++.so.2: undefined reference to `__find_first_exception_table_ma tch' /usr/lib/libstdc++.so.2: undefined reference to `__builtin_vec_new' /usr/lib/libstdc++.so.2: undefined reference to `__register_exceptions' /usr/lib/libstdc++.so.2: undefined reference to `__builtin_vec_delete' /usr/lib/libstdc++.so.2: undefined reference to `__builtin_delete' /usr/lib/libstdc++.so.2: undefined reference to `__builtin_new' This patch modifies the Makefiles for the two problematic libraries so that they're linked with gcc instead, if $(CC) is gcc. (I've followed the current practice of having this be configured by autoconf; I added a new autoconf variable, MKCSHLIB, to complement MKSHLIB.) This same problem might occur with some additional libraries if --enable-tests is on; I haven't tested that, but once this patch is in, fixing additional libraries is just a matter of defining LIB_IS_C_ONLY in their makefiles. I've tested this to make sure the egcs build is unaffected, and everything seems fine.
Reporter | ||
Comment 1•25 years ago
|
||
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M6
Assignee | ||
Comment 2•25 years ago
|
||
I need to study this, because the platform-specific portion of configure.in has numerous MKSHLIB overrides that may or may not require equivalent MKCSHLIB overrides as well. Not a big deal, but I can't be monitoring builds this weekend, so it'll have to wait.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•25 years ago
|
||
I just checked in this fix, in a slightly more platform-friendly form. Thanks again for all your help!
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•