Compiling ports, mips64
Ben Morrow
ben at morrow.me.uk
Wed Nov 19 00:47:37 UTC 2014
Quoth sbruno at 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
More information about the freebsd-mips
mailing list