Bug 29772 - using @sourcelist-file leads to wrong flag creation
Summary: using @sourcelist-file leads to wrong flag creation
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-08 21:53 UTC by Marco Trudel
Modified: 2006-11-08 21:55 UTC (History)
2 users (show)

See Also:
Host: independent
Target: independent
Build: independent
Known to work:
Known to fail:
Last reconfirmed:


Attachments
A sample source file (108 bytes, text/plain)
2006-11-08 21:54 UTC, Marco Trudel
Details
A second sample source file (109 bytes, text/plain)
2006-11-08 21:54 UTC, Marco Trudel
Details
The list for the source files (40 bytes, text/plain)
2006-11-08 21:55 UTC, Marco Trudel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Trudel 2006-11-08 21:53:16 UTC
Create a dir named "foo bar". Put the attached HelloWorld.java, HelloWorld2.java and source.txt in it. source.txt has this two lines:
foo\ bar/HelloWorld.java
foo\ bar/HelloWorld2.java

Change to the parent folder and type:
gcj --main=HelloWorld -o HelloWorld @"foo bar/source.txt"

It will fail with:
foo:0: warning: duplicate class will only be compiled once
fatal error: can't open foo: No such file or directory
compilation terminated.

It will work when:
- -o is omitted
- the space between -o and HelloWorld is removed:
gcj --main=HelloWorld -oHelloWorld @"foo bar/source.txt"
- the files in source.txt have no spaces
- when only one file is in source.txt (with spaces)
Comment 1 Marco Trudel 2006-11-08 21:54:25 UTC
Created attachment 12570 [details]
A sample source file
Comment 2 Marco Trudel 2006-11-08 21:54:49 UTC
Created attachment 12571 [details]
A second sample source file
Comment 3 Marco Trudel 2006-11-08 21:55:04 UTC
Created attachment 12572 [details]
The list for the source files