From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Evans To: "Moore, Jason" Cc: "'JAY LULLA'" , crossgcc@sourceware.cygnus.com, gcc-help@gcc.gnu.org Subject: RE: Installing cross-compiler for PowerPC 603, pSOS Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <14463.37927.758174.322793@casey.transmeta.com> References: <200001142049.PAA24692@hoover.gilbarco.com> X-SW-Source: 2000-q1/msg00133.html Message-ID: <20000401000000.CapuyZHUDmku8kDk3hiTugwxyN7_hdIfKJmJmY-OuHE@z> Moore, Jason writes: > >Here are some issues I need to address: > >- should the cross-compiler be installed in the same dir as the native > >compiler, and then be called with a special flag, or should it be > >installed in a whole new directory altogether? > > I believe that it has to me installed in a separate directory, but I am not > sure. Everything I have read suggest that you must have 2 separate > compilers. One native, and one cross. One solution is to create a script > that can determine which version to use. They _can_ be installed in the same directory (if by same directory you mean same value for --prefix). gcc for the native host is named "gcc". gcc for the target by default is named "${target_alias}-gcc". > You can install binutils in the same place as your other binutils, where > "ld" currently sits, but you must be sure to configure it for both your > target and host emulation modes, or else you'll have a linker that only does > one or the other. Running the binutils "configure" with the > "--enable-targets='target','host'" will accomplish this. Methinks you've got things confused a tad. There's no need to specify --enable-targets for the task at hand. Certainly you don't need a linker that handles both host and target. As with gcc, non-native versions of as,ld,objdump,etc. get installed as ${target_alias}-{ad,ld,objdump,etc.}. e.g. if you've configured binutils for powerpc-eabi then you'll get powerpc-eabi-ld, etc. Note however that these versions of as,ld are not what gcc uses. ${target_alias}-ld is for the user should s/he ever want to call it directly. A copy of the target linker is installed in (assuming prefix specified and exec-prefix isn't) $prefix/$target_alias/bin, and this is what gcc uses.