Include x86.S file from Openwall crypt implementation#184
Merged
Conversation
a885acb to
36983d8
Compare
This is necessary to compile on 32 bit/i386 architectures (currently still supported for the Windows builds)
36983d8 to
ddbab68
Compare
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".
ddbab68 to
859d420
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!