  Glibc 2 Ͽ
  Eric Green, thrytis@imaxx.net
  v1.2, 26 October 1997

  Glibc 2 Ͽ  ýۿ GNU C Library version 2(libc 6)
  ġϰ ϴ  ٷ.
  ______________________________________________________________________

  Table of Contents:

  1.      Ұ(Introduction)

  1.1.    glibc 2?

  1.2.      ؼ

  1.3.      ֱ  

  2.      ġϴ  .

  3.      library 

  4.       ġϱ

  4.1.    ϱ ġϱ

  4.1.1.   

  4.1.2.  ҽ ϱ

  4.1.3.  Configure ϱ

  4.1.4.  ϱ ġϱ

  4.2.    δ(dynamic loader) ׷̵.

  4.3.    gcc configureϱ

  4.4.      ũ Ʈϱ.

  4.5.    ġȰ ׽Ʈϱ

  5.      Primary C library ġϱ

  5.1.    ҽκ ̺귯 ġϱ

  5.1.1.   

  5.1.2.  ҽ ϱ

  5.1.3.  Configure ϱ

  5.1.4.  ϱ

  5.2.    ġϱ  غ ۾ϱ

  5.3.    ̳ʸ Űκ ġϱ

  5.4.    ҽκ ġϱ

  5.5.    gcc specs  Ʈϱ

  5.6.    ġȰ ׽Ʈϱ

  6.      non-primary libc ϱ

  6.1.    non-primary libcs   

  6.2.     glibc Բ ϱ.

  6.3.    Compiling programs with libc 5 when glibc is primary library

  7.      C++ α׷ ϱ

  7.1.     glibc ġ 쿡  libg++ġϱ

  7.2.     glibc ġ 쿡  libg++ ġϱ

  7.3.    non-primary libc C++α׷ ϱ

  8.       ϱ

  9.       specs 

  10.     Miscellanea

  10.1.   Further information

  10.1.1. Web Pages

  10.1.2. Newgroups

  10.2.   Credits

  10.3.   Feedback
  ______________________________________________________________________

  1.  Ұ(Introduction)

  1.1.  glibc 2?

  Glibc 2 GNU C Library ֽ ̸,  GNU Hurd ý, 
  i386, m68k, and alpha ýۿ ȴ. ׸   PowerPC,
  MIPS, Sparc ۾   ̴.  ȹ ٸ
  architectures ü迡  θ ÷ϴ ̴.^^

   glibc 2 Linux libc 5   libc major version 6
   ǰ ִ. ̷  Linux libc ڵ ǵ̱⵵
  ߴ.    glibc 2 ִ  ϰ
  ϴµ   ִ.   ϴ α׷
  glibc 2 Ѵٸ ֽ   ϴ.  2.1 main
  stream use    ̴.

  glibc 2 ϴ 3 ߰ ɼ(optional add-ons) ִ.

     Crypt
        UFC-crypt Ű̴.  Export restriction и״.

     LinuxThreads
        An implementation of the Posix 1003.1c "pthread" interface.

     Locale data
        Contains the data needed to build the locale data files to use
        the internationalization features of the glibc.

  1.2.    ؼ

   Ͽ  ϴ  ýۿ glibc 2 library ġϴ
   ٷ Ѵ.   libc 5 ϴ Intel  ý
  ڸ ؼ . ׷ ٸ ý ϴ ̳ glibc
  1   ̺귯 ϴ   ġ ִ 
  ̸ architecture ̸ ٲٴ ۾   
    ִ.

   Ͽ  ֽ  Linux Documentation Project
  <http://sunsite.unc.edu/LDP>  Ϻη   ְų,
  <http://www.imaxx.net/~thrytis/glibc/Glibc2-HOWTO.html>  ġ
    ִ.

  1.3.    ֱ  

   1.1 1.2 ٸ :

    Added some information to the Reporting bugs section, and updated
     bug reporting email and gnats addresses. (Changes by Andreas
     Jaeger)

    Updated Credits section.

   1.0 1.1 ٸ :

    Updated glibc version to 2.0.5c.

    Added a reference to the Debian libc5 to libc6 Ͽ and Frodo
     Looijaard's Installing glibc-2 on Linux document.

  2.  ġϴ  .

  glibc ġϴ   ʴ. ŵ  ̺귯
  ġҼ ִ.   ⺻ ̹ ġǾ ִ ̺귯
  Ͽ glibc 2 ġ , α׷   , ٸ ɼ
  ϸ ο ̺귯(glibc 2) ̿  ִ.  ̷
   ġϴ  ġ  glibc ϴ  .-- 
   glibc ŷǾ  α׷   ̻  ʴ´ٴ
  ̴.-- glibc  ҷ ҽ(source) 
  ̺귯 ϸ ȴ. ̷ ġ  ``
  ġϱ'' ڼ ߴ.

   ٸ ġ   ̺귯 glibc ϱ  ̴.
  ̰  α׷ ϸ, ο α׷ ַ glibc
  ŷ ȴ. ׷  , ٸ ɼ ϸ  ̺귯
  ŷų  ִ.  ̳ʸ · ̺귯 ġ  , Ǵ
   ̺귯    ִ.  ȭ ɼ̳ 
  ɼ Ű Ͱų ƴϸ ̳ʸ Ű  ʴ add-
  on Ϸ Ѵٸ, ҽ   ,  ϾѴ. ̷
  ġ  ``primary C library ġϱ'' ߴ.

  Frodo Looijaard glibc ġ  ִ ٸ  ߴ.  ,
  glibc secondary libary ġϰ, glibc Ͽ ϵǰ
  cross compiler ϴ ̴.    ġ  ټ
  , glibc ŷ      ִ.(??) 
    site ִ Installing glibc-2 on Linux
  <http://huizen.dds.nl/~frodol/glibc/>  Ǿִ.

    Debian 1.3  ̰, glibc ϴ  unstable
  version  ׷̵带 ϱ ȴٸ, Debian libc5 to libc6 Mini-
  HOWTO <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html> 
  Ͽ  Ű ׷̵带 ų  ִ.

   glibc 2 ߿ ýۿ ġϷ Ѵٸ,  ̺귯 ġ
  .  ġϰų,    ִ ýۿ ġؼ
  ׽Ʈ ƶ.  װ ϴ,  α׷  ϱ
    ʿ䰡 ִµ, ̰ Լ prototypes types Ǳ
  ̴.

  3.  library 

  glibc 2  glibc Ű 3 ߰ ɼ Ű(LinuxThreads,
  Locale, Crypt) Ǿ ִ. ҽ  ġ ã  ִ.

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.5.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-linuxthreads-2.0.5.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-localedata-2.0.5.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.5.tar.gz>

   2.0.5c ߰ ġ ʿϴ , ̰  ġ ã
   ִ.

  <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.5-2.0.5c.diff.gz>.

   ϰ ġ ʿ ũ   150 MB ʿϴ.
  ֿ ̺귯 Ű ⺻ ̳ʸ ġÿ  50 MB
  ʿϴ.

   2.0.5c  ̳ʸ Ű Ҽ ,  2.0.5
  ̳ʸ Ű i386, alpha, 68k Ǹ,  ġ 
   ִ.

    Intel x86:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4.bin.i386.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4.bin.i386.tar.gz>

    Alpha:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.1.bin.alpha-linux.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.1.bin.alpha-
     linux.tar.gz>

    m68k:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4-m68k-linux.bin.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4-m68k-
     linux.bin.tar.gz>

     crypt add-on ؼ export restrictions ־, non-US
     ڴ  ġ crypt add-on Ű   ִ.
     <ftp://ftp.ifi.uio.no/pub/gnu>.

  Red Hat  ϴ  glibc 2 rpm  ġ  
  ִ.  <ftp://ftp.redhat.com/pub/redhat/tbird/RedHat/RPMS/>  
   Red Hat 4.8 glibc 2  C ̺귯 Ǿ.

    ϴ  glibc 2 Ű  ġ 
   ִ.  <ftp://ftp.debian.org/debian/unstable/binary-i386/devel/>,
  <ftp://ftp.debian.org/debian/unstable/binary-m68k/devel/>,
  <ftp://ftp.debian.org/debian/unstable/binary-alpha/devel/>.  
  libc6 ̸ Ǿ. Glibc 2  hamm  ⺻
  Ű Ϻ̸,  2.0ʹ  libc  ̴.

  4.   ġϱ

  Glibc 2  ġϸ,    Ư  Ͽ
  glibc 2 ŷŰ ʴ ̹ ġǾ ִ  ̺귯
  ŷ ȴ. ġ 丮 ġ(path)  Ͽ ԵǾ
  ϵǹǷ , ҽ  ̺귯 ġؾ߸ Ѵ.

  4.1.  ϱ ġϱ

  4.1.1.   

    About 150 MB free disk space

    GNU make 3.75

    gcc >= 2.7.2 (better 2.7.2.1)

    binutils 2.8.1 (for alpha you need a snapshot)

    bash-2.0

    autoconf-2.12 (if you change configure.in)

  RAM 64 MB i586@133 ǻͿ ߰ ̺귯(add-ons) ü
  ̺귯  ϴµ ҿ ð  3ð̸, i686@2 ǻ
    1ð 30  ɷȴ.

  4.1.2.  ҽ ϱ

  ҽ  ϱ ؼ Archives ҽ  ؾ߸
  Ѵ.  Ʒ  ϸ ȴ:

        tar xzf glibc-2.0.5.tar.gz
        cd glibc-2.0.5
        cat ../glibc-2.0.5-2.0.5c.diff.gz | gzip -d | patch -p0
        tar xzf ../glibc-linuxthreads-2.0.5.tar.gz
        tar xzf ../glibc-crypt-2.0.5.tar.gz
        tar xzf ../glibc-localedata-2.0.5.tar.gz

   ó ϸ, glibc-2.0.5 丮 linuxthreads, crypt,
  localeddata 丮 ȴ. ̷ ؾ configure ߰
  ̺귯 丮 ã  ִ.
  4.1.3.  Configure ϱ

  glibc-2.0.5 丮 "compile"̶ 丮 , cd
  'compile' 丮 ´.  ۾  compile 丮
  ̷.

        mkdir compile
        cd compile

    , '../configure' Ű ȴ.  ߰ Ű
  ϰ , ߰ Ű  ɼ(--enable-add-ons <>
  --enable-add-ons=linuxthreads,crypt,localedata) ԽѾ Ѵ.  
  ġϰ  丮 ؾ Ѵ.   ġ 丮
  '/usr/i486-linuxglibc2' Ѵ.   configure line ̴:

        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr/i486-linuxglibc2

  4.1.4.  ϱ ġϱ

  ϰ  Ǿ Ȯϴ    Ѵ:

        make
        make check

        make install

  4.2.  δ(dynamic loader) ׷̵.

  1.  ld.so /lib/ld-linux.so.2 ŷŲ:

        ln -s /usr/i486-linuxglibc2/lib/ld-linux.so.2 /lib/ld-linux.so.2

  This is the only library where the location is fixed once a program is
  linked, and using a link in /lib will ease upgrading to glibc as your
  primary C library when the stable version is released.

  2. /etc/ld.so.conf  Ѵ.   ο Ӱ
      ̺귯 丮 θ(path)  ȴ.  
     츮 ġߴ 쿡 '/usr/i486-linuxglibc2/lib'  ȴ.
     (  : '   ƴ.^^) /etc/ld.so.conf 
     ,    .

        ldconfig -v

  4.3.  gcc configureϱ

  ġ  ܰ谡 /usr/lib/gcc-lib Ʈ(update)ϴ ̴.
  ̰ ؾ gcc  ο ̺귯   
  ִ.  켱 ִ configuration Ѵ.  configuration
   ˱ ؼ   ϸ ȴ:

        % gcc -v
        Reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2

    ý i486-unknown-linux, 2.7.2.2 ̴.  
  ؾ  /usr/lib/gcc-lib/<system>  ο ׽Ʈ ý
  丮 ϴ ̴: ϴ ̴.:

        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxglibc2

      ϶.

        cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2

   丮 'specs' Ѵ.  specs ϳ /lib/ld-
  linux.so.1 /lib/ld-linux.so.2 ٲ۴.  %{...:-lgmon}  
    . ֳĸ glibc profileϱ ؼ gmon
  ̺귯  ʱ ̴.  specs  `` specs
  ''ܿ  ã  ִ.

  4.4.    ũ Ʈϱ.

    ũ   Ѵ:

        cd /usr/i486-linuxglibc2/include
        ln -s /usr/src/linux/include/linux
        ln -s /usr/src/linux/include/asm
        ln -s /usr/X11R6/include/X11

  You might also have other libraries such as ncurses which need their
  header files put in this directory.  You should copy or link the files
  from /usr/include.  (Some libraries may need to be recompiled with
  glibc2 in order to work with it.  In these cases, just compile and
  install the package to /usr/i486-linuxglibc2.)

  4.5.  ġȰ ׽Ʈϱ

  켱   (glibc.c) :

        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }

  ׸ ɼ"-b <base install directory> -nostdinc -I<install direc
  tory>/include -I/usr/lib/gcc-lib/<new system dir>/<gcc ver
  sion>/include"    Ѵ.

        % gcc -b i486-linuxglibc2 -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include glibc.c -o glibc

  ldd ̿Ͽ α׷ glibc2 ũǾ Ȯغ:

        % ldd glibc
        libc.so.6 => /usr/i486-linuxglibc2/lib/libc-2.0.5.so (0x4000d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

   ǰ, ũ  ̸,  "hello world!"  
  ȴٸ, ġ   ̴. (....^^)

  5.  Primary C library ġϱ

  Glibc 2  C ̺θ ġϴ  ϰڴ.  C
  ̺귯 ġ Ѵٴ   ϴ α׷ glibc
  ũǰ ϴ ̴. , ٸ  ũų  ɼ
  ߰Ѽ ϸ ȴ.

    ̳  ϰ  rpm ̳ deb
   ٿ߾ٸ, ̳  ġ ȳ о ƶ.
  ׷, ִ   ʾƵ ȴ.

  5.1.  ҽκ ̺귯 ġϱ

  ⿡ ҽκ glibc 2 add-ons ϴ  Ϸ
  Ѵ.  ȭ ɼ̳  ɼ ϰ Ͱų ̳ʸ 
  Ű Ϸ   ̺귯  ʿ䰡 ִ.

  5.1.1.   

    About 150 MB free disk space

    GNU make 3.75

    gcc >= 2.7.2 (better 2.7.2.1)

    binutils 2.8.1 (for alpha you need a snapshot)

    bash-2.0

    autoconf-2.12 (if you change configure.in)

  RAM 64 MB i586@133 ǻͿ ߰ ̺귯(add-ons) ü
  ̺귯  ϴµ ҿ ð  3ð̸, i686@2 ǻ
    1ð 30  ɷȴ.

  5.1.2.  ҽ ϱ

  ҽ  ϱ ؼ Archives ҽ  ؾ߸
  Ѵ.  Ʒ  ϸ ȴ:

        tar xzf glibc-2.0.5.tar.gz
        cd glibc-2.0.5
        cat ../glibc-2.0.5-2.0.5c.diff.gz | gzip -d | patch -p0
        tar xzf ../glibc-linuxthreads-2.0.5.tar.gz
        tar xzf ../glibc-crypt-2.0.5.tar.gz
        tar xzf ../glibc-localedata-2.0.5.tar.gz

   ó ϸ, glibc-2.0.5 丮 linuxthreads, crypt,
  localeddata 丮 ȴ. ̷ ؾ configure ߰
  ̺귯 丮 ã  ִ.

  5.1.3.  Configure ϱ

  glibc-2.0.5 丮 "compile"̶ 丮 , cd
  'compile' 丮 ´.  ۾  compile 丮
  ̷.

       mkdir compile
       cd compile

    , '../configure' Ű ȴ.  ߰ Ű
  ϰ , ߰ Ű  ɼ(--enable-add-ons <>
  --enable-add-ons=linuxthreads,crypt,localedata) ԽѾ Ѵ.  
  ġϰ  丮 ؾ Ѵ.   ġ 丮
  '--prefix=/usr' Ѵ.   configure line ̴:

        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr

  5.1.4.  ϱ

  ϰ  Ǿ Ȯϴ    Ѵ:

        make
        make check

  5.2.  ġϱ  غ ۾ϱ

  ҽκ ġߵ, ̳ʸ Ϸ ġߵ glibc 2̺귯 ġ
  غϱ ؼ   ű ʿ䰡 ִ.    
  ο α׷ glibc ũŰ,  ũ ʴ 
  α׷  libc 5  ϰ ϱؼ̴.   
    ʾƾѴ.

  1.  (libc 5)  ο 丮 :

        mkdir -p /usr/i486-linuxlibc5/lib

  2. (libc 5)   /usr/include  ٸ 丮 ű:

   mv /usr/include /usr/i486-linuxlibc5/include

  3. ο(glibc 2) include 丮 , ٸ include
     ũŲ:

        mkdir /usr/include

        ln -s /usr/src/linux/include/linux /usr/include/linux
        ln -s /usr/src/linux/include/asm /usr/include/asm
        ln -s /usr/X11R6/include/X11 /usr/include/X11
        ln -s /usr/lib/g++-include /usr/include/g++

  ũ ǿ  ణ ٸ ִ.   
  /usr/local/g++-include g++  ְ, ݸ鿡  Ű
   /usr/include/g++ g++ ְ, /usr/lib/g++-include
  /usr/include/g++  ũǾ ִ.  , Ƹ   g++
  include 丮 /usr/include ű  ̴.

  4. ٸ   ϰ ũѴ.  ǥ ̺귯,
      ncureses, /usr/include  ų /usr/include ؿ
     ִ ׵ include 丮 ũ Ѵ.  ϵ̳ ũ
     ٸ ̺귯  ɼ ְ    ʿ䰡 ִ.

  5. /etc/ld.so.conf   glibc 2 ̺귯 丮(, /
     usr/i486-linuxlibr/lib) ߰Ѵ. glibc ġ  ̻
     ޼ ϱ ؼ ld.so-1.8.8̻  ġǾ ־
     Ѵ.

  6.  C ̺귯 ο 丮(/usr/i486-linuxlibc5/lib)
     űų Ѵ.

        mv /usr/lib/libbsd.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libgmon.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libmcheck.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.so /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.so /usr/i486-linuxlibc5/lib
        cp /lib/libm.so.5.* /usr/i486-linuxlibc5/lib
        cp /lib/libc.so.5.* /usr/i486-linuxlibc5/lib

   /usr / ٸ Ƽǿ ִٸ, libm.so.5 libc.so.5 move
  ƴ Ǿ Ѵ.   ϴµ ʿ α׷
  libm.so.5 libc.so.5 ϱ⶧̰ ̰͵ Ʈ 丮
  ־߸ Ѵ.

  7. /usr/lib/*.o  ο 丮 ű.

   mv /usr/lib/crt1.o /usr/i486-linuxlibc5/lib
   mv /usr/lib/crti.o /usr/i486-linuxlibc5/lib
   mv /usr/lib/crtn.o /usr/i486-linuxlibc5/lib
   mv /usr/lib/gcrt1.o /usr/i486-linuxlibc5/lib

  8.  ̺귯 Ű ̺귯 cache ƮѴ.

        ldconfig -v

  5.3.  ̳ʸ Űκ ġϱ

  ̸ ϵ ̳ʸκ glibc ġϰ ϸ,  
  Ѵ:

        cd /
        gzip -dc glibc-2.0.bin.i386.tar.gz | tar tvvf -
        gzip -dc glibc-crypt-2.0.bin.i386.tar.gz | tar tvvf -
        ldconfig -v

  ٸ architecture ٸ   ִٸ,   ̸
  ٲٸ ȴ.

  5.4.  ҽκ ġϱ

  ҽκ ̺귯 ġϷ,  ϶:

        make install
        ldconfig -v

  5.5.  gcc specs  Ʈϱ

  ̳ʸκ ġ̵ ҽκ ġϵ  ܰ gcc specs
   Ʈϴ ̴. ׷߸  α׷ ϰ ũ
   ִ.  gcc ϴ specs  ˾Ƴ ؼ  
  Ѵ:

   % gcc -v
   reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
   gcc version 2.7.2.2

    i486-unknown-linux ý̰  2.7.2.2̴. 
  ؾ  /usr/lib/gcc-lib/<system>  ý 丮 ϴ
  ̴:

        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxlibc5

      ϶.

        cd /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2

   丮 'specs' Ѵ.  specs ϳ /lib/ld-
  linux.so.1 /lib/ld-linux.so.2 ٲ۴.  %{...:-lgmon}  
    . ֳĸ glibc profileϱ ؼ gmon
  ̺귯  ʱ ̴.   specs  `` specs
  ''ܿ ã  ִ.

  5.6.  ġȰ ׽Ʈϱ

  켱   (glibc.c) :

        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }

  ׸ Ѵ.

        % gcc glibc.c -o glibc

  ldd ̿Ͽ α׷ glibc2 ũǾ Ȯغ:

   % ldd glibc
   libc.so.6 => /lib/libc.so.6 (0x4000e000)
   /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

   ǰ, ũ  ̸,  "hello world!"  
  ȴٸ, ġ   ̴. (....^^)

  6.  non-primary libc ϱ

  α׷  ϴ , ٸ ̺귯 ϰ   
  ̴.   ܿ  ϸ ٸ ̺귯  
  ִ° Ѵ.  켱 ؾ     ܿ 
  Ǿ 丮 ̸ ġ ̸ Ѵٴ ̴.  Remember to
  change the names to fit your setup.

  6.1.  non-primary libcs   

  ý   Ǵ α׷     , 
  α׷  ũϰ  non-root Ƽ ƮǱ 
  Ѵٸ,  ũǴ ̺귯 root Ƽǿ ־߸ Ѵٴ
  ̴.  glibc  C ̺귯 ġϴ ( ܿ) ߴٸ, 
  libc /lib ִ. /lib root Ƽǿ ־Ѵ. ̰ 
    α׷ ϴ ȿ ۵Ѵٴ ̴. ׷, 
  /usr ٸ Ƽǿ ְ, glibc /usr/i486-linuxglibc2 
  ġߴٸ, glibc Բ ϵ α׷ /usr Ƽ
  ƮǱ  ۵ ʴ´ٴ ̴.

  6.2.   glibc Բ ϱ.

   glibc Բ α׷ ϱؼ glibc include
  include path  ٽ  ʿ䰡 ִ.

  Specifying "-nostdinc" will negate the normal paths, and
  "-I/usr/i486-linuxglibc2/include" will point to the glibc includes.
  You will also need to specify the gcc includes, which are found in
  /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include (assuming you
  installed the test lib in i486-linuxglibc2 with gcc version 2.7.2.2).

  To link a program with a test-install glibc, you need to specify the
  gcc setup.  This is done by using the option "-b i486-linuxglibc2".

  For most programs, you can specify these new options by adding them to
  the CFLAGS and LDFLAGS makefile options:

        CFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -b i486-linuxglibc2
        LDFLAGS = -b i486-linuxglibc2

  If you are using a configure script, define the CFLAGS and LDFLAGS
  shell variables (by using env/setenv for csh/tcsh, or set/export for
  sh/bash/etc) before running configure.  The makefiles generated by
  this should contain the proper CFLAGS and LDFLAGS.  Not all configure
  scripts will pick up the variables, so you should check after running
  configure and edit the makefiles by hand if necessary.

  If the programs you are compiling only call gcc (and not cpp or
  binutils directly), you can use the following script to save having to
  specify all of the options each time:

        #!/bin/bash
        /usr/bin/gcc -b i486-linuxglibc2 -nostdinc \
                     -I/usr/i486-linuxglibc2/include \
                     -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include "$@"

  You can then use this script instead of "gcc" when compiling.

  6.3.  Compiling programs with libc 5 when glibc is primary library

  To compile a program with your old libraries when you have installed
  glibc as your main library, you need to reset the include paths to the
  old includes.  Specifying "-nostdinc" will negate the normal paths,
  and "-I/usr/i486-linuxlibc5/include" will point to the glibc includes.
  You must also specify "-I/usr/lib/gcc-
  lib/i486-linuxlibc5/2.7.2.2/include" to include the gcc specific
  includes.  Remember to adjust these paths based on the what you named
  the new directories and your gcc version.

  To link a program with your old libc, you need to specify the gcc
  setup.  This is done by using the option "-b i486-linuxlibc5".

  For most programs, you can specify these new options by appending them
  to the CFLAGS and LDFLAGS makefile options:

        CFLAGS = -nostdinc -I/usr/i486-linuxlibc5/include -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include -b i486-linuxlibc5
        LDFLAGS = -b i486-linuxlibc5

  If you are using a configure script, define the CFLAGS and LDFLAGS
  shell variables (by using env/setenv for csh/tcsh, or set/export for
  sh/bash/etc) before running configure.  The makefiles generated by
  this should contain the proper CFLAGS and LDFLAGS.  Not all configure
  scripts will pick up the variables, so you should check after running
  configure and edit the makefiles by hand if necessary.

  If the programs you are compiling only call gcc (and not cpp or
  binutils directly), you can use the following script to save having to
  specify all of the options each time:

        #!/bin/bash
        /usr/bin/gcc -b i486-linuxlibc5 -nostdinc \
                     -I/usr/i486-linuxlibc5/include \
                     -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include "$@"

  You can then use this script instead of "gcc" when compiling.

  7.  C++ α׷ ϱ

  libg++  ̺귯 Ϻθ ϹǷ libm ũѾѴ.
   libg++  ̺귯 Բ ĵǾ⶧, glibc ٽ
   ϰų ƴϸ ̳ʸ Ѵ. glibc ũ ̳ʸ
  libg++  ġ ã  ִ.
  <ftp://ftp.yggdrasil.com/private/hjl/>.

  7.1.   glibc ġ 쿡  libg++ġϱ

   glibc ġߴٸ, libg++ glibc ġǾ
  丮 ġؾѴ. ( ܿ ߴٸ,
  /usr/i486-linuxglibc2 libg++ ġѴ.) ̳ʸ Űκ
  ġϰ Ѵٸ, ӽ 丮 ϳ  
  usr/lib/ϵ <install directory>/lib/ 丮 ű,
  usr/include/ϵ <install directory>/include/ 丮 ű.
  ( : include/g++ ũ  ), ׸ usr/bin/
  <install directory>/bin/ 丮 ű.

  7.2.   glibc ġ 쿡  libg++ ġϱ

   ̺귯 glibc ġߴٸ,   libg++ ϵ  libc
  丮 Űܶ. (g++α׷  libc  ϰ ʹٸ,...)
  ̰ ϴµ    libc 5 ϵ libg++ ο
   ġϰ( ܿ ߴ),  glibc 
  ġѴ.

  7.3.  non-primary libc C++α׷ ϱ

  C++ α׷ non-primary libc ϰ , g++ include
  丮 ԽѾѴ. (  ġ ,
  /usr/i486-linuxglibc2/include/g++̰,  glibc ġ 
  /usr/i486-linuxlibc5/include/g++̴)  CXXFLAGS  ÷ϴ
     ִ.

        CXXFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -I/usr/i486-linuxlibc5/include/g++ -b i486-linuxglibc2

  8.   ϱ

  lib װ ִٰ Ǹ, 켱 FAQ о. ٸ  
     ذå ִ. Ǵ INSTALL Ͽ ִ
  "Recommended Tools to Install the GNU C Library" ܿ üũ ƶ.
    ״ glibc װ ƴ tools ̱⶧̴.

  ϴ ׸ ߰, װ ¥  Ȯ϶. GNU C
  ̺귯 ٸ C ̺귯   ۵ϴ Ȯϸ
  ȴ.  ٸ C̺귯    ۵ 
  ̺귯 ̻ ִ ̴.

    <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl> 
  ,  Ÿ̽  . ̹ Ǿ 
  Ȯض.  libc Բ Ǵ BUGS ϵ ƶ.

  ο ׶  Ǹ,   Ͼ ִ 츦  
   ŭ .(?) C ̺귯   ̺귯 Լ ȣ
  ٿ Ҽ  ׷ ض. ̰ ʿ  ʾƾ Ѵ.

   ׽Ʈ   ִٸ ׸ ϶.   
   ؾ  ̴.  (1) װ  test case .  (2)
    ο   ,   (3)  ߴ
  ý , GNU C ̺귯 ,GCC CC Ϸ , GNU Binutils
   (4) 'configure'    'config.status'
  'config.make' 

  GNU C ̺귯   Ʈ glibcbug  ũƮ ؼ
  <bugs@gnu.org>  . (ٸ ּҴ  <bugs@gnu.ai.mit.edu>) Ǵ
  <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl> ִ GNATS 
  ̽ ؼ   ִ.

  Ȱ   <bugs-glibc@prep.ai.mit.edu> ִ ϸ Ʈ
  .  gnewsgroup gnu.bug.glibc о ʾҴٸ, <bug-
  glibc-request@prep.ai.mit.edu>  Ʈ   ִ.

  <bug-gcc@prep.ai.mit.edu>  GNU C ̺귯   
   . װ GNU CC     ̴.  GNU CC
  GNU C ̺귯 ٸ 鿡 ؼ ȴ.

  9.   specs 

  ⿡ ִ  specs glibc 2̸  , ũ 
  gcc ؼ Ǵ ̴.   /usr/lib/gcc-lib/<new system
  dir>/<gcc version> ִ.   x86 ý Ѵٸ,  
  specs    ִ.

   *asm:
   %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}

   *asm_final:
   %{pipe:-}

   *cpp:
   %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

   *cc1:
   %{profile:-p}

   *cc1plus:

   *endfile:
   %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

   *link:
   -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:       %{rdynamic:-export-dynamic}     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}  %{static:-static}}}

   *lib:
   %{!shared: %{pthread:-lpthread}        %{profile:-lc_p} %{!profile: -lc}}

   *libgcc:
   -lgcc

   *startfile:
   %{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                  %{!p:%{profile:gcrt1.o%s}                         %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

   *switches_need_spaces:

   *signed_char:
   %{funsigned-char:-D__CHAR_UNSIGNED__}

   *predefines:
   -D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)

   *cross_compile:
   0

   *multilib:
   . ;

  10.  Miscellanea

  10.1.  Further information

  10.1.1.  Web Pages

    FSF's GNU C Library Home Page
     <http://www.gnu.org/software/libc/libc.html>

    Using GNU Libc 2 with Linux <http://www.imaxx.net/~thrytis/glibc/>

    Installing glibc-2 on Linux <http://huizen.dds.nl/~frodol/glibc/>.

    Debian libc5 to libc6 Mini-HOWTO
     <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html>.

  10.1.2.  Newgroups

    comp.os.linux.development.system

    comp.os.linux.development.apps

    linux.dev.kernel

    gnu.bugs.glibc

  10.2.  Credits

  Most of this information was stolen from the GNU Libc web page
  <http://www.gnu.org/software/libc/libc.html> and from Ulrich Drepper's
  <drepper@gnu.ai.mit.edu> glibc 2 announcement and his comments.
  Andreas Jaeger <aj@arthur.rhein-neckar.de> provided some of the
  Reporting bugs section.

  The following people have provided information and feedback for this
  document:

    Mark Brown <M.A.Brown-4@sms.ed.ac.uk>

    Ulrich Drepper <drepper@gnu.ai.mit.edu>

    Scott K. Ellis <ellis@valueweb.net>

    Aron Griffis <agriffis@coat.com>

    Andreas Jaeger <aj@arthur.rhein-neckar.de>

    Frodo Looijaard <frodol@dds.nl>

    Ryan McGuire <rmcguire@freenet.columbus.oh.us>

    Shaya Potter <spotter@capaccess.org>

    Les Schaffer <godzilla@futuris.net>

    Andy Sewell <puck@pookhill.demon.co.uk>

    Stephane <sr@adb.fr>

    Jan Vandenbos <jan@imaxx.net>

  Translations of this document are being done by:

    French:  Olivier Tharan <tharan@int-evry.fr>

    Japanese:  Kazuyuki Okamoto <ikko-@pacific.rim.or.jp>

  10.3.  Feedback

  Besides writing this HOWTO, maintaining the glibc 2 for Linux
  <http://www.imaxx.net/~thrytis/glibc> page, and using it on my
  machine, I have nothing to do with the glibc project.  I am far from
  knowledgeable on this topic, though I try to help with problems mailed
  to me.  I welcome any feedback, corrections, or suggestions you have
  to offer.  Please send them to thrytis@imaxx.net
  <mailto:thrytis@imaxx.net>.

