Changes between Version 2 and Version 3 of TipAndDoc/Linux/OpenWRT/CrossCompile


Ignore:
Timestamp:
Jun 21, 2012 2:22:21 PM (12 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/Linux/OpenWRT/CrossCompile

    v2 v3  
    223223 * [http://www.crosscompile.org/static/pages/ZLib.html How to Cross Compile Zlib Compression Library - Step by Step Guide (crosscompile.org)] 
    224224 
     225 * mitty@precise:~$ export PATH=$PATH:~/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/ 
     226 * mitty@precise:~$ export STAGING_DIR=~/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/ 
     227 
     228 * mitty@precise:~/openwrt$ wget http://zlib.net/zlib-1.2.7.tar.gz 
     229 * mitty@precise:~/openwrt/zlib-1.2.7$ ./configure --prefix=$STAGING_DIR 
     230 * mitty@precise:~/openwrt/zlib-1.2.7$ vim Makefile 
     231{{{#!diff 
     232--- Makefile.old        2012-06-17 20:05:08.485384996 +0900 
     233+++ Makefile    2012-06-17 20:16:36.692585953 +0900 
     234@@ -16,7 +16,7 @@ 
     235 # To install in $HOME instead of /usr/local, use: 
     236 #    make install prefix=$HOME 
     237  
     238-CC=gcc 
     239+CC=mips-openwrt-linux-gcc 
     240  
     241 CFLAGS=-O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN 
     242 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 
     243@@ -27,8 +27,8 @@ 
     244 SFLAGS=-O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN 
     245 LDFLAGS=  
     246 TEST_LDFLAGS=-L. libz.a 
     247-LDSHARED=gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map 
     248-CPP=gcc -E 
     249+LDSHARED=mips-openwrt-linux-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map 
     250+CPP=mips-openwrt-linux-gcc -E 
     251  
     252 STATICLIB=libz.a 
     253 SHAREDLIB=libz.so 
     254@@ -36,9 +36,9 @@ 
     255 SHAREDLIBM=libz.so.1 
     256 LIBS=$(STATICLIB) $(SHAREDLIBV) 
     257  
     258-AR=ar 
     259+AR=mips-openwrt-linux-ar 
     260 ARFLAGS=rc 
     261-RANLIB=ranlib 
     262+RANLIB=mips-openwrt-linux-ranlib 
     263 LDCONFIG=ldconfig 
     264 LDSHAREDLIBC=-lc 
     265 TAR=tar 
     266}}} 
     267 
     268 * mitty@precise:~/openwrt/zlib-1.2.7$ make 
     269 * mitty@precise:~/openwrt/zlib-1.2.7$ make install 
     270{{{ 
     271cp libz.a /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//lib 
     272chmod 644 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//lib/libz.a 
     273cp libz.so.1.2.7 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//lib 
     274chmod 755 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//lib/libz.so.1.2.7 
     275cp zlib.3 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//share/man/man3 
     276chmod 644 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//share/man/man3/zlib.3 
     277cp zlib.pc /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//lib/pkgconfig 
     278chmod 644 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//lib/pkgconfig/zlib.pc 
     279cp zlib.h zconf.h /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//include 
     280chmod 644 /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//include/zlib.h /home/mitty/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2//include/zconf.h 
     281}}} 
     282 
    225283 == openssl == 
    226284 * [http://www.crosscompile.org/static/pages/OpenSSL.html How to Cross Compile OpenSSL a Step by Step Guide (crosscompile.org)]