Skip to content

Commit 428dc24

Browse files
authored
Merge pull request #3 from monfresh/fix-openssl
Fix OpenSSL compilation on macOS; use OpenSSL 3.1
2 parents 43c131f + 88b6d1c commit 428dc24

4,532 files changed

Lines changed: 720474 additions & 453891 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Run `chmod +x` to give it execution permissions and execute `./rubyc --help`.
106106
-o, --output=FILE The path of the output file
107107
-d, --tmpdir=DIR The directory for temporary files
108108
--keep-tmpdir Keeps all temporary files that were generated last time
109-
--openssl-dir The path to openssl
109+
--openssl-dir The path to the dir containing cert.pem
110110
--make-args=ARGS Extra arguments to be passed to make
111111
--nmake-args=ARGS Extra arguments to be passed to nmake
112112
-i, --ignore-file=STRING Ignore file(s) from build
@@ -127,6 +127,8 @@ By default this path is set to `/usr/local/etc/openssl/` but can be overridden u
127127
Keep in mind that users running your compiled package should have their certifications
128128
present in this directory as well.
129129

130+
If you're building for macOS, you should set `--openssl-dir` to `/private/etc/ssl`.
131+
130132
### The `--ignore-file` Option
131133

132134
If you don't want certain files included in the build you can ignore them from the command line using -i.

lib/compiler.rb

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def initialize(entrance, options = {})
111111
' -DRUBY_DEBUG -fPIC -g -O0 -pipe '
112112
else
113113
#' -DRUBY_DEBUG -fPIC -O3 -fno-fast-math -ggdb3 -Os -fdata-sections -ffunction-sections -pipe -Wno-error=implicit-function-declaration '
114-
' -fPIC -O3 -fno-fast-math -Os -fdata-sections -ffunction-sections -pipe -Wno-error=implicit-function-declaration '
114+
' -fPIC -O3 -fno-fast-math -Os -fdata-sections -ffunction-sections -pipe '
115115
end
116116

117117
# install prefix for stuffed libraries
@@ -571,13 +571,27 @@ def stuff_openssl
571571
@utils.run(compile_env,
572572
'./Configure',
573573
'darwin64-arm64-cc',
574+
'enable-ec_nistp_64_gcc_128',
575+
'no-zlib',
576+
'no-ssl3',
577+
'no-ssl3-method',
574578
'no-shared',
575-
'enable-rc5',
576-
'zlib',
577-
'no-asm',
578579
"--openssldir=#{@options[:openssl_dir]}",
579580
"--prefix=#{@local_build}")
580-
@utils.run(compile_env, "make #{@options[:nmake_args]}")
581+
@utils.run(compile_env, "make #{@options[:make_args]}")
582+
@utils.run(compile_env, 'make install_sw')
583+
elsif `uname -m`.start_with?('x86_64')
584+
@utils.run(compile_env,
585+
'./Configure',
586+
'darwin64-x86_64-cc',
587+
'enable-ec_nistp_64_gcc_128',
588+
'no-zlib',
589+
'no-ssl3',
590+
'no-ssl3-method',
591+
'no-shared',
592+
"--openssldir=#{@options[:openssl_dir]}",
593+
"--prefix=#{@local_build}")
594+
@utils.run(compile_env, "make #{@options[:make_args]}")
581595
@utils.run(compile_env, 'make install_sw')
582596
elsif `uname -m`.start_with?('aarch64')
583597
@utils.run(compile_env,

vendor/openssl/ACKNOWLEDGEMENTS

Lines changed: 0 additions & 2 deletions
This file was deleted.

vendor/openssl/ACKNOWLEDGEMENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Acknowledgements
2+
================
3+
4+
Please see our [Thanks!][] page for the current acknowledgements.
5+
6+
[Thanks!]: https://www.openssl.org/community/thanks.html

vendor/openssl/AUTHORS

Lines changed: 0 additions & 42 deletions
This file was deleted.

vendor/openssl/AUTHORS.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Authors
2+
=======
3+
4+
This is the list of OpenSSL authors for copyright purposes.
5+
It does not necessarily list everyone who has contributed code,
6+
since in some cases, their employer may be the copyright holder.
7+
To see the full list of contributors, see the revision history in
8+
source control.
9+
10+
Groups
11+
------
12+
13+
* OpenSSL Software Services, Inc.
14+
* OpenSSL Software Foundation, Inc.
15+
16+
Individuals
17+
-----------
18+
19+
* Andy Polyakov
20+
* Ben Laurie
21+
* Ben Kaduk
22+
* Bernd Edlinger
23+
* Bodo Möller
24+
* David Benjamin
25+
* David von Oheimb
26+
* Dmitry Belyavskiy (Дмитрий Белявский)
27+
* Emilia Käsper
28+
* Eric Young
29+
* Geoff Thorpe
30+
* Holger Reif
31+
* Kurt Roeckx
32+
* Lutz Jänicke
33+
* Mark J. Cox
34+
* Matt Caswell
35+
* Matthias St. Pierre
36+
* Nicola Tuveri
37+
* Nils Larsch
38+
* Patrick Steuer
39+
* Paul Dale
40+
* Paul C. Sutton
41+
* Paul Yang
42+
* Ralf S. Engelschall
43+
* Rich Salz
44+
* Richard Levitte
45+
* Shane Lontis
46+
* Stephen Henson
47+
* Steve Marquess
48+
* Tim Hudson
49+
* Tomáš Mráz
50+
* Ulf Möller
51+
* Viktor Dukhovni

0 commit comments

Comments
 (0)