Article View: gnu.gcc.help
Article #41479Re: gcc on AIX: how to get code running on both POWER and PowerPC?
From: Michael Meissner
Date: Wed, 20 Mar 1996 00:00
Date: Wed, 20 Mar 1996 00:00
37 lines
2371 bytes
2371 bytes
In article <4iodhi$8al@romeo.logica.co.uk> jjk@lbvrtda.logica.com (JJ Keijser) writes: | In article <4in99a$6km@aiscube.ais-gmbh.de>, | arndt@aiscube.ais-gmbh.de (Arndt Schoenewald) wrote: | >We have a small IBM workstation running AIX 4.1; the script `config.guess' | >which comes with gcc calls it a "powerpc-ibm-aix4.1.4.0". On this machine | >we have gcc version 2.7.2 and it works very well; however, the executables | >produced by it dump core (illegal instruction) a when run on other AIX | >machines. | > | >I assume that gcc generates code using instructions that are specific to | >the PowerPC, and the compiler switch `-mcpu=common' should probably be | >used to remedy this. However, since it is easy to forget this switch | >(e.g. when compiling small programs without a makefile), I would prefer | >to install gcc so that it generates common code by default. | | the gcc config program causes gcc to compile code for the platform on which it | is running. Check the docs on how to setup cross-compile options. It *might* | be the case that you're using instructions that the other boxes can't handle; I didn't see the original post at my site. Gcc 2.8 whenever it comes out will default to -mcpu=common for AIX 4.1. In the meantime, you can: 1) mv the gcc cover program to something like gcc.real, and then write a shell script called gcc that invokes gcc.real, adding -mcpu=common. 2) Edit config/rs6000/aix41.h, and add: #undef TARGET_DEFAULT #define TARGET_DEFAULT 0 and rebuild gcc (make sure that toplev.o gets rebuilt). -- Michael Meissner, Cygnus Support (East Coast) Suite 105, 48 Grove Street, Somerville, MA 02144, USA meissner@cygnus.com, 617-629-3016 (office), 617-629-3010 (fax)
Technical Details
Message-ID:
<sypwa7wi7k.fsf@tiktok.cygnus.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<4in99a$6km@aiscube.ais-gmbh.de> <4iodhi$8al@romeo.logica.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,2f7970c7111b212f X-Google-Attributes: gid11318c,public X-Google-Thread: 115614,2f7970c7111b212f X-Google-Attributes: gid115614,public From: meissner@cygnus.com (Michael Meissner) Subject: Re: gcc on AIX: how to get code running on both POWER and PowerPC? Date: 1996/03/20 Message-ID: <sypwa7wi7k.fsf@tiktok.cygnus.com> X-Deja-AN: 143391002 sender: meissner@tiktok.cygnus.com references: <4in99a$6km@aiscube.ais-gmbh.de> <4iodhi$8al@romeo.logica.co.uk> organization: Cygnus Support newsgroups: gnu.gcc.help,comp.unix.aix