Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2014 00:47:33 +0000
From:      Ben Morrow <ben@morrow.me.uk>
To:        sbruno@freebsd.org, freebsd-mips@freebsd.org
Subject:   Re: Compiling ports, mips64
Message-ID:  <20141119004731.GA95832@anubis.morrow.me.uk>
In-Reply-To: <1416350711.1248.56.camel@bruno>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoth sbruno@freebsd.org:
> 
> I've tried with both gcc and clang+small hack and I keep getting stopped
> here while building ports.
> 
> --- pkg_config.h ---
> ===>  Staging for pkg-1.3.8_3
> ===>   Generating temporary packing list
[...]
> libtool: install: strip --strip-debug
> /usr/ports/ports-mgmt/pkg/work/stage/usr/local/lib/libpkg_static.a
> libtool: install: chmod 644
> /usr/ports/ports-mgmt/pkg/work/stage/usr/local/lib/libpkg_static.a
> libtool: install: ranlib
> /usr/ports/ports-mgmt/pkg/work/stage/usr/local/lib/libpkg_static.a
> ranlib: fatal: Invalid filename
> *** Error code 70

There is a bug in strip on mips; it doesn't strip static libraries
properly. I am using this as a (very crude) workaround:

--- a/contrib/binutils/binutils/objcopy.c
+++ b/contrib/binutils/binutils/objcopy.c
@@ -2754,6 +2754,9 @@ strip_main (int argc, char *argv[])
 	  continue;
 	}
 
+      if (fnmatch("*.a", argv[i], 0) == 0)
+	continue;
+
       if (preserve_dates)
 	/* No need to check the return value of stat().
 	   It has already been checked in get_file_size().  */

There isn't much point stripping static libs anyway, given that the
final executable is going to be stripped again.

Ben




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141119004731.GA95832>