Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@tjschuck
Copy link
Collaborator

This file was left out of #182, but is only necessary to compile on 32 bit/i386 architectures (which are currently still supported for the Windows builds). Without this file, all 32 bit Windows builds are failing. This should fix that!

This is necessary to compile on 32 bit/i386 architectures (currently still supported for the Windows builds)
@tjschuck tjschuck force-pushed the include_x86_openwall_dep branch from 36983d8 to ddbab68 Compare November 15, 2018 17:44
Ruby's mkmf generates the $objs for the Makefile by [looping over the files with SRC_EXT extensions](https://github.com/ruby/ruby/blob/9b7d8947df9780c120db7a1407bbe06e2004c511/lib/mkmf.rb#L2224-L2232), which are only [c, m, cc, mm, cxx, and cpp](https://github.com/ruby/ruby/blob/9b7d8947df9780c120db7a1407bbe06e2004c511/lib/mkmf.rb#L75-L88), not the `.S` we need here.

This instead explicitly uses the list of object files that Openwall's crypt_blowfish lists in its provided Makefile.  See it's Makefile, lines 25-29:

```c
BLOWFISH_OBJS = \
  crypt_blowfish.o x86.o

CRYPT_OBJS = \
  $(BLOWFISH_OBJS) crypt_gensalt.o wrapper.o
```

Those are what's passed to Makefile > all on line 41:

```c
all: $(CRYPT_OBJS) man
```

This just uses that list plus the name of our actual extension (the `bcrypt_ext.o` entry) to ensure that the x86.S extension gets built in.  That extension is only needed for 32-bit x86 systems, but it's fine to include on x64 as well, per the crypt_blowfish README: "you can compile and link it even on a non-x86, it will produce no code in this case".
@tjschuck tjschuck force-pushed the include_x86_openwall_dep branch from ddbab68 to 859d420 Compare November 15, 2018 17:49
@tjschuck tjschuck merged commit 8b800d6 into master Nov 15, 2018
@tjschuck tjschuck deleted the include_x86_openwall_dep branch November 15, 2018 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.