From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15015 invoked by alias); 11 Jun 2012 14:35:33 -0000 Received: (qmail 14869 invoked by uid 22791); 11 Jun 2012 14:35:31 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_IB,TW_JL X-Spam-Check-By: sourceware.org Received: from wmh1.mail.saunalahti.fi (HELO wmh1.mail.saunalahti.fi) (62.142.5.133) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jun 2012 14:34:59 +0000 Received: from [192.168.0.43] (dsl-kmibrasgw1-fec7f800-208.dhcp.inet.fi [84.248.199.208]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kai.ruottu@wippies.com) by wmh1.mail.saunalahti.fi (Postfix) with ESMTPSA id CB5281FC074 for ; Mon, 11 Jun 2012 17:34:57 +0300 (EEST) Message-ID: <4FD60321.2030308@wippies.com> Date: Mon, 11 Jun 2012 14:35:00 -0000 From: Kai Ruottu User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Cross-Compilation to C64x+ Architecture References: <4FCC36E7.2030600@gcc.gnu.org> In-Reply-To: <4FCC36E7.2030600@gcc.gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00099.txt.bz2 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 :-)