* Cross-Compilation to C64x+ Architecture
@ 2012-06-04 0:57 David Akodes
2012-06-04 4:19 ` Georg-Johann Lay
0 siblings, 1 reply; 3+ messages in thread
From: David Akodes @ 2012-06-04 0:57 UTC (permalink / raw)
To: gcc-help
Hello,
My objective is to cross-compile on my own system a program for the
C64x+ architecture. As per the document
http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/C6X-Options.html#C6X-Options
I am using the command
gcc test.c -march=c64x+
However, this fails and I receive the error message:
gcc: error: unrecognized argument in option â-march=c64x+â
gcc: note: valid arguments to â-march=â are: armv2 armv2a armv3 armv3m
armv4 arm
v4t armv5 armv5e armv5t armv5te armv6
armv6-m armv6j armv6k armv6s-m armv6t2 arm
v6z armv6zk
armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
My test.c file is simply
#include <stdio.h>
int main()
{
printf("Hello World\n");
}
Does anyone know why this may be happening and what I must do to
correct this issue? Any and all help is very much appreciated.
Thanks very much.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Cross-Compilation to C64x+ Architecture
2012-06-04 0:57 Cross-Compilation to C64x+ Architecture David Akodes
@ 2012-06-04 4:19 ` Georg-Johann Lay
2012-06-11 14:35 ` Kai Ruottu
0 siblings, 1 reply; 3+ messages in thread
From: Georg-Johann Lay @ 2012-06-04 4:19 UTC (permalink / raw)
To: David Akodes; +Cc: gcc-help
David Akodes schrieb:
> Hello,
>
> My objective is to cross-compile on my own system a program for the
> C64x+ architecture. As per the document
>
> http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/C6X-Options.html#C6X-Options
>
> I am using the command
>
> gcc test.c -march=c64x+
>
> However, this fails and I receive the error message: [...]
The naming for a cross compiler to compile for that hardware would be
c6x-gcc
"gcc" is a native compiler. In your case it appears you are working on
an ARM host, thus "gcc" will compile on ARM for ARM.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Cross-Compilation to C64x+ Architecture
2012-06-04 4:19 ` Georg-Johann Lay
@ 2012-06-11 14:35 ` Kai Ruottu
0 siblings, 0 replies; 3+ messages in thread
From: Kai Ruottu @ 2012-06-11 14:35 UTC (permalink / raw)
To: gcc-help
4.6.2012 7:17, Georg-Johann Lay kirjoitti:
> David Akodes schrieb:
>> My objective is to cross-compile on my own system a program for the
>> C64x+ architecture.
>>
>> I am using the command
>>
>> gcc test.c -march=c64x+
>>
>> However, this fails and I receive the error message: [...]
>
> The naming for a cross compiler to compile for that hardware would be
>
> c6x-gcc
>
> "gcc" is a native compiler. In your case it appears you are working on
> an ARM host, thus "gcc" will compile on ARM for ARM.
Maybe there is a cross GCC for ARM and its GCC-driver named as 'gcc'?
In any case mentioning the development platform could help, at least
if wondering whether there is a prebuilt GCC for the target in question
and for that development host. For instance for Fedora 17 Linux, i686
and x86_64 variations, there seems to be, like :
[root@HP-Pavilion bin]# ./c6x-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=./c6x-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/kai/temp/usr/bin/../libexec/gcc/c6x-uclinux/4.7.0/lto-wrapper
Target: c6x-uclinux
Configured with: ../gcc-4.7.0/configure --disable-dependency-tracking
--disable-silent-rules --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=i686-redhat-linux-gnu
--host=i686-redhat-linux-gnu --target=c6x-uclinux --enable-targets=all
--program-prefix=c6x-linux-gnu- --enable-languages=c --without-headers
--enable-sjlj-exceptions --with-system-libunwind --disable-nls
--disable-threads --disable-shared --disable-libmudflap --disable-libssp
--disable-libgomp --disable-libquadmath --disable-gold
--disable-decimal-float --enable-checking= --enable-gnu-unique-object
--enable-linker-build-id --disable-plugin --enable-nls
--with-system-zlib --with-bugurl=http://bugzilla.redhat.com/bugzilla/
--enable-obsolete
Thread model: single
gcc version 4.7.0 20120322 (Red Hat 4.7.0-1) (GCC)
(the i686 host one). This was downloaded from :
http://pkgs.org/fedora-17/fedora-updates-testing-i386/gcc-c6x-linux-gnu-4.7.0-1.fc17.i686.rpm/download/
and produces code for 'c6x-uclinux' as can be seen. Another target
choice could be 'tic6x-elf' or 'c6x-elf', the 'c6x' is recognized
as 'tic6x' :
[root@HP-Pavilion gcc-4.7.0]# ./config.sub c6x-uclinux
tic6x-unknown-uclinux
[root@HP-Pavilion gcc-4.7.0]# ./config.sub c6x-elf
tic6x-unknown-elf
With the bare CPU name the chosen target (object format) will be :
[root@HP-Pavilion gcc-4.7.0]# ./config.sub c6x
tic6x-unknown-coff
Building from sources is possible but maybe it could be recommended
one to see a cross compiler before trying to build such, just as it
would be recommended to see and use a car before trying to build one :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-11 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04 0:57 Cross-Compilation to C64x+ Architecture David Akodes
2012-06-04 4:19 ` Georg-Johann Lay
2012-06-11 14:35 ` Kai Ruottu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).