Closed Bug 736066 Opened 13 years ago Closed 13 years ago

Build NSS object files more like the rest of the tree

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla15

People

(Reporter: glandium, Assigned: glandium)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

Bug 632954 gets easier if NSS object files are just in $objdir/$relative_srcdir instead of $objdir/nss/$library_name.
I tested the hack on windows with both pymake and GNU make (which is why there is the $(shell cd $(topsrcdir);pwd)). At the same time, I seriously simplified security/manager/Makefile.in Pushed to try for more confidence: https://tbpl.mozilla.org/?tree=Try&rev=01ef33e1d8a7
Attachment #606197 - Flags: review?(ted.mielczarek)
Comment on attachment 606197 [details] [diff] [review] Build NSS object files more like the rest of the tree, and simplify security/manager/Makefile.in Review of attachment 606197 [details] [diff] [review]: ----------------------------------------------------------------- Despite being kind of crazy, this patch improves security/manager/Makefile.in an awful lot. ::: security/manager/Makefile.in @@ +184,5 @@ > DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1 > endif > ABS_topsrcdir := $(call core_abspath,$(topsrcdir)) > +# Hack to force NSS build system to use "normal" object directories > +DEFAULT_GMAKE_FLAGS += BUILD='$(MOZ_BUILD_ROOT)/security/$$(subst $(shell cd $(topsrcdir); pwd)/security/,,$$(CURDIR))' I'm a little worried about adding a ton of shell invocations for this pwd. Can you do the pwd once in this Makefile and just use that variable in this assignment?
Attachment #606197 - Flags: review?(ted.mielczarek) → review+
Assignee: nobody → mh+mozilla
(In reply to Ted Mielczarek [:ted] from comment #2) > Comment on attachment 606197 [details] [diff] [review] > Build NSS object files more like the rest of the tree, and simplify > security/manager/Makefile.in > > Review of attachment 606197 [details] [diff] [review]: > ----------------------------------------------------------------- > > Despite being kind of crazy, this patch improves > security/manager/Makefile.in an awful lot. > > ::: security/manager/Makefile.in > @@ +184,5 @@ > > DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1 > > endif > > ABS_topsrcdir := $(call core_abspath,$(topsrcdir)) > > +# Hack to force NSS build system to use "normal" object directories > > +DEFAULT_GMAKE_FLAGS += BUILD='$(MOZ_BUILD_ROOT)/security/$$(subst $(shell cd $(topsrcdir); pwd)/security/,,$$(CURDIR))' > > I'm a little worried about adding a ton of shell invocations for this pwd. > Can you do the pwd once in this Makefile and just use that variable in this > assignment? The $(shell) is invoked once, when appending to DEFAULT_GMAKE_FLAGS. It's subst and CURDIR that are used when building NSS.
Is it possible that this causes crashes if one doesn't do a clobber build? Some in https://hg.mozilla.org/mozilla-central/pushloghtml?startID=22381&endID=22382 seems to cause that, and I got crashes in pk11obj.c:633
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
Clobber build didn't help. I'm not at all sure whether this change caused the problem, but something in the latest merge causes m-c to crash very soon on this 64bit linux.
Attached file stack
Yes, this causes the crash.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #611244 - Attachment is patch: false
Where is the crash occurring? I don't see anything on tbpl.
Crashes locally for smaug, backing out locally fixed it for him.
Then I'll need a build log...
I tried again with gcc, and no crash. (The previous build was with clang.)
Target Milestone: mozilla14 → mozilla15
Status: REOPENED → RESOLVED
Closed: 13 years ago13 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

Created:
Updated:
Size: