Last Comment Bug 188246 - Build NSPR with GCC 3.x
: Build NSPR with GCC 3.x
Status: RESOLVED FIXED
:
Product: NSPR
Classification: Components
Component: NSPR (show other bugs)
: other
: x86 OS/2
: -- normal (vote)
: 4.4
Assigned To: Wan-Teh Chang
: Wan-Teh Chang
Mentors:
Depends on:
Blocks: os2gcc3
  Show dependency treegraph
 
Reported: 2003-01-08 15:18 PST by jhp (no longer active)
Modified: 2003-11-26 16:37 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
preliminary patch (18.57 KB, patch)
2003-01-08 15:20 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch w/ atomic ops asm (27.39 KB, patch)
2003-01-16 14:18 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v3 (27.74 KB, patch)
2003-03-03 13:41 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v3.1 (27.74 KB, patch)
2003-03-04 15:56 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v3.2 (28.36 KB, patch)
2003-03-14 14:30 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v3.3 (31.30 KB, patch)
2003-03-21 11:15 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v3.4 (31.27 KB, patch)
2003-03-21 14:17 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v3.5 (30.98 KB, patch)
2003-03-25 15:41 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
wtc's patch (24.27 KB, patch)
2003-03-25 16:00 PST, Wan-Teh Chang
no flags Details | Diff | Splinter Review
wtc's patch v2 (26.74 KB, patch)
2003-03-25 17:43 PST, Wan-Teh Chang
no flags Details | Diff | Splinter Review
nsprpub/pr/tests/dll/Makefile.in changes (779 bytes, patch)
2003-03-26 10:57 PST, jhp (no longer active)
wtc: review-
Details | Diff | Splinter Review

Description jhp (no longer active) 2003-01-08 15:18:09 PST
Derived from Meta bug 177789.  This bug deals specifically with patches to make
NSPR build on OS/2 using GCC 3.0.3
Comment 1 jhp (no longer active) 2003-01-08 15:20:26 PST
Created attachment 110985 [details] [diff] [review]
preliminary patch

First patch.  Still to do:
1) Write RAMSEM code.
2) Write atomic ops code.
3) Any other TODO or anything that looks odd in the patch.
Comment 2 sobotka 2003-01-08 16:24:17 PST
Don't remember what the RAMSEM code is about, but a trivially tweaked Linux i386
atomic ops code has been working fine here for many moons. I sent Mike the file
way back then.
Comment 3 jhp (no longer active) 2003-01-16 14:18:01 PST
Created attachment 111754 [details] [diff] [review]
patch w/ atomic ops asm

Patch contains assembly code for atomic ops.  Also, got pr/tests building. 
Many tests fail.
Comment 4 jhp (no longer active) 2003-03-03 13:41:14 PST
Created attachment 116127 [details] [diff] [review]
patch v3

General code cleanup.  Still TODO:
   1) Write RAMSEM code.
   2) Figure out SIGFPE crash (either here or in JS)
Comment 5 jhp (no longer active) 2003-03-04 15:56:42 PST
Created attachment 116253 [details] [diff] [review]
patch v3.1

Define BSD_SELECT in the correct place (fixes startup crash).
Comment 6 jhp (no longer active) 2003-03-14 14:30:54 PST
Created attachment 117252 [details] [diff] [review]
patch v3.2

More cleanup.
Comment 7 jhp (no longer active) 2003-03-21 11:15:17 PST
Created attachment 118053 [details] [diff] [review]
patch v3.3

Thread & tests fixes
Comment 8 jhp (no longer active) 2003-03-21 14:17:04 PST
Created attachment 118079 [details] [diff] [review]
patch v3.4

Fix Visual Age bustage
Comment 9 Wan-Teh Chang 2003-03-25 07:46:36 PST
Comment on attachment 118079 [details] [diff] [review]
patch v3.4

Javier,

Is it possible for you to generate a new patch that
does NOT have the DEF_FILE related changes?  The
reason is that we will need to change them again
when we check in the patch in bug 190538.  Also,
DEF_FILE is the same as the existing MAPFILE.
Comment 10 Wan-Teh Chang 2003-03-25 07:49:39 PST
In other words, is it possible to do a GCC 3.x build
without a DEF_FILE?
Comment 11 jhp (no longer active) 2003-03-25 09:07:57 PST
wtc:  Yes, we do need DEF files for the GCC build.  The changes here are just to
clean up the code the generates the DEF file.
Comment 12 Andy Willis (abwillis) 2003-03-25 13:14:51 PST
PRThread*                                                                      
                               
_MD_CURRENT_THREAD(void)                                                       
                               
{                                                                              
                               
    PRThread *thread;                                                          
                               
                                                                               
                               
    thread = _MD_GET_ATTACHED_THREAD();                                        
                               
                                                                               
                               
    if (NULL == thread) {                                                      
                               
        thread = _PRI_AttachThread(PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL, 0);
                              
    }                                                                          
                               
                                                                               
                               
    PR_ASSERT(thread != NULL);                                                 
                               
    return thread;                                                             
                               
}                                                                              
                               

Is in os2tred.c twice after the patch.  
Comment 13 jhp (no longer active) 2003-03-25 15:41:24 PST
Created attachment 118493 [details] [diff] [review]
patch v3.5

Cleaned up rules.mk to use existing MAPFILE macro.
Comment 14 Wan-Teh Chang 2003-03-25 16:00:55 PST
Created attachment 118497 [details] [diff] [review]
wtc's patch

Javier, could you test this patch?  Thanks.
Comment 15 jhp (no longer active) 2003-03-25 16:27:36 PST
wtc:  Yes, that patch works, except that it is missing the os2emx.s file from
the previous patch.  Put that in also, and this patch works for me.
Comment 16 Wan-Teh Chang 2003-03-25 17:43:28 PST
Created attachment 118511 [details] [diff] [review]
wtc's patch v2

Sorry, I missed os2emx.s.  This patch includes it.
I also removed your changes to nsprpub/pr/tests/dll/Makefile.in
from this patch.  Can you build in that directory without these
changes?  In any case, these changes are not required for the
Mozilla client.

Turns out your patch v3.5 is essentially the same as my patch.
We were working on and attaching our patches at pretty much the
same time :-)

I've checked in this patch on the NSPRPUB_PRE_4_2_CLIENT_BRANCH
for mozilla 1.4alpha.
Comment 17 jhp (no longer active) 2003-03-26 10:57:15 PST
Created attachment 118557 [details] [diff] [review]
nsprpub/pr/tests/dll/Makefile.in changes

Changes necessary for NSPR tests to build.  Also, removed $(TARGETS) define
(now handled by rules.mk) so *.lib would get deleted by 'make clean'.
Comment 18 Wan-Teh Chang 2003-03-26 11:16:20 PST
Comment on attachment 118557 [details] [diff] [review]
nsprpub/pr/tests/dll/Makefile.in changes

You deleted
    else
    TARGETS		= $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
which is used by WINNT.  This should be restored.

It seems that for OS/2, TARGETS must include $(LIBRARY) because
$(MAPFILE) is generated from $(LIBRARY), right?
Comment 19 Wan-Teh Chang 2003-03-27 08:38:37 PST
For the purpose of building Mozilla with GCC 3.x (meta bug 177789),
this bug is fixed.  The necessary changes for building NSPR as part
of Mozilla will appear in mozilla 1.4alpha.

Javier, please use bug 126932 (NSPR tests don't run on OS/2) for
the remaining changes for nsprpub/pr/tests/dll/Makefile.in.

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