Skip to content

Instantly share code, notes, and snippets.

@danitool
Created June 10, 2018 22:25
Show Gist options
  • Save danitool/7ebf88024e5fd398874acaf310353e0b to your computer and use it in GitHub Desktop.
Save danitool/7ebf88024e5fd398874acaf310353e0b to your computer and use it in GitHub Desktop.
Cross compile static wget for mips
#!/bin/bash
export CROSS_COMPILE=/opt/trendchip/mips-linux-uclibc/usr/bin/mips-linux
export AR=${CROSS_COMPILE}-ar
export AS=${CROSS_COMPILE}-as
export LD=${CROSS_COMPILE}-ld
export RANLIB=${CROSS_COMPILE}-ranlib
export CC=${CROSS_COMPILE}-gcc
export CPP=${CROSS_COMPILE}-cpp
export NM=${CROSS_COMPILE}-nm
export LIBS="-static"
export CFLAGS="-fomit-frame-pointer -O2 -DTCSUPPORT_CPU_RT63365 -DTC3262"
STRIP=${CROSS_COMPILE}-strip
./configure \
--host=mips \
--build=i586-pc-linux-gnu \
--without-ssl \
--disable-nls
make
$STRIP -s src/wget
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment