Re: DJGPP used in cc task, Dos 126-characters limit ?
Curt Arnold <[email protected]> Fri, 1 Feb 2008 01:32:22 -0600
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
On Jan 31, 2008, at 7:33 PM, mingw wrote:
>
> All,
>
> When I use DJGPP's gcc to be the compiler of cc task, it can not
> process the
> long command line.
> As I know, DJGPP's make can process it. But I just want to use gcc to
> compile the c source files.
>
> <target name='debug' depends='init' description="Build all source
> to get
> library out">
> <mkdir dir="${build.dir}/objs_d"/>
> <cc name="${cc}" objdir="${build.dir}/objs_d" outfile="test"
> outtype="static">
> <compiler extends="${cc}-compiler">
> <includepath location="${proj.root}/include"/>
> <includepath location="${proj.root}/include/rtos/include"/>
> <includepath location="${proj.root}/include/openssl/inc32"/>
> <defineset>
> <define name="SHORT_PACKET"/>
> <define name="DEBUG_ENABLE"/>
> <define name="CPU_64BITS" if="is-64bits"/>
> </defineset>
> <compilerarg value="-g3"/>
> <compilerarg value="-Os"/>
> </compiler>
> <linker refid="${cc}-linker"/>
> <fileset dir="${proj.root}/src" includes="*.c"/>
> </cc>
> </target>
>
> The generated command line will exceed 126 characters. Ant will
> report error
> 87, Could not launch gcc.
> If I reduce some macros and include paths, then it will work.
>
> Any help would be appreciated.
> Best regards,
> Ming
>
>
This mentions the 126 character limit: http://www.delorie.com/djgpp/doc/eli-m17n99.html
Looks like the best approach would be to create a DJGPP compiler
adapter based off of one of the Gcc's and to use the response file
approach. I'm going back into cpptasks in the next few days and I
could likely take a shot at it.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/