source:
LFS-SVN-no-lib64-20161202.diff@
a2bbc16
Last change on this file since a2bbc16 was d49e97c, checked in by , 8 years ago | |
---|---|
|
|
File size: 6.7 KB |
-
chapter05/gcc-pass1.xml
68 68 class="directory">/usr/include</filename> from GCC's include search path. 69 69 Issue:</para> 70 70 71 <screen><userinput remap="pre">for file in \ 72 $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) 71 <screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h 73 72 do 74 73 cp -uv $file{,.orig} 75 74 sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ … … 97 96 Finally, we use <command>touch</command> to update the timestamp on the 98 97 copied files. When used in conjunction with <command>cp -u</command>, this 99 98 prevents unexpected changes to the original files in case the commands are 100 inadvertently run twice. </para> 99 inadvertently run twice.</para> 100 101 <para>Finally, on x86_64 hosts, set the default directory name for 102 64-bit libraries to <quote>lib</quote>:</para> 103 104 <screen><userinput remap="pre">case $(uname -m) in 105 x86_64) 106 sed -e '/m64=/s/lib64/lib/' \ 107 -i.orig gcc/config/i386/t-linux64 108 ;; 109 esac</userinput></screen> 110 101 111 <!-- 102 112 <para>GCC doesn't detect stack protection correctly, which causes problems 103 113 for the build of Glibc-&glibc-version;, so fix that by issuing the following … … 123 133 --target=$LFS_TGT \ 124 134 --prefix=/tools \ 125 135 --with-glibc-version=2.11 \ 136 --with-slibdir=/tools/lib \ 126 137 --with-sysroot=$LFS \ 127 138 --with-newlib \ 128 139 --without-headers \ -
chapter05/gcc-pass2.xml
70 70 use the one installed in <filename 71 71 class="directory">/tools</filename>.</para> 72 72 73 <screen><userinput remap="pre">for file in \ 74 $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) 73 <screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h 75 74 do 76 75 cp -uv $file{,.orig} 77 76 sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ … … 84 83 touch $file.orig 85 84 done</userinput></screen> 86 85 86 <para>If building on x86_64, change the default directory name for 64-bit 87 libraries to <quote>lib</quote>:</para> 88 89 <screen><userinput remap="pre">case $(uname -m) in 90 x86_64) 91 sed -e '/m64=/s/lib64/lib/' \ 92 -i.orig gcc/config/i386/t-linux64 93 ;; 94 esac</userinput></screen> 95 87 96 <para>As in the first build of GCC it requires the GMP, MPFR and MPC 88 97 packages. Unpack the tarballs and move them into the required directory 89 98 names:</para> … … 117 126 --prefix=/tools \ 118 127 --with-local-prefix=/tools \ 119 128 --with-native-system-header-dir=/tools/include \ 129 --with-slibdir=/tools/lib \ 120 130 --enable-languages=c,c++ \ 121 131 --disable-libstdcxx-pch \ 122 132 --disable-multilib \ -
chapter06/creatingdirs.xml
24 24 mkdir -pv /usr/{,local/}share/man/man{1..8} 25 25 26 26 case $(uname -m) in 27 x86_64) ln -sv lib /lib64 28 ln -sv lib /usr/lib64 29 ln -sv lib /usr/local/lib64 ;; 27 x86_64) mkdir -v /lib64 ;; 30 28 esac 31 29 32 30 mkdir -v /var/{log,mail,spool} -
chapter06/gcc.xml
45 45 46 46 <screen><userinput remap="pre">patch -Np1 -i ../gcc-6.1.0-asan-1.patch</userinput></screen> 47 47 --> 48 <para>If building on x86_64, change the default direcotory name for 64-bit 49 libraries to <quote>lib</quote>:</para> 50 51 <screen><userinput remap="pre">case $(uname -m) in 52 x86_64) 53 sed -e '/m64=/s/lib64/lib/' \ 54 -i.orig gcc/config/i386/t-linux64 55 ;; 56 esac</userinput></screen> 57 48 58 <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> 49 59 50 60 <screen><userinput remap="pre">mkdir -v build … … 175 185 176 186 <para>Depending on your machine architecture, the above may differ slightly, 177 187 the difference usually being the name of the directory 178 after <filename class="directory">/usr/lib/gcc</filename>. If your machine is 179 a 64-bit system, you may also see a directory named <filename class="directory">lib64</filename> 180 towards the end of the string. The important thing to 181 look for here is that <command>gcc</command> has found all three 188 after <filename class="directory">/usr/lib/gcc</filename>. The important 189 thing to look for here is that <command>gcc</command> has found all three 182 190 <filename>crt*.o</filename> files under the 183 191 <filename class="directory">/usr/lib</filename> directory.</para> 184 192 -
chapter06/glibc.xml
57 57 58 58 <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen> 59 59 60 <para>Create a symlink for LSB compliance and, for x86_64, a 61 compatibility symlink required for the dynamic loader to function 62 correctly:</para> 63 64 <screen><userinput remap="pre">case $(uname -m) in 65 x86) ln -s ld-linux.so.2 /lib/ld-lsb.so.3 66 ;; 67 x86_64) ln -s ../lib/ld-linux-x86-64.so.2 /lib64 68 ln -s ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 69 ;; 70 esac</userinput></screen> 71 60 72 <para>The Glibc documentation recommends building Glibc 61 73 in a dedicated build directory:</para> 62 74 … … 67 79 68 80 <screen><userinput remap="configure">../configure --prefix=/usr \ 69 81 --enable-kernel=&min-kernel; \ 70 --enable-obsolete-rpc</userinput></screen> 82 --enable-obsolete-rpc \ 83 libc_cv_slibdir=/lib</userinput></screen> 71 84 72 85 <para>Compile the package:</para> 73 86 -
chapter06/libcap.xml
55 55 56 56 <para>Install the package:</para> 57 57 58 <screen><userinput remap="install">make RAISE_SETFCAP=no prefix=/usr install58 <screen><userinput remap="install">make RAISE_SETFCAP=no lib=lib prefix=/usr install 59 59 chmod -v 755 /usr/lib/libcap.so</userinput></screen> 60 60 61 61 <variablelist>
Note:
See TracBrowser
for help on using the repository browser.