Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
[c++] Linux Gnu c Compiler Gcc-howto

[c++] Linux Gnu c Compiler Gcc-howto

Ratings: (0)|Views: 3 |Likes:
Published by oscarsat
[c++] Linux Gnu c Compiler Gcc-howto
[c++] Linux Gnu c Compiler Gcc-howto

More info:

Published by: oscarsat on Jul 07, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/07/2013

pdf

text

original

 
The Linux GCC HOWTO
Daniel Barlow
Linux Documentation ProjectMay 1999This document covers how to set up the GNU C compiler and development libraries under Linux, and givesan overview of compiling, linking, running and debugging programs under it. Most of the material in it hasbeen taken from Mitch D'Souza's GCC−FAQ or the ELF−HOWTO − it replaces both documents.This is the first version to be written in DocBook instead of the old Linuxdoc format, and may containmarkup errors. Please let me know if you find anything worng.As can be determined from the long times between updates of this document, I don't actually have the time orinclination to maintain it much. If you have, can, and want to, drop me some email describing what you'd dowith it and why you think you'd be good at it.
 
Table of Contents
1. Preliminaries...................................................................................................................................................1
1.1. ELF vs. a.out, libc 5 vs 6..................................................................................................................11.2. Administrata......................................................................................................................................11.3. Typography.......................................................................................................................................1
2. Where to get things.........................................................................................................................................3
2.1. This document...................................................................................................................................32.2. Other documentation.........................................................................................................................32.3. GCC..................................................................................................................................................32.4. C library and header files..................................................................................................................42.5. Associated tools (as, ld, ar, strings etc).............................................................................................4
3. GCC installation and setup............................................................................................................................5
3.1. GCC versions....................................................................................................................................53.2. Where did it go?................................................................................................................................53.3. Where are the header files?...............................................................................................................63.4. Building cross compilers..................................................................................................................73.4.1. Linux as the target platform..............................................................................................73.4.2. Linux as the source platform, MSDOS as the target........................................................7
4. Porting and Compiling...................................................................................................................................8
4.1. Automatically defined symbols........................................................................................................84.2. Compiler invocation.........................................................................................................................84.2.1. Compilerflags...................................................................................................................84.2.2. Internal compiler error: cc1 got fatal signal 11...............................................................104.3. Portability........................................................................................................................................104.3.1. BSDisms(including bsd_ioctl, daemon and <sgtty.h>).................................................104.3.2. `Missing'signals (SIGBUS, SIGEMT, SIGIOT, SIGTRAP, SIGSYS etc)...................104.3.3. K & R Code....................................................................................................................114.3.4. Preprocessor symbols conflict with prototypes in the code............................................114.3.5. sprintf()...........................................................................................................................114.3.6. fcntl and f riends. Where are the definitions of FD_* stuff ?.........................................114.3.7. The select() timeout. Programs start busy−waiting.......................................................114.3.8. Interrupted system calls..................................................................................................124.3.9. Writable strings (program seg faults randomly).............................................................144.3.10.Why does the execl() call fail?.....................................................................................14
5.1. Preventative maintenance (lint)......................................................................................................165.2. Debugging.......................................................................................................................................165.2.1. How do Iget debugging information into a program ?..................................................165.2.2. Available software..........................................................................................................165.2.3. Background (daemon) programs....................................................................................175.2.4. Corefiles.........................................................................................................................175.3. Profiling..........................................................................................................................................18
6. Linking...........................................................................................................................................................19
The Linux GCC HOWTOi
 
Table ofContents
6.1. Shared vs static libraries.................................................................................................................196.2. Interrogating libraries (`which library is sin() in?')........................................................................206.3. Finding files....................................................................................................................................206.4. Building your own libraries............................................................................................................206.4.1. Version control...............................................................................................................216.4.2. ELF? What is it then, anyway?......................................................................................216.4.3. a.out. Ye oldetraditional format....................................................................................236.4.4. Linking: common problems............................................................................................24
7. Dynamic Loading..........................................................................................................................................26
7.1. Concepts..........................................................................................................................................267.2. Error messages................................................................................................................................267.3. Controlling the operation of the dynamic loader............................................................................267.4. Writing programs with dynamic loading........................................................................................27
8. Contacting the developers............................................................................................................................28
8.1. Bugreports......................................................................................................................................288.2. Helping with development..............................................................................................................28
9. The Remains..................................................................................................................................................29
9.1. The Credits......................................................................................................................................299.2. Translations.....................................................................................................................................299.3. Feedback.........................................................................................................................................299.4. Legalese..........................................................................................................................................30
The Linux GCC HOWTOii

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->