Cross compile zip and unzip

Download zip and unzip address:

https://infozip.sourceforge.net/Info-ZIP.html

The above may be invalid, you can use the following

https://sourceforge.net/projects/infozip/

Open the URL to download unzip60.tar.gz,
insert image description hereinsert image description hereinsert image description hereinsert image description herechoose unzip60.tar.gz or unzip60.zip, you only need to be able to decompress it on linux

You can also use the following methods to download
Download unzip60.tar.gz

wget http://downloads.sourceforge.net/infozip/unzip60.tar.gz

or

wget https://nchc.dl.sourceforge.net/project/infozip/UnZip 6.x %28latest%29/UnZip 6.0/unzip60.tar.gz


Unzip tar xzvf unzip60.tar.gz after downloading unzip60.tar.gz


Install directly on ubuntu

cp ./unix/Makefile .
make clean
make generic

Verify that the installation was successful

zip
unzip

Cross Compile
Modify unzip60/unix/Makefile

CROSS=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-
CC = ${
    
    CROSS}gcc # try using “gcc” target rather than changing this (CC and LD
LD = $(CC)# must match, else “unresolved symbol: ___main” is possible)
AS = ${
    
    CROSS}as
STRIP = ${
    
    CROSS}strip

Compile:

root@yang:zip30# make generic -f unix/Makefile

Download and compile zip30
or cross-compile the above URL
insert image description hereinsert image description hereinsert image description here:
Modify zip30/unix/Makefile

CROSS=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-
CC = ${
    
    CROSS}gcc
BIND = $(CC)
AS = $(CC) -c
#CPP = /lib/cpp
CPP = ${
    
    CC} -E
E =

Compile:

root@huaguo:yang# make -f unix/Makefile generic

Guess you like

Origin blog.csdn.net/qq_40170041/article/details/131666810