Skip to content

Commit 8f13365

Browse files
Merge pull request #315 from ruby/katei/update-openssl
Update OpenSSL to 3.2.0
2 parents 5a28621 + ab79599 commit 8f13365

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

lib/ruby_wasm/build.rb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,16 @@ def system(*args, chdir: nil, env: nil)
5959
[out, err, wait_thr.value]
6060
end
6161
begin
62-
if env
63-
Open3.popen3(env, *args, **kwargs, &block)
64-
else
65-
Open3.popen3(*args, **kwargs, &block)
62+
stdout, stderr, status =
63+
if env
64+
Open3.popen3(env, *args, **kwargs, &block)
65+
else
66+
Open3.popen3(*args, **kwargs, &block)
67+
end
68+
unless status.success?
69+
$stderr.puts stdout
70+
$stderr.puts stderr
71+
raise "Command failed with status (#{status.exitstatus}): #{args.join(" ")}"
6672
end
6773
ensure
6874
printer.done

lib/ruby_wasm/build/product/openssl.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module RubyWasm
55
class OpenSSLProduct < AutoconfProduct
66
attr_reader :target
77

8-
OPENSSL_VERSION = "3.0.5"
8+
OPENSSL_VERSION = "3.2.0"
99

1010
def initialize(build_dir, target, toolchain)
1111
@build_dir = build_dir
@@ -41,21 +41,23 @@ def configure_args
4141
-no-sock
4242
-no-dgram
4343
--libdir=lib
44-
-DNO_SYSLOG
4544
-Wl,--allow-undefined
4645
]
4746
if @target == "wasm32-unknown-wasi"
4847
args.concat %w[
4948
-D_WASI_EMULATED_SIGNAL
5049
-D_WASI_EMULATED_PROCESS_CLOCKS
5150
-D_WASI_EMULATED_MMAN
51+
-D_WASI_EMULATED_GETPID
52+
-DNO_CHMOD
53+
-DHAVE_FORK=0
5254
]
5355
end
5456
args + tools_args
5557
end
5658

5759
def build(executor)
58-
return if Dir.exist?(install_root)
60+
return if File.exist?(File.join(install_root, "lib", "libssl.a"))
5961

6062
executor.mkdir_p File.dirname(product_build_dir)
6163
executor.rm_rf product_build_dir
@@ -79,7 +81,7 @@ def build(executor)
7981
# OpenSSL build system doesn't have well support for parallel build, so force -j1.
8082
executor.system "make",
8183
"-j1",
82-
"install_sw",
84+
"install_dev",
8385
"DESTDIR=#{destdir}",
8486
chdir: product_build_dir
8587
end

lib/ruby_wasm/rake_task.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def hexdigest
103103
digest << @toolchain.name
104104
digest << @libyaml.name
105105
digest << @zlib.name
106+
digest << @openssl.name
106107
digest << @wasi_vfs.name
107108
digest.hexdigest
108109
end

0 commit comments

Comments
 (0)