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

📄 gcc.texi

📁 GUN开源阻止下的编译器GCC
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
If you use the 1.31 version of the MIPS assembler (such as was shippedwith Ultrix 3.1), you will need to use the -fno-delayed-branch switchwhen optimizing floating point code.  Otherwise, the assembler willcomplain when the GCC compiler fills a branch delay slot with afloating point instruction, such as @code{add.d}.@itemIf on a MIPS system you get an error message saying ``does not have gpsections for all it's [sic] sectons [sic]'', don't worry about it.  Thishappens whenever you use GAS with the MIPS linker, but there is notreally anything wrong, and it is okay to use the output file.  You canstop such warnings by installing the GNU linker.It would be nice to extend GAS to produce the gp tables, but they areoptional, and there should not be a warning about their absence.@itemIn Ultrix 4.0 on the MIPS machine, @file{stdio.h} does not work with GNUCC at all unless it has been fixed with @code{fixincludes}.  This causesproblems in building GNU CC.  Once GNU CC is installed, the problems goaway.To work around this problem, when making the stage 1 compiler, specifythis option to Make:@exampleGCC_FOR_TARGET="./xgcc -B./ -I./include"@end exampleWhen making stage 2 and stage 3, specify this option:@exampleCFLAGS="-g -I./include"@end example@itemUsers have reported some problems with version 2.0 of the MIPScompiler tools that were shipped with Ultrix 4.1.  Version 2.10which came with Ultrix 4.2 seems to work fine.Users have also reported some problems with version 2.20 of theMIPS compiler tools that were shipped with RISC/os 4.x.  The earlierversion 2.11 seems to work fine.@itemSome versions of the MIPS linker will issue an assertion failurewhen linking code that uses @code{alloca} against sharedlibraries on RISC-OS 5.0, and DEC's OSF/1 systems.  This is a bugin the linker, that is supposed to be fixed in future revisions.To protect against this, GNU CC passes @samp{-non_shared} to thelinker unless you pass an explicit @samp{-shared} or@samp{-call_shared} switch.@itemOn System V release 3, you may get this error messagewhile linking:@smallexampleld fatal: failed to write symbol name @var{something}  in strings table for file @var{whatever}@end smallexampleThis probably indicates that the disk is full or your ULIMIT won't allowthe file to be as large as it needs to be.This problem can also result because the kernel parameter @code{MAXUMEM}is too small.  If so, you must regenerate the kernel and make the valuemuch larger.  The default value is reported to be 1024; a value of 32768is said to work.  Smaller values may also work.@itemOn System V, if you get an error like this,@example/usr/local/lib/bison.simple: In function `yyparse':/usr/local/lib/bison.simple:625: virtual memory exhausted@end example@noindentthat too indicates a problem with disk space, ULIMIT, or @code{MAXUMEM}.@itemCurrent GNU CC versions probably do not work on version 2 of the NeXToperating system.@itemOn NeXTStep 3.0, the Objective C compiler does not work, due,apparently, to a kernel bug that it happens to trigger.  This problemdoes not happen on 3.1.@itemOn the Tower models 4@var{n}0 and 6@var{n}0, by default a process is notallowed to have more than one megabyte of memory.  GNU CC cannot compileitself (or many other programs) with @samp{-O} in that much memory.To solve this problem, reconfigure the kernel adding the following lineto the configuration file:@smallexampleMAXUMEM = 4096@end smallexample@itemOn HP 9000 series 300 or 400 running HP-UX release 8.0, there is a bugin the assembler that must be fixed before GNU CC can be built.  Thisbug manifests itself during the first stage of compilation, whilebuilding @file{libgcc2.a}:@smallexample_floatdisfcc1: warning: `-g' option not supported on this version of GCCcc1: warning: `-g1' option not supported on this version of GCC./xgcc: Internal compiler error: program as got fatal signal 11@end smallexampleA patched version of the assembler is available by anonymous ftp from@code{altdorf.ai.mit.edu} as the file@file{archive/cph/hpux-8.0-assembler}.  If you have HP software support,the patch can also be obtained directly from HP, as described in thefollowing note:@quotationThis is the patched assembler, to patch SR#1653-010439, where theassembler aborts on floating point constants.The bug is not really in the assembler, but in the shared libraryversion of the function ``cvtnum(3c)''.  The bug on ``cvtnum(3c)'' isSR#4701-078451.  Anyway, the attached assembler uses the archivelibrary version of ``cvtnum(3c)'' and thus does not exhibit the bug.@end quotationThis patch is also known as PHCO_4484.@itemOn HP-UX version 8.05, but not on 8.07 or more recent versions,the @code{fixproto} shell script triggers a bug in the system shell.If you encounter this problem, upgrade your operating system oruse BASH (the GNU shell) to run @code{fixproto}.@itemSome versions of the Pyramid C compiler are reported to be unable tocompile GNU CC.  You must use an older version of GNU CC forbootstrapping.  One indication of this problem is if you get a crashwhen GNU CC compiles the function @code{muldi3} in file @file{libgcc2.c}.You may be able to succeed by getting GNU CC version 1, installing it,and using it to compile GNU CC version 2.  The bug in the Pyramid Ccompiler does not seem to affect GNU CC version 1.@itemThere may be similar problems on System V Release 3.1 on 386 systems.@itemOn the Intel Paragon (an i860 machine), if you are using operatingsystem version 1.0, you will get warnings or errors about redefinitionof @code{va_arg} when you build GNU CC.If this happens, then you need to link most programs with the library@file{iclib.a}.  You must also modify @file{stdio.h} as follows: beforethe lines@example#if     defined(__i860__) && !defined(_VA_LIST)#include <va_list.h>@end example@noindentinsert the line@example#if __PGC__@end example@noindentand after the lines@exampleextern int  vprintf(const char *, va_list );extern int  vsprintf(char *, const char *, va_list );#endif@end example@noindentinsert the line@example#endif /* __PGC__ */@end exampleThese problems don't exist in operating system version 1.1.@itemOn the Altos 3068, programs compiled with GNU CC won't work unless youfix a kernel bug.  This happens using system versions V.2.2 1.0gT1 andV.2.2 1.0e and perhaps later versions as well.  See the file@file{README.ALTOS}.@itemYou will get several sorts of compilation and linking errors on thewe32k if you don't follow the special instructions.  @xref{Configurations}.@itemA bug in the HP-UX 8.05 (and earlier) shell will cause the fixprotoprogram to report an error of the form:@example./fixproto: sh internal 1K buffer overflow@end exampleTo fix this, change the first line of the fixproto script to look like:@example#!/bin/ksh@end example@end itemize@node Cross-Compiler Problems@section Cross-Compiler ProblemsYou may run into problems with cross compilation on certain machines,for several reasons.@itemize @bullet@itemCross compilation can run into trouble for certain machines becausesome target machines' assemblers require floating point numbers to bewritten as @emph{integer} constants in certain contexts.The compiler writes these integer constants by examining the floatingpoint value as an integer and printing that integer, because this issimple to write and independent of the details of the floating pointrepresentation.  But this does not work if the compiler is running ona different machine with an incompatible floating point format, oreven a different byte-ordering.In addition, correct constant folding of floating point valuesrequires representing them in the target machine's format.(The C standard does not quite require this, but in practiceit is the only way to win.)It is now possible to overcome these problems by defining macros suchas @code{REAL_VALUE_TYPE}.  But doing so is a substantial amount ofwork for each target machine.@ifset INTERNALS@xref{Cross-compilation}.@end ifset@ifclear INTERNALS@xref{Cross-compilation,,Cross Compilation and Floating Point Format,gcc.info, Using and Porting GCC}.@end ifclear@itemAt present, the program @file{mips-tfile} which adds debugsupport to object files on MIPS systems does not work in a crosscompile environment.@end itemize@node Interoperation@section InteroperationThis section lists various difficulties encountered in using GNU C orGNU C++ together with other compilers or with the assemblers, linkers,libraries and debuggers on certain systems.@itemize @bullet@itemObjective C does not work on the RS/6000.@itemGNU C++ does not do name mangling in the same way as other C++compilers.  This means that object files compiled with one compilercannot be used with another.This effect is intentional, to protect you from more subtle problems.Compilers differ as to many internal details of C++ implementation,including: how class instances are laid out, how multiple inheritance isimplemented, and how virtual function calls are handled.  If the nameencoding were made the same, your programs would link against librariesprovided from other compilers---but the programs would then crash whenrun.  Incompatible libraries are then detected at link time, rather thanat run time.@itemOlder GDB versions sometimes fail to read the output of GNU CC version2.  If you have trouble, get GDB version 4.4 or later.@item@cindex DBXDBX rejects some files produced by GNU CC, though it accepts similarconstructs in output from PCC.  Until someone can supply a coherentdescription of what is valid DBX input and what is not, there isnothing I can do about these problems.  You are on your own.@itemThe GNU assembler (GAS) does not support PIC.  To generate PIC code, youmust use some other assembler, such as @file{/bin/as}.@itemOn some BSD systems, including some versions of Ultrix, use of profilingcauses static variable destructors (currently used only in C++) not tobe run.@itemUse of @samp{-I/usr/include} may cause trouble.Many systems come with header files that won't work with GNU CC unlesscorrected by @code{fixincludes}.  The corrected header files go in a newdirectory; GNU CC searches this directory before @file{/usr/include}.If you use @samp{-I/usr/include}, this tells GNU CC to search@file{/usr/include} earlier on, before the corrected headers.  Theresult is that you get the uncorrected header files.Instead, you should use these options (when compiling C programs):@smallexample-I/usr/local/lib/gcc-lib/@var{target}/@var{version}/include -I/usr/include@end smallexampleFor C++ programs, GNU CC also uses a special directory that defines C++interfaces to standard C subroutines.  This directory is meant to besearched @emph{before} other standard include directories, so that ittakes precedence.  If you are compiling C++ programs and specifyinginclude directories explicitly, use this option first, then the twooptions above:@example-I/usr/local/lib/g++-include@end example@ignore@cindex @code{vfork}, for the Sun-4@itemThere is a bug in @c

⌨️ 快捷键说明

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