⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install

📁 早期freebsd实现
💻
📖 第 1 页 / 共 4 页
字号:
     you installed it, by specifying the Make variable `prefix' or     `libdir', specify it the same way in this command.     Note that some systems are starting to come with ANSI C system     header files.  On these systems, don't run `install-fixincludes';     it may not work, and is certainly not necessary.  One exception:     there are is a special script for System V release 4, which you     should run.     It is not the purpose of `install-fixincludes' to add prototypes to     the system header files.  We support headers with ANSI C     prototypes in the GNU C Library, and we have no time to support     adding them to other systems' header files. 14. If you're going to use C++, it's likely that you need to also     install the `libg++' distribution.  It should be available from     the same place where you got the GCC distribution.  Just as GCC     does not distribute a C runtime library, it also does not include     a C++ run-time library.  All I/O functionality, special class     libraries, etc., are available in the `libg++' distribution.   If you cannot install the compiler's passes and run-time support in`/usr/local/lib', you can alternatively use the `-B' option to specifya prefix by which they may be found.  The compiler concatenates theprefix with the names  `cpp', `cc1' and `libgcc.a'. Thus, you can putthe files in a directory `/usr/foo/gcc' and specify `-B/usr/foo/gcc/'when you run GNU CC.   Also, you can specify an alternative default directory for thesefiles by setting the Make variable `libdir' when you make GNU CC.Compilation in a Separate Directory====================================   If you wish to build the object files and executables in a directoryother than the one containing the source files, here is what you mustdo differently:  1. Make sure you have a version of Make that supports the `VPATH'     feature.  (GNU Make supports it, as do Make versions on most BSD     systems.)  2. If you have ever run `configure' in the source directory, you must     undo the configuration.  Do this by running:          make distclean  3. Go to the directory in which you want to build the compiler before     running `configure':          mkdir gcc-sun3          cd gcc-sun3     On systems that do not support symbolic links, this directory must     be on the same file system as the source code directory.  4. Specify where to find `configure' when you run it:          ../gcc/configure ...     This also tells `configure' where to find the compiler sources;     `configure' takes the directory from the file name that was used to     invoke it.  But if you want to be sure, you can specify the source     directory with the `--srcdir' option, like this:          ../gcc/configure --srcdir=../gcc sun3     The directory you specify with `--srcdir' need not be the same as     the one that `configure' is found in.   Now, you can run `make' in that directory.  You need not repeat theconfiguration steps shown above, when ordinary source files change.  Youmust, however, run `configure' again when the configuration fileschange, if your system does not support symbolic links.Building and Installing a Cross-Compiler=========================================   GNU CC can function as a cross-compiler for many machines, but notall.   * Cross-compilers for the Mips as target do not work because the     auxiliary programs `mips-tdump.c' and `mips-tfile.c' can't be     compiled on anything but a Mips.   * Cross-compilers to or from the Vax probably don't work completely     because the Vax uses an incompatible floating point format (not     IEEE format).   Since GNU CC generates assembler code, you probably need across-assembler that GNU CC can run, in order to produce object files.If you want to link on other than the target machine, you need across-linker as well.  You also need header files and libraries suitablefor the target machine that you can install on the host machine.   To build GNU CC as a cross-compiler, you start out by running`configure'.  You must specify two different configurations, the hostand the target.  Use the `--host=HOST' option for the host and`--target=TARGET' to specify the target type.  For example, here is howto configure for a cross-compiler that runs on a hypothetical Intel 386system and produces code for an HP 68030 system running BSD:     configure --target=m68k-hp-bsd4.3 --host=i386-bozotheclone-bsd4.3   Next you should install the cross-assembler and cross-linker (and`ar' and `ranlib').  Put them in the directory `/usr/local/TARGET/bin'. The installation of GNU CC will find them there and copy or link themto the proper place to find them when you run the cross-compiler later.   If you want to install any additional libraries to use with thecross-compiler, put them in the directory `/usr/local/TARGET/lib'; allfiles in that subdirectory will be installed in the proper place whenyou install the cross-compiler. Likewise, put the header files for thetarget machine in `/usr/local/TARGET/include'.   You must now produce a substitute for `libgcc1.a'.  Normally thisfile is compiled with the "native compiler" for the target machine;compiling it with GNU CC does not work.  But compiling it with the hostmachine's compiler also doesn't work--that produces a file that wouldrun on the host, and you need it to run on the target.   We can't give you any automatic way to produce this substitute.  Forsome targets, the subroutines in `libgcc1.c' are not actually used. Youneed not provide the ones that won't be used.  The ones that mostcommonly are used are the multiplication, division and remainderroutines--many RISC machines rely on the library for this.  One way tomake them work is to define the appropriate `perform_...' macros forthe subroutines that you need.  If these definitions do not use the Carithmetic operators that they are meant to implement, you might beable to compile them with the cross-compiler you are building. To dothis, specify `LIBGCC1=libgcc1.a OLDCC=./xgcc' when building thecompiler.   Now you can proceed just as for compiling a single-machine compilerthrough the step of building stage 1.  If you have not provided somesort of `libgcc1.a', then compilation will give up at the point whereit needs that file, printing a suitable error message.  If you doprovide `libgcc1.a', then building the compiler will automaticallycompile and link a test program called `cross-test'; if you get errorsin the linking, it means that not all of the necessary routines in`libgcc1.a' are available.   When you are using a cross-compiler configuration, building stage 1does not compile all of GNU CC.  This is because one part of building,the compilation of `libgcc2.c', requires use of the cross-compiler.   However, when you type `make install' to install the bulk of thecross-compiler, that will also compile `libgcc2.c' and install theresulting `libgcc.a'.   Do not try to build stage 2 for a cross-compiler.  It doesn't work torebuild GNU CC as a cross-compiler using the cross-compiler, becausethat would produce a program that runs on the target machine, not on thehost.  For example, if you compile a 386-to-68030 cross-compiler withitself, the result will not be right either for the 386 (because it wascompiled into 68030 code) or for the 68030 (because it was configuredfor a 386 as the host).  If you want to compile GNU CC into 68030 code,whether you compile it on a 68030 or with a cross-compiler on a 386, youmust specify a 68030 as the host when you configure it.Installing GNU CC on the HP Precision Architecture===================================================   There are two variants of this CPU, called 1.0 and 1.1, which havedifferent machine descriptions.  You must use the right one for yourmachine.  All 7NN machines and 8N7 machines use 1.1, while all other8NN machines use 1.0.   The easiest way to handle this problem is to use `configure hpNNN'or `configure hpNNN-hpux', where NNN is the model number of themachine.  Then `configure' will figure out if the machine is a 1.0 or1.1.  Use `uname -a' to find out the model number of your machine.   `-g' does not work on HP-UX, since that system uses a peculiardebugging format which GNU CC does not know about.  There arepreliminary versions of GAS and GDB for the HP-PA which do work withGNU CC for debugging.  You can get them by anonymous ftp from`jaguar.cs.utah.edu' `dist' subdirectory.  You would need to installGAS in the file     /usr/local/lib/gcc-lib/CONFIGURATION/GCCVERSION/aswhere CONFIGURATION is the configuration name (perhaps `hpNNN-hpux')and GCCVERSION is the GNU CC version number.  Do this *before* startingthe build process, otherwise you will get errors from the HPUXassembler while building `libgcc2.a'.  The command     make install-dirwill create the necessary directory hierarchy so you can install GASbefore building GCC.   If you obtained GAS before October 6, 1992 it is highly recommendedyou get a new one to avoid several bugs which have been discoveredrecently.   To enable debugging, configure GNU CC with the `--gas' option beforebuilding.Installing GNU CC on the Sun=============================   Make sure the environment variable `FLOAT_OPTION' is not set whenyou compile `libgcc.a'.  If this option were set to `f68881' when`libgcc.a' is compiled, the resulting code would demand to be linkedwith a special startup file and would not link properly without specialpains.   There is a bug in `alloca' in certain versions of the Sun library.To avoid this bug, install the binaries of GNU CC that were compiled byGNU CC.  They use `alloca' as a built-in function and never the one inthe library.   Some versions of the Sun compiler crash when compiling GNU CC.  Theproblem is a segmentation fault in cpp.  This problem seems to be due tothe bulk of data in the environment variables.  You may be able to avoidit by using the following command to compile GNU CC with Sun CC:     make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"Installing GNU CC on the 3b1=============================   Installing GNU CC on the 3b1 is difficult if you do not already haveGNU CC running, due to bugs in the installed C compiler.  However, thefollowing procedure might work.  We are unable to test it.  1. Comment out the `#include "config.h"' line on line 37 of `cccp.c'     and do `make cpp'.  This makes a preliminary version of GNU cpp.  2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to that     file name.  3. Undo your change in `cccp.c', or reinstall the original version,     and do `make cpp' again.  4. Copy this final version of GNU cpp into `/lib/cpp'.  5. Replace every occurrence of `obstack_free' in the file `tree.c'     with `_obstack_free'.  6. Run `make' to get the first-stage GNU CC.  7. Reinstall the original version of `/lib/cpp'.  8. Now you can compile GNU CC with itself and install it in the normal     fashion.Installing GNU CC on Unos==========================   Use `configure unos' for building on Unos.   The Unos assembler is named `casm' instead of `as'.  For somestrange reason linking `/bin/as' to `/bin/casm' changes the behavior,and does not work.  So, when installing GNU CC, you should install thefollowing script as `as' in the subdirectory where the passes of GCCare installed:     #!/bin/sh     casm $*   The default Unos library is named `libunos.a' instead of `libc.a'. To allow GNU CC to function, either change all references to `-lc' in`gcc.c' to `-lunos' or link `/lib/libc.a' to `/lib/libunos.a'.   When compiling GNU CC with the standard compiler, to overcome bugs inthe support of `alloca', do not use `-O' when making stage 2. Then usethe stage 2 compiler with `-O' to make the stage 3 compiler.  Thiscompiler will have the same characteristics as the usual stage 2compiler on other systems.  Use it to make a stage 4 compiler andcompare that with stage 3 to verify proper compilation.   (Perhaps simply defining `ALLOCA' in `x-crds' as described in thecomments there will make the above paragraph superfluous.  Pleaseinform us of whether this works.)   Unos uses memory segmentation instead of demand paging, so you willneed a lot of memory.  5 Mb is barely enough if no other tasks arerunning. If linking `cc1' fails, try putting the object files into alibrary and linking from that library.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -