[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-builds
Subject:    Re: yet to build on freebsd
From:       jon () eyrie ! org (Jonathan Lennox)
Date:       1999-04-30 3:31:34
[Download RAW message or body]

In article <3727A1AD.E128A89C@netscape.com>,
Wan-Teh Chang  <wtc@netscape.com> wrote:

>The makefile rule for building .so is in mozilla/config/rules.mk.
>Look for the rule for $(SHARED_LIBRARY).  You will see
>that the key command is $(MKSHLIB).
>
>In mozilla/configure.in, $(MKSHLIB) is defined as follows
>for most cases:
>    MKSHLIB='$(CXX) $(DSO_LDOPTS)'
>
>One solution is to define MKSHLIB as
>    MKSHLIB='$(LD) $(DSO_LDOPTS)'
>and then define LD to be $(CXX) by default.  In those
>directories with only C code (libxpt and libmozdb), you
>can say
>    LD=$(CC)
>to override the default so that we use the C compiler to
>link shared libraries.

What I did was define a new variable, MKCSHLIB, which is autoconf'd to
'$(CC) $(DSO_LDOPTS)' if you're using gcc, or '$(LD) $(DSO_LDOPTS)' (the
same as MKSHLIB) if you're not.  Then I added a new variable to rules.mk
called LIB_IS_C_ONLY which makes rules.mk use the MKCSHLIB instead of
MKSHLIB pattern.  By doing this, I sucessfully built Mozilla with gcc and
g++ 2.7.2.1 on FreeBSD; I'll test the patches to make sure the egcs build
still works, then submit them in a bug report.  (It's probably no great rush 
since this isn't a patch which should go in until post-M5 anyway.)

-- 
Jonathan Lennox
lennox@cs.columbia.edu

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic