Skip to content

Instantly share code, notes, and snippets.

@pfultz2
pfultz2 / build_cross_gcc
Created February 10, 2016 20:13 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
--- Makefile.in.orig 2012-10-28 05:30:09.000000000 -0500
+++ Makefile.in 2013-12-10 12:36:34.000000000 -0600
@@ -1,6 +1,8 @@
+PREFIX := @prefix@
CXX := @CXX@
-CXXFLAGS := -DHAVE_LIBSAMPLERATE -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DNO_THREAD_CHECKS -DUSE_PTHREADS -DNO_TIMING -DNDEBUG @CXXFLAGS@ @SRC_CFLAGS@ @SNDFILE_CFLAGS@ @FFTW_CFLAGS@ @Vamp_CFLAGS@ -Irubberband -I. -Isrc $(OPTFLAGS)
+CC := @CC@
+CXXFLAGS := -DHAVE_LIBSAMPLERATE -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DNO_THREAD_CHECKS -DUSE_PTHREADS -DNO_TIMING -DNDEBUG -Irubberband -I. -Isrc @CXXFLAGS@ @SRC_CFLAGS@ @SNDFILE_CFLAGS@ @FFTW_CFLAGS@ @Vamp_CFLAGS@ $(OPTFLAGS)
CFLAGS := @CFLAGS@ $(OPTFLAGS)