Static Build with MinGW GCC 3.3.1 Problem

RESOLVED FIXED in mozilla1.7beta

Status

SeaMonkey
Build Config
RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: Hilary, Assigned: cls)

Tracking

Trunk
mozilla1.7beta
x86
Windows 98

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

940 bytes, patch
jhp (no longer active)
: review+
Details | Diff | Splinter Review
(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6a) Gecko/20031009 Firebird/0.7+ (hilary gcc mingw 3.3.1 static build)
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6a) Gecko/20031009 Firebird/0.7+

When building Firebird in the static mode, makefile will include the library
twice for certain library. e.g.

gcc -o helloworld.exe libjs3230.a --whole-archive libjs3230.a --no-whole-archive

Gcc will complain duplicate declarion error. I have modifed the rules.mk to
remove the duplicated libraries.

Another problem is final-link-libs and final-link-comps. the Makefile script
cannot build a correct list of libraries' name into it. final-link-comps miss
texteditor_s.


Reproducible: Always

Steps to Reproduce:
1.
2.
3.




Index: rules.mk
===================================================================
RCS file: /cvsroot/mozilla/config/rules.mk,v
retrieving revision 3.418
diff -u -r3.418 rules.mk
--- rules.mk	18 Sep 2003 17:24:54 -0000	3.418
+++ rules.mk	10 Oct 2003 06:55:48 -0000
@@ -1021,7 +1021,7 @@
 	@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
 endif # SHARED_LIBRARY_LIBS
 endif # NO_LD_ARCHIVE_FLAGS
-	$(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE)
$(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
$(SHLIB_LDENDFILE)
+	$(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS)
$(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
 	@rm -f foodummyfilefoo $(SUB_SHLOBJS)
 else # os2 vacpp
 	$(MKSHLIB) /O:$@ /DLL /INC:_dllentry $(LDFLAGS) $(OBJS) $(LOBJS)
$(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
(Reporter)

Comment 1

14 years ago
Created attachment 132985 [details] [diff] [review]
Patch the rules.mak to remove duplicated library

Comment 2

14 years ago
Reporter: you should request review/super-review on patch to get it reviewed by
developers.
(Assignee)

Comment 3

14 years ago
Not Fire* specific.
Assignee: bryner → nobody
Status: UNCONFIRMED → NEW
Component: build-config → Build Config
Ever confirmed: true
Product: Firefox → Browser
QA Contact: asa → core.build-config
Version: unspecified → Trunk
(Assignee)

Comment 4

14 years ago
Created attachment 141667 [details] [diff] [review]
v1.0

An incorrect assumption was made when generating the link line when using
SHARED_LIBRARY_LIBS.  We have a bare OS check to indicate that we want to
accomodate MSVC's linker's behavior but we also need to check that we're not
building with gcc which uses a different linker with different behavior.
Assignee: nobody → cls
Attachment #132985 - Attachment is obsolete: true
Status: NEW → ASSIGNED
(Assignee)

Updated

14 years ago
Attachment #141667 - Flags: review?(bsmedberg)

Comment 5

14 years ago
Comment on attachment 141667 [details] [diff] [review]
v1.0

looks ok to me, but I'd like mkaply to make sure this is right for OS/2 also.
Attachment #141667 - Flags: superreview?(mkaply)
Attachment #141667 - Flags: review?(bsmedberg)
Attachment #141667 - Flags: review+
cls, I hope I'm reading this right, but I think this won't work for OS/2, since
we now use GCC, but with our own linker;  so for OS/2, we still want to go down
that path, even with GNU_CC defined.  Unfortunately, I'm struggling to come up
with a _single_ line that would accomodate what we want.
(Assignee)

Comment 7

14 years ago
Does it break if you replace the $(GNU_CC)$(GNU_CXX) with $(GNU_LD) ?
That should work.  For OS/2, we have GNU_CC and GNU_CXX set to 1, but GNU_LD is
unset.  I'll test this out later today.
(Assignee)

Comment 9

14 years ago
Created attachment 141720 [details] [diff] [review]
v1.1

Check GNU_LD instead of GNU_CC || GNU_CXX
Attachment #141667 - Attachment is obsolete: true
(Assignee)

Updated

14 years ago
Attachment #141667 - Flags: superreview?(mkaply)
(Assignee)

Updated

14 years ago
Attachment #141720 - Flags: review?(pedemont)

Updated

14 years ago
Attachment #141720 - Flags: review?(pedemont) → review+
(Assignee)

Comment 10

14 years ago
Patch has been checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7beta
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.