Bug 46617 - support for "source" attribute for javac with build.compiler=gcj
Summary: support for "source" attribute for javac with build.compiler=gcj
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.7.1
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2009-01-28 03:58 UTC by Paweł Zuzelski
Modified: 2009-01-28 21:24 UTC (History)
1 user (show)



Attachments
support for "source" attribute for javac with build.compiler=gcj (555 bytes, patch)
2009-01-28 03:58 UTC, Paweł Zuzelski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Zuzelski 2009-01-28 03:58:09 UTC
Created attachment 23186 [details]
support for "source" attribute for javac with build.compiler=gcj

When build.compiler is set to gcj, ant ignores "source" attribute, so it is not possible to compile code compatibile with java < 1.5 with gcj using ant.

I have attached a simple patch for ant-1.7.1 sources that fixes it. Please consider applying this patch to ant sources.
Comment 1 Stefan Bodewig 2009-01-28 08:50:13 UTC
Do you know which version of gcj was/is the first to support -source?
Comment 2 Paweł Zuzelski 2009-01-28 08:53:59 UTC
(In reply to comment #1)
> Do you know which version of gcj was/is the first to support -source?
> 

No, I don't know. I use 4.3.2.

BTW in gcj it is "-fsource" not "-source"
Comment 3 Paweł Zuzelski 2009-01-28 09:17:05 UTC
(In reply to comment #1)
> Do you know which version of gcj was/is the first to support -source?
> 

If I understand gcc/java/ChangeLog correctly, this "-fsource" option was introduced 2006-06-04. That means the first release that supports this option is GCC 4.0.4. But I am not sure.
Comment 4 Stefan Bodewig 2009-01-28 21:24:30 UTC
committed as svn revision 738761

I've also added support for -ftarget while I was at it.