Closed Bug 508721 Opened 16 years ago Closed 15 years ago

WinCE build tools do not understand the first argument provided

Categories

(Firefox Build System :: General, defect)

ARM
Windows CE
defect
Not set
normal

Tracking

(status1.9.2 beta1-fixed)

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: alexp, Assigned: alexp)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13 (.NET CLR 3.5.30729) Build Identifier: WinCE build tool wrappers located under build\wince\tools lose the first argument passed to the actual EXEs. For example arm-wince-res.c passes an additional include directory to rc.exe, which gets lost, causing "cannot find resdefce.h" compile error. Reproducible: Always Steps to Reproduce: Try to compile a .rc resource file, which includes resdefce.h.
Blocks: 502933
OS: Other → Windows CE
Hardware: Other → ARM
Version: unspecified → Trunk
Attached patch Suggested fix (obsolete) — Splinter Review
Current implementation of the compile tools execution using CreateProcess completely loses the first argument passed to those tools. This article describes the issue: http://support.microsoft.com/kb/175986 We have the case #3 from the article running the tools this way: CreateProcess( "c:\\MyApp.exe", "Param1 Param2 Param3", ...) In this case the arguments passed to the process are: argv[0] == "Param1" argv[1] == "Param2" argv[2] == "Param3" while normally argv[0] should contain the application name, and all the arguments should start from argv[1]. The suggested fix is to put the whole command line into the second argument of CreateProcess. It seems to work properly. This change also showed a bug in arm-wince-as.c, where the first argument for armasm.exe was wrong. This is fixed by the patch as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → alex.mozilla
Attachment #392857 - Flags: review?(bugmail)
Comment on attachment 392857 [details] [diff] [review] Suggested fix >- args[i++] = "-I\"" WCE_INC "\""; >+ args[i++] = "-I \"" WCE_INC "\""; why this change? please add a comment
Attachment #392857 - Flags: review?(bugmail) → review+
It would be nice to understand what argument(s) our build tools were dropping because of this bug.
The arguments dropped were usually additional include directories, which are rarely used - that's why it was not noticed before.
Attached patch Suggested fixSplinter Review
Added comments describing the changes.
Attachment #392857 - Attachment is obsolete: true
Attachment #399825 - Flags: review?(bugmail)
Attachment #399825 - Flags: review?(bugmail) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #399825 - Flags: approval1.9.2? → approval1.9.2+
No longer blocks: 502933
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: