Closed Bug 491796 Opened 13 years ago Closed 13 years ago

arm-wince-gcc should support link and entry options

Categories

(Core :: General, defect)

ARM
Windows Mobile 6 Professional
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: hiro, Assigned: hiro)

References

Details

(Keywords: mobile)

Attachments

(1 file, 3 obsolete files)

Attached patch A patch (obsolete) — Splinter Review
arm-wince-gcc should support link and entry options.
Attachment #376165 - Flags: review?(bugmail)
Blocks: 483653
Attachment #376165 - Flags: review?(bugmail) → review-
I verified this patch will allow --enable-tests to build on wince.  I think there is a general issue where we might need to support wmain vs main.
(In reply to comment #1)
> we already support /entry, see:
> 
> http://mxr.mozilla.org/mozilla-central/search?string=-entry%3A&find=Makefile.in&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central

But that option is for linker (i.e. arm-wince-link.exe) not arm-wince-gcc.exe.
this is really the only issue to resolve with this set of patches to build --enable-tests
(In reply to comment #4)
> this is really the only issue to resolve with this set of patches to build
> --enable-tests

Yes, nss uses link option for gcc.
http://mxr.mozilla.org/security/source/security/coreconf/rules.mk#273
Attached patch Reviced patch (obsolete) — Splinter Review
Or should I create a new C source file?
Attachment #376165 - Attachment is obsolete: true
Attachment #383635 - Flags: review?(bugmail)
Ideally I'd like to pull the majority of the implementation of arm-wince-link.c out into a new c file that arm-wince-gcc.c can use as well so our link options can't get out of sync.
Attachment #383769 - Flags: review?(doug.turner) → review+
nss passes the msvc flag -link for one of its tests, added support for that
Attachment #383635 - Attachment is obsolete: true
Attachment #383769 - Attachment is obsolete: true
Attachment #383814 - Flags: review?(doug.turner)
Attachment #383635 - Flags: review?(bugmail)
Comment on attachment 383814 [details] [diff] [review]
fixed typo, added check for -link

you probably could use strncasecmp and strcasecmp to reduce some of the if statements.
Attachment #383814 - Flags: review?(doug.turner) → review+
Comment on attachment 383814 [details] [diff] [review]
fixed typo, added check for -link


>+void checkLinkArgs(int* k, int* s, int* i, int* j, char** args, char** argv) {
>+      if (strncmp(argv[*j], "-DLL", 4) == 0 ||
>+	  strncmp(argv[*j], "/DLL", 4) == 0) {
>+	*k = 1;
>+      }
>+      if (strncmp(argv[*j], "-entry", 6) == 0 ||
>+	  strncmp(argv[*j], "/entry", 6) == 0 ||
>+	  strncmp(argv[*j], "-ENTRY", 6) == 0 ||
>+	  strncmp(argv[*j], "/ENTRY",6 ) == 0) {
>+	*k = 1;
>+      }
>+      if (strncmp(argv[*j], "-subsystem:", 11) == 0 ||
>+	  strncmp(argv[*j], "/subsystem:", 11) == 0 ||
>+	  strncmp(argv[*j], "-SUBSYSTEM:", 11) == 0 ||
>+	  strncmp(argv[*j], "/SUBSYSTEM:", 11) == 0) {
>+	*s = 1;
>+      }
>+}

int* i is not used here and int* j is not modified in the function so int j is reasonable for me.
And I would suggest that this function is separated into entry part and subsystem part.
pushed http://hg.mozilla.org/mozilla-central/rev/4a17b48c2b9c
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
verified with 1.9.2 build and winmo alpha3
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.