1

I am trying to cross-compile some code for an i.mx51 platform. I am using gcc provided by freescale for the platform, see below:

user@:/media/sf_repos/1109$ /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc --version

arm-none-linux-gnueabi-gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The makefile which I am using utilizes the @ flag which is available in GCC.

@FILE                       Read options from FILE

But using the provided gcc and using @FILE to point to my commands file, I get:

arm-none-linux-gnueabi-gcc: @hello.o_command: No such file or directory
arm-none-linux-gnueabi-gcc: no input files

(I know that this question may be too specific) Does anyone have any idea about this issue? In the -v --help I can see that @FILE is mentioned so it should be supported!

Clifford
  • 88,407
  • 13
  • 85
  • 165
theAlse
  • 5,577
  • 11
  • 68
  • 110
  • Can you post a workable segment of the Makefile which causes this error? Or can you create a test where you manually enter a gcc commandline for compiling a trivial test file by this method, and it works when you use the host gcc but not the cross gcc? – Chris Stratton Dec 17 '13 at 15:53
  • I think this question is similar to http://stackoverflow.com/questions/7139685/does-gcc-support-command-files – Yousf Dec 17 '13 at 15:54
  • 1
    Almost the same question http://stackoverflow.com/questions/15106937/do-all-gcc-versions-support-gccs-file-option – auselen Dec 17 '13 at 15:55
  • @Yousf - related definitely, but perhaps not precluded by, since that question doesn't seem to address details / difficulties of doing so, or universality of support. – Chris Stratton Dec 17 '13 at 15:57
  • I made a local test and it looks like actually `@hello.o_command` works but what is specified inside is not accessible. – auselen Dec 17 '13 at 15:58
  • Just putting -v in a text file and specifying that with @ and no other arguments seems to produce the usual output of that flag when used with a bare metal arm 4.7.3 gcc. If I instead use an empty text file, I get the usual 'fatal error: no input files' received when gcc is invoked with no arguments whatsoever. – Chris Stratton Dec 17 '13 at 16:00

1 Answers1

0

OK, I managed to find the answer myself.

@ was introduced in gcc 4.2.1. See the documentation.

So my compiler which is based on gcc 4.1.2 does not support it.

theAlse
  • 5,577
  • 11
  • 68
  • 110