/usr/share/doc/HOWTO/ja-html/Glibc2-HOWTO-6.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Glibc 2 HOWTO: ¥á¥¤¥ó¥é¥¤¥Ö¥é¥ê¤Ç¤Ê¤¤libc¤ò»È¤Ã¤¿¥³¥ó¥Ñ¥¤¥ë</TITLE>
<LINK HREF="Glibc2-HOWTO-7.html" REL=next>
<LINK HREF="Glibc2-HOWTO-5.html" REL=previous>
<LINK HREF="Glibc2-HOWTO.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="Glibc2-HOWTO-7.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Glibc2-HOWTO-5.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Glibc2-HOWTO.html#toc6">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s6">6. ¥á¥¤¥ó¥é¥¤¥Ö¥é¥ê¤Ç¤Ê¤¤libc¤ò»È¤Ã¤¿¥³¥ó¥Ñ¥¤¥ë</A></H2>
<P>¥×¥í¥°¥é¥à¤Î¥³¥ó¥Ñ¥¤¥ë¤ÎºÝ¡¢¥á¥¤¥ó¥é¥¤¥Ö¥é¥ê°Ê³°¤Î¥é¥¤¥Ö¥é¥ê¤ò»È¤È¤¤¤¦¤³¤È¤â
¤¢¤ë¤Ç¤·¤ç¤¦¡£¤³¤Î¥»¥¯¥·¥ç¥ó¤Ç¤Ï¡¢¤³¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤É¤¦¤·¤¿¤éÎɤ¤¤Î¤«
¤ò¡¢Á°¤Î2Àá¤Î¥Ç¥£¥ì¥¯¥È¥ê¤È¥¤¥ó¥¹¥È¡¼¥ë̾¤ò»È¤Ã¤ÆÀâÌÀ¤·¤Þ¤¹¡£¼ÂºÝ¤Ë
»ÈÍѤ¹¤ë¤È¤¤Ï¡¢³Æ¼«¤ÎÀßÄê¤Ë¹ç¤ï¤»¤Æ̾Á°¤òÆɤßÂؤ¨¤Æ²¼¤µ¤¤¡£
<P>
<H2><A NAME="ss6.1">6.1 ¥á¥¤¥ó¤Ç¤Ê¤¤libc¤ò»È¤¦¾ì¹ç¤ÎÃí°Õ</A>
</H2>
<P>
¥·¥¹¥Æ¥à¥Ö¡¼¥È¥×¥í¥»¥¹¤¬»ÈÍѤ¹¤ë¥×¥í¥°¥é¥à¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë»þ¤Ï¡¢
Ãí°Õ¤¬É¬ÍפǤ¹¡£
¥×¥í¥°¥é¥à¤¬Æ°Åª¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤Æ¡¢¤«¤Ä¥ë¡¼¥È¤Ç¤Ê¤¤¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤¬
¥Þ¥¦¥ó¥È¤µ¤ì¤ëÁ°¤Ë»ÈÍѤµ¤ì¤ë¥×¥í¥°¥é¥à¤Ç¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢¥ê¥ó¥¯¤µ¤ì¤ë
Á´¤Æ¤Î¥é¥¤¥Ö¥é¥ê¤¬¥ë¡¼¥È¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤Ë¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
Á°Àá¤Î¥á¥¤¥ó¥é¥¤¥Ö¥é¥ê¤È¤·¤Æglibc¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¾ì¹ç
¤ÎÀâÌÀ¤Ë½¾¤¨¤Ð¡¢¸Å¤¤libc¤Ï¥ë¡¼¥È¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¾å¤Î<CODE>/lib</CODE>¤Ë
»Ä¤µ¤ì¤ë¤Î¤Ç¡¢¥Ö¡¼¥È¥×¥í¥»¥¹Ãæ¡¢Á´¤Æ¤Î¥×¥í¥°¥é¥à¤¬Å¬Àµ¤ËÆ°ºî¤¹¤ë¤Ï¤º¤Ç¤¹¡£
¤·¤«¤·¡¢<CODE>/usr</CODE>¤¬Ê̤Υѡ¼¥Æ¥£¥·¥ç¥ó¤Ë¤¢¤Ã¤Æ¡¢glibc¤ò¥Æ¥¹¥È
¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ<CODE>/usr/i486-linuxglibc2</CODE>¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¾ì¹ç¡¢
glibc¤ò»È¤Ã¤Æ¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿¿·¤·¤¤¥×¥í¥°¥é¥à¤Ï¡¢<CODE>/usr</CODE>
¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤¬¥Þ¥¦¥ó¥È¤µ¤ì¤ë¤Þ¤ÇÆ°ºî¤·¤Þ¤»¤ó¡£
<P>
<H2><A NAME="ss6.2">6.2 ¥Æ¥¹¥ÈÍÑglibc¤ò»È¤Ã¤¿¥³¥ó¥Ñ¥¤¥ë</A>
</H2>
<P>¥Æ¥¹¥ÈÍѤ˥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿glibc¤ò»È¤Ã¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤È¤¤Ï¡¢glibc
¤Îinclude¤ò»Ø¤¹¤è¤¦¤Ëinclude¥Ñ¥¹¤òºÆÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£"-nostdinc"
»ØÄê¤Ë¤è¤Ã¤Æ¡¢Ä̾ï¤Î¥Ñ¥¹¤ò̵¸ú¤Ë¤·¡¢"-I/usr/i486-linuxglibc2/include"
¤ò»ØÄꤹ¤ë¤³¤È¤Ç¡¢glibc include¤ò»ØÄê¤Ç¤¤Þ¤¹¡£gcc include¤â»ØÄꤹ¤ë
»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï/usr/lib/gcc-lib/i486-linuxglibc2/
2.7.2.2/include ¤Ë¤¢¤ê¤Þ¤¹¡£(¥Æ¥¹¥ÈÍѥ饤¥Ö¥é¥ê¤¬i486-linuxglibc2¤Ç
gcc¤Î¥Ð¡¼¥¸¥ç¥ó¤¬2.7.2.2¤Î¾ì¹ç¡Ë
<P>¥Æ¥¹¥ÈÍÑglibc¤Ø¥×¥í¥°¥é¥à¤ò¥ê¥ó¥¯¤¹¤ë¾ì¹ç¤Ï¡¢gcc¤ÎÀßÄê¤ò»ØÄꤹ¤ëɬÍ×
¤¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ë¤Ï¡¢"-b i486-linuxglibc2"¥ª¥×¥·¥ç¥ó¤ò»È¤¤¤Þ¤¹¡£
<P>¿¤¯¤Î¥×¥í¥°¥é¥à¤Ç¤Ï¡¢makefile¤Î<CODE>$CFLAGS</CODE>¤È
<CODE>$LDFLAGS</CODE>¥ª¥×¥·¥ç¥ó¤ò²¼µ¤Î
¤è¤¦¤ËÀßÄꤹ¤ë¤³¤È¤Ç¿·¤·¤¤¥ª¥×¥·¥ç¥ó¤Î»ØÄ꤬¤Ç¤¤Þ¤¹¡£
<BLOCKQUOTE><CODE>
<PRE>
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
</PRE>
</CODE></BLOCKQUOTE>
configure¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¡¢configure¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë
<CODE>$CFLAGS</CODE>¤È<CODE>$LDFLAGS</CODE>¥·¥§¥ëÊÑ¿ô¤òÄêµÁ¤·¤Þ¤¹
¡Êcsh/tcsh¤Î¾ì¹çenv/setenv,sh/bashÅù¤Ç¤Ïset/export¤ò»ÈÍÑ¡Ë¡£
¤³¤ì¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤ëmakefile¤ÏŬÀÚ¤Ê<CODE>$CFLAGS</CODE>¤È
<CODE>$LDFLAGS</CODE>¤ò´Þ¤ó¤Ç¤¤¤ë¤Ï¤º¤Ç¤¹¡£
¤¿¤À¤·¡¢Á´¤Æ¤Î¥¹¥¯¥ê¥×¥È¤¬¤³¤ì¤é¤ÎÊÑ¿ô¤ò³Îǧ¤¹¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢
configure¤ò¼Â¹Ô¤·¤¿¸å¡¢makefile¤ò³Îǧ¤·¡¢É¬Íפ˱þ¤¸¤ÆÊÔ½¸¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>¥³¥ó¥Ñ¥¤¥ë¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤¬¡¢gcc¤Î¤ß¤ò»ÈÍѤ·¤Æ¤¤¤ë¤È¤¤Ï
¡Êcpp¤äbinutils¥Ç¥£¥ì¥¯¥È¥ê¤òľÀÜ»ÈÍѤ·¤Ê¤±¤ì¤Ð¡Ë¡¢²¼µ¤Î¥¹¥¯¥ê¥×¥È¤ò»È¤¨¤Ð
Ëè²óÁ´¥ª¥×¥·¥ç¥ó¤ò»ØÄꤻ¤º¤ËºÑ¤ß¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
#!/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 "$@"
</PRE>
</CODE></BLOCKQUOTE>
You can then use this script instead of "gcc" when compiling.
gcc¤ÎÂå¤ï¤ê¤Ë¤³¤Î¥¹¥¯¥ê¥×¥È¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<P>
<H2><A NAME="ss6.3">6.3 glibc¤¬¥á¥¤¥ó¥é¥¤¥Ö¥é¥ê¤Î¤È¤¤Îlibc5¤ò»È¤Ã¤¿¥³¥ó¥Ñ¥¤¥ë</A>
</H2>
<P>glibc¤ò¥á¥¤¥ó¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¢¤ë¤È¤¤Ë¡¢¸Å¤¤¥é¥¤¥Ö¥é¥ê¤ò
»È¤Ã¤Æ¥×¥í¥°¥é¥à¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤Ë¤Ï¡¢¸Å¤¤¥é¥¤¥Ö¥é¥êÍѤ˥ѥ¹¤òºÆÀßÄê
¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ë¤Ï¡¢"-nostdinc"¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Æ
Ä̾ï¤Î¥Ñ¥¹¤ò̵¸ú¤Ë¤·¡¢"-I/usr/i486-linuxlibc5"¤ò»È¤Ã¤Æglibc(*)
¤Îinclude¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£
¤Þ¤¿¡¢"-I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include"
¤ò»ØÄꤷ¤ÆgccÆÃͤÎinclude¥Õ¥¡¥¤¥ë¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£
¤Ê¤ª¡¢¥Ñ¥¹Ì¾¤Ï³Æ¼«¤ÎÀßÄê¤ägcc¥Ð¡¼¥¸¥ç¥ó¤Ë¹ç¤ï¤»¤ÆÄ´À°¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>(*ÌõÃí¡Ë libc5¤Î´Ö°ã¤¤¤È»×¤ï¤ì¤Þ¤¹¡£
<P>¸Å¤¤libc¤Ë¥×¥í¥°¥é¥à¤ò¥ê¥ó¥¯¤¹¤ë¤Ë¤Ï¡¢gcc¤ÎÀßÄê¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê
¤Þ¤¹¡£¤³¤ì¤Ï¡¢¥ª¥×¥·¥ç¥ó"-b i486-linuxlibc5"¤ò»ØÄꤹ¤ì¤ÐOK¤Ç¤¹¡£
<P>¿¤¯¤Î¥×¥í¥°¥é¥à¤Ç¤Ï¡£makefileÃæ¤Ç<CODE>$CFLAGS</CODE>¤È
<CODE>$LDFLAGS</CODE>¤Ë¿·¤·¤¤¥ª¥×¥·¥ç¥ó¤ò²Ã¤¨¤ì¤Ð¤è¤¤¤Ï¤º¤Ç¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
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
</PRE>
</CODE></BLOCKQUOTE>
configure¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤Æ¤¤¤ë¤È¤¤Ï¡¢configure¼Â¹ÔÁ°¤Ë¡¢¥·¥§¥ëÊÑ¿ô
<CODE>$CFLAGS</CODE>¤È<CODE>$LDFLAGS</CODE>¤òÄêµÁ¤·¤Þ¤¹
(csh/tcsh¤Ç¤Ïenv/setenv, sh/bashÅù¤Ç¤Ïset/export¤ò»ÈÍÑ¡Ë¡£
¼«Æ°À¸À®¤µ¤ì¤¿makefile¤Ë¤Ï¡¢Å¬ÀÚ¤Ë<CODE>$CFLAGS</CODE>¤È
<CODE>$LDFLAGS</CODE>¤¬µ½Ò¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¤¬¡¢
Á´¤Æ¤Îconfigure¥¹¥¯¥ê¥×¥È¤¬¤³¤ì¤ò¹Ô¤Ã¤Æ¤¯¤ì¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢
configure¼Â¹Ô¸åmakefile¤ò³Îǧ¤·¡¢É¬Íפ˱þ¤¸¤ÆÊÔ½¸¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>¤â¤·¡¢¥³¥ó¥Ñ¥¤¥ë¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤¬gcc¤Î¤ß¤ò¸Æ¤Ó½Ð¤·¤Æ¤¤¤ë
¤Ê¤é¤Ð¡Êcpp¤äbinutils¤òľÀÜɬÍפȤ·¤Æ¤¤¤Ê¤¤¤Ê¤é¤Ð¡Ë¡¢²¼µ¤Î¥¹¥¯¥ê¥×¥È¤ò
»È¤¨¤Ð¡¢Ëè²ó¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Ê¤¯¤Æ¤â¤¹¤ß¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
#!/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 "$@"
</PRE>
</CODE></BLOCKQUOTE>
You can then use this script instead of "gcc" when compiling.
<P>¥³¥ó¥Ñ¥¤¥ë»þ¤Ë"gcc"¤ÎÂå¤ï¤ê¤Ë¤³¤ì¤ò»È¤¨¤ÐÎɤ¤¤ï¤±¤Ç¤¹¡£
<P>
<HR>
<A HREF="Glibc2-HOWTO-7.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Glibc2-HOWTO-5.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Glibc2-HOWTO.html#toc6">Ìܼ¡¤Ø</A>
</BODY>
</HTML>
|