Although these build notes are intended mainly for Jeff and Dave, who
have been trying to build the beast with emx+gcc, they're posted here
for the benefit of any hackers who prefer not to come out of the closet.

1) LIB_PREFIX

In the emx/gcc block of configure.in around line 1100, you have to set
LIB_PREFIX to '' and delete the "lib" prefix from the libnames in the
remainder of that block so that, for example,

MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)'

becomes

MOZ_MNG_LIBS='$(DIST)/lib/mozmng.$(LIB_SUFFIX)'

Also, change line 163 of config.mk from

ifeq ($(MOZ_OS2_TOOLS),VACPP)

to

ifeq ($(OS_ARCH),OS2)


2) NSPR

Add

OMF_FLAG = OMF

to nsprpub/config/autoconf.mk in your object directory. This eventually
has to be rolled up into autoconf.mk.in and NSPR's configure.in.

Add this block to the end of nsprpub/pr/include/md/_os2.h:

#ifdef XP_OS2_EMX
#define SOCEINTR        EINTR
#define SOCEWOULDBLOCK  EWOULDBLOCK
#define SOCECONNABORTED ECONNABORTED
#define SOCEINPROGRESS  EINPROGRESS
#define SOCENOTSOCK     ENOTSOCK
#endif

Also, make sure the _PR_MD_ATOMIC_ block with the pseudo-asm at the end
of nsprpub/pr/src/md/os2/os2misc.c is #if 0'd out.

To build nsprpub/pr/tests, you'll have to change $(LINK) to $(LD) on
line 488 of the Makefile.in. The -Zomf -Zmtd flags are also missing from
the compilation command. There's such a Byzantine maze of *FLAGS
variables in nsprpub that I couldn't find which ones come into play
there. The one chunk of the gcc command I was able to nail down was
-DFORCE_PR_LOG on line 112 of nsprpub/config/config.mk 

DEFINES += -DFORCE_PR_LOG -Zomf -Zmtd

While this is obviously ugly and wrong, it works. Energy is probably
better spent cleaning up the mess of flags than tracking down and
tweaking the elusive set being used for the tests.

Those are all the new breaks I've hit since building 0.9.7. If you run
into any others, I likely have fixes for them already; just ask.

h~

Reply via email to