Last Comment Bug 779704 - cleanup linker cruft for FreeBSD from configure
: cleanup linker cruft for FreeBSD from configure
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All FreeBSD
: -- normal (vote)
: mozilla17
Assigned To: Jan Beich
:
Mentors:
Depends on: 436806
Blocks: 784058
  Show dependency treegraph
 
Reported: 2012-08-01 18:13 PDT by Jan Beich
Modified: 2012-10-06 14:49 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
remove obsolete stuff (3.18 KB, patch)
2012-08-01 18:17 PDT, Jan Beich
khuey: review+
Details | Diff | Review
checkin version (3.06 KB, patch)
2012-08-06 10:03 PDT, Jan Beich
landry: checkin+
Details | Diff | Review

Description Jan Beich 2012-08-01 18:13:51 PDT
- a.out is no longer supported by FreeBSD ld(1) since r103436.
- -lc_r is no longer the default threading library since r125230.
- not GNU compatible linkers are unlikely to be supported*

This doesn't affect ldflags for libraries, they're still

  DSO_LDOPTS='-shared -Wl,-z,defs'

for both clang and gcc, same as on Linux.

http://svn.freebsd.org/changeset/base/103436
http://svn.freebsd.org/changeset/base/125230
* http://lists.freebsd.org/pipermail/freebsd-toolchain/2012-July/000438.html
Comment 1 Jan Beich 2012-08-01 18:17:29 PDT
Created attachment 648172 [details] [diff] [review]
remove obsolete stuff
Comment 2 Landry Breuil (:gaston) 2012-08-02 00:49:58 PDT
Comment on attachment 648172 [details] [diff] [review]
remove obsolete stuff

I think that will make DLL_SUFFIX default ".so", not sure that's what you want. DSO_LDOPTS is set to '-shared' anyway in the 'GNU specific defaults' section.
Comment 3 Jan Beich 2012-08-02 03:22:07 PDT
(In reply to Landry Breuil (:gaston) from comment #2)
> I think that will make DLL_SUFFIX default ".so", not sure that's what you want.

It was this way for a long time and worked fine. At least ld(1) wants ".so" suffix for ELF libs (to make -lfoo work). FreeBSD rtld(1) works fine even with empty suffix and only wants ".so.1" if the intent is to share common libs via ldconfig hints. The latter may not work compared to per-library sharing via --(with|enable)-system-foo, e.g. trying using libxul from firefox13 on firefox14.

Here's a part that removes ".so.MAJOR.MINOR" support for base system
http://svnweb.freebsd.org/base/head/share/mk/bsd.lib.mk?r1=103436&r2=103435&pathrev=103436
SHLIB_NAME=	lib${LIB}.so.${SHLIB_MAJOR} # ELF
SHLIB_NAME?=	lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} # AOUT
Comment 4 Kyle Huey [:khuey] (khuey@mozilla.com) 2012-08-06 07:55:48 PDT
Comment on attachment 648172 [details] [diff] [review]
remove obsolete stuff

Review of attachment 648172 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not really knowledgeable about FreeBSD , but I'm happy to go along with this.
Comment 5 Jan Beich 2012-08-06 10:03:36 PDT
Created attachment 649308 [details] [diff] [review]
checkin version
Comment 7 Ed Morley [:emorley] 2012-08-07 07:35:51 PDT
https://hg.mozilla.org/mozilla-central/rev/9d5f326881c7

Note You need to log in before you can comment on or make changes to this bug.