Nmap Development mailing list archives

Re: Cross-compiling error


From: Nuno Gonçalves <nunojpg () gmail com>
Date: Thu, 5 Jan 2012 00:35:28 +0000

Since there were no comments here I attach the patch.

Index: liblinear/blas/Makefile
===================================================================
--- liblinear/blas/Makefile     (revision 27772)
+++ liblinear/blas/Makefile     (working copy)
@@ -1,4 +1,3 @@
-AR     = ar rcv
 RANLIB = ranlib

 HEADERS = blas.h blas.h blasp.h
@@ -8,7 +7,7 @@
 FFLAGS = $(OPTFLAGS)

 blas: $(FILES) $(HEADERS)
-       $(AR) blas.a $(FILES)
+       $(AR) rcv blas.a $(FILES)
        $(RANLIB) blas.a

 clean:



Regards,
Nuno

2011/12/25 Nuno Gonçalves <nunojpg () gmail com>:
At revision 27637 (and for a while back) I'm getting a cross-compilation error:

mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=mips32r2
-fno-caller-saves -fhonour-copts -msoft-float  -fno-builtin -fno-rtti
-Wall -fno-strict-aliasing   -c dscal.c
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++
but not for C
mips-openwrt-linux-uclibc-ar blas.a dnrm2.o daxpy.o ddot.o dscal.o
mips-openwrt-linux-uclibc-ar: illegal option -- .
Usage: mips-openwrt-linux-uclibc-ar [emulation options]
[-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file
file...
      mips-openwrt-linux-uclibc-ar -M [<mri-script]

I guess this is caused by the $(AR) variable to be replaced during compilation.

Since liblinear/blas/Makefile defines

AR     = ar rcv

The "rcv" flags are not used and so the error.

For me it was enough to edit this Makefile:

-- AR     = ar rcv

and

--      $(AR) blas.a $(FILES)
++     $(AR) rcv blas.a $(FILES)

I don't include a patch because I don't know anything about Makefiles
and I'm afraid this solution might not be ok, while it works for me.

Regards,
--
+ Nuno Gonçalves
+ nunojpg () gmail com
+ http://nunoassimassim.blogspot.com/
+ PORTUGAL
E-mail sent directly from Google Mail webmail using HTTPS on behalf of
Nuno João Pinto Gonçalves, birth date 1986-11-16. This e-mail header
MUST contain a DKIM signature. If you require additional security, I
may provide on request X509 electronic signature under Portuguese
government chain.
Se precisar de assinatura digital do Cartão de Cidadão, de uma apitadela.

Attachment: patch.diff
Description:

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: