Bug 46617

Summary: support for "source" attribute for javac with build.compiler=gcj
Product: Ant Reporter: Paweł Zuzelski <pzz>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: RESOLVED FIXED    
Severity: enhancement CC: notifications
Priority: P2 Keywords: PatchAvailable
Version: 1.7.1   
Target Milestone: 1.8.0   
Hardware: All   
OS: All   
Attachments: support for "source" attribute for javac with build.compiler=gcj

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.