Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2011 11:47:47 -0600
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: RE: more targets using sse-intrinsics.S

There is a problem building under cygwin.  I get this:

[clip]
gcc -c -Wall -O2 -fomit-frame-pointer -I/usr/local/include  -Wall -mpreferred-stack
gcc -c  -DUNDERSCORES x86.S
gcc -c  -DUNDERSCORES x86-sse.S
gcc sse-intrinsics-32.S  DES_fmt.o DES_std.o ...... unique.o x86.o x86-sse.o  
-s -L/usr/local/lib -L/usr/local/ssl/lib -lcrypto -lssl -lm -lz  -lkernel32 -o ../run/john.exe
/tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x126): undefined reference to `memcpy'
/tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x1cb): undefined reference to `memcpy'
/tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x22c): undefined reference to `memcpy'
/tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x291): undefined reference to `memcpy'
[clip]

I clipped a lot to avoid unneed linker error messages.

This is easy to fix.  In cygwin (and mingw) sse2i, the build is this:

JOHN_OBJS="sse-intrinsics-32.S $(JOHN_OBJS) x86.o x86-sse.o " \

If this is changed to this:

JOHN_OBJS="sse-intrinsics-32.o $(JOHN_OBJS) x86.o x86-sse.o " \

Then the behavior works.  

Here is the build 'view' of things:

[clip]
gcc -c -Wall -O2 -fomit-frame-pointer -I/usr/local/include  -Wall -mpreferred-stack
gcc -c  -DUNDERSCORES x86.S
gcc -c  -DUNDERSCORES x86-sse.S
gcc -c  -DUNDERSCORES sse-intrinsics-32.S
gcc sse-intrinsics-32.o  DES_fmt.o DES_std.o ...... unique.o x86.o x86-sse.o  
-s -L/usr/local/lib -L/usr/local/ssl/lib -lcrypto -lssl -lm -lz  -lkernel32 -o ../run/john.exe
[clip but build worked just fine]

So at least for the build items needing -DUNDERSCORES, it appears to be very important to have sse-intrinsics-32.o in the OBJS, and not sse-intrinsics-32.S  Actually, I am not sure why you have been adding the sse-intrinsics-32.S to the OBJ items in the makefile.

I have a patch which would work for mingw/cygwin, however, before making that, I wonder if we should simply replace all of the sse-intrinsics-32.S in the OBJ's, to sse-intrinsics-32.o?

Jim.


>From: magnum [mailto:john.magnum@...hmail.com]
>
>2011-11-10 21:37, jfoug wrote:
>> Patch 0005 has been placed on the wiki. It is a perl script, placed
>> in ./run, and a couple of changes to Makefile.
>
>Patch 0007 unifies them - I moved your perl script to "make intrinsics"
>and reverted the target changes - the same, windows-ready, .S file is
>now used for windows and non-windows. Seems to work fine, I hope I did
>not screw anything up.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.