From 3cacb13dd6c56f4214606d29f42257b06b1a5b0c Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sun, 11 Jan 2009 21:28:05 +0000 Subject: Fix stripping when cross-compiling. --- Makefile | 5 ----- configure | 15 +++++++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 223bdaa..6ea3109 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,6 @@ ifeq ($(BUILD_MSVC),yes) else LIBCMD=echo ignoring lib endif -ifeq ($(DO_STRIP),yes) - STRIP=strip -else - STRIP=echo ignoring strip -endif all: $(TARGETS) diff --git a/configure b/configure index ab4459e..b962057 100755 --- a/configure +++ b/configure @@ -40,7 +40,7 @@ show_help(){ echo " --enable-shared build shared libraries [no]" echo " --enable-static build static libraries [yes]" echo " --enable-msvc create msvc-compatible import lib [auto]" - echo " --enable-strip strip shared library [yes]" + echo " --enable-stripping strip shared library [yes]" echo echo " --cc=CC use C compiler CC [$cc_default]" echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]" @@ -59,6 +59,7 @@ incdir="${PREFIX}/include" ar="ar" cc_default="gcc" ranlib="ranlib" +strip="strip" DEFAULT="msvc " @@ -67,7 +68,7 @@ DEFAULT_NO="shared " DEFAULT_YES="static - strip + stripping " CMDLINE_SELECT="$DEFAULT @@ -113,6 +114,7 @@ done ar="${cross_prefix}${ar}" cc_default="${cross_prefix}${cc_default}" ranlib="${cross_prefix}${ranlib}" +strip="${cross_prefix}${strip}" if ! test -z $cc; then cc_default="${cc}" @@ -152,6 +154,10 @@ if enabled msvc; then } fi +if ! enabled stripping; then + strip="echo ignoring strip" +fi + if enabled shared; then lib /? > /dev/null 2>&1 /dev/null && enable msvc || disable msvc fi @@ -163,10 +169,10 @@ echo "incdir=$incdir" >> config.mak echo "AR=$ar" >> config.mak echo "CC=$cc" >> config.mak echo "RANLIB=$ranlib" >> config.mak +echo "STRIP=$strip" >> config.mak echo "BUILD_SHARED=$shared" >> config.mak echo "BUILD_STATIC=$static" >> config.mak echo "BUILD_MSVC=$msvc" >> config.mak -echo "DO_STRIP=$strip" >> config.mak echo "prefix: $PREFIX" echo "libdir: $libdir" @@ -174,9 +180,10 @@ echo "incdir: $incdir" echo "ar: $ar" echo "cc: $cc" echo "ranlib: $ranlib" +echo "strip: $strip" echo "static: $static" echo "shared: $shared" enabled shared && { echo "msvc: $msvc"; - echo "strip: $strip"; + echo "strip: $stripping"; } -- cgit v1.2.3-55-g6feb