Closed Bug 35419 Opened 25 years ago Closed 11 years ago

solaris/gcc should use -shared instead of -G in configure.in DSO_LDOPTS

Categories

(Firefox Build System :: General, defect)

Sun
Solaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmosedale, Unassigned)

References

Details

(Whiteboard: suntrak-n6)

Attachments

(2 files)

This is the Right Way to generate a shared object under GCC. It adds "-z text" to the linker flags, and perhaps does other stuff too. I've been having some problems with the "-z text" and nsScriptSecurityManager.cpp which I need to resolve before I can get this in.
Because of the "-z text", 35418 needs to be fixed first. Also, one reason why using "-shared" is desirable is because of this (quoted from bug 23759): > By default, the solaris linker is willing to link non-PIC code into shared > libraries. If someone has their LD_LIBRARY_PATH set in an unusual way, this > can cause errors that are subtle and difficult to track down. > > Adding "-z text" to DSO_LDOPTS on solaris will instead cause the linker to > abort if it stumbles across non-PIC code while linking a shared library.
Status: NEW → ASSIGNED
Depends on: 35418
mass re-assign of all bugs where i was listed as the qa contact
QA Contact: cyeh → chofmann
Reassigning Solaris-specific bugs to richb.
Assignee: dmose → rich.burridge
Status: ASSIGNED → NEW
Reassigning to Sherry Shen.
Assignee: rich.burridge → sherry.shen
Status: NEW → ASSIGNED
Blocks: 34566
Reassigning to me. Sherry no longer works on Mozilla.
Assignee: sherry.shen → rich.burridge
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Whiteboard: suntrak-n6
Reassigning to Herbie, who has a fix in hand for this bug.
Assignee: rich.burridge → herbie.ong
Status: ASSIGNED → NEW
Please attach patches and get reviewers to record their stamps of approval in the bug, next time. Thanks. a=brendan@mozilla.org. /be
Just addded the patch, already got r=cls@seawood.org last week, I forgot to mark it down here. I will check in fix soon.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Herbie, I checked in your patch this afternoon and speedracer (the solaris/gcc tinderbox) broke. Besides not having a dynamic libstdc++ (which dmose fixed! rheeeeeeeeet!) , it turns out that we link against libiberty.a for debug builds and of course, libiberty.a is not compiled with -fPIC so the build fails. If you know of a better way to demangle C++ names other than using libiberty's cplus_demangle() function, please let us know and we can try this patch again.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Here's some voodoo for you on the gcc line for linking .... -Wl,-B,static -liberty -Wl,-B,dynamic -l<other libs> This will direct the linker to link that lib static, and everything after it dynamically, of course
Re-assiging to Rich Burridge; Herbie no longer works on Mozilla.
Assignee: herbie.ong → rich.burridge
Status: REOPENED → NEW
Reassigning to Ed to do with as he wants.
Assignee: rich.burridge → edburns
I'll ask our RE person to look at this.
Status: NEW → ASSIGNED
We're probably going to close this as WONTFIX since we're moving to getting everyone to build with Forte.
Assignee: edburns → khl
Status: ASSIGNED → NEW
Please don't close it; Mozilla needs to continue to work nicely with free compilers. WONTFIXing is especially inappropriate given that solaris/gcc is on the tinderbox main page. If you can't possibly devote any cycles to this, consider posting to .unix and .builds and asking if there's anyone who would be willing to take this bug off your hands. Worst case, reassign to nobody@mozilla.org and add a helpwanted keyword.
Hi Ed, as long as compiling mozilla with forte requires at least glib to be compiled with forte, please proceed with a bit more caution. No cycles here, either, though. Axel
Depends on: 232763
Patch has been rechecked in now that we no longer use libiberty.
Status: NEW → RESOLVED
Closed: 25 years ago22 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7beta
Ok, this patch has been backed out (again). After making sure that every Mozilla library was compiled with -fPIC and doing some googling, it looks like something else is causing ld to throw the 'relocations remain against allocatable but non-writable sections' error. Adding -mimpure-text to DSO_LDOPTS got the build to finish on speedracer but that's apparently not a recommended option: see http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01815.html . And it either only works for libraries created with g++ or it wasn't implemented in egcs 1.0.3 so bismark is still dying when linking libmoz_libart_lgpl.so which is a C library. I'm guessing that gcc is Doing Something Wrong(tm) because it complains about the text allocations in nsComputedDOMStyle.cpp which is being compiled with -fPIC. One thing I did notice though is that file contains a lot of functions with have each have a const variable of varying types named "text".
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Product: Browser → Seamonkey
Assignee: khl → nobody
Status: REOPENED → NEW
Priority: P3 → --
QA Contact: chofmann → build-config
Target Milestone: mozilla1.7beta → ---
Product: SeaMonkey → Core
The problem still remains, and since siy years are gone and thus, the side effects of the above patch might have changed, I start out with a new diff for discussion. There is one other problem regarding gcc/solaris linker flags: The -rpath-link within the MOZ_FIX_LINK_PATHS. The diff has been made against the current firefox 3.6.9 release. Are the guys in CC still involved or does it make sense to add some general email like bugs@... to it?
against firefox release 3.6.9
This was fixed in bug 574639.
Status: NEW → RESOLVED
Closed: 22 years ago11 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: