Ruby: Performance degradation in 3.3.3 package
Package Information
- Package name: ruby
- Package version: ruby-3.3.3-r1
- Alpine version: 3.20
- Alpine architecture: aarch64
Summary
-O2
removed from CFLAGS
Steps to reproduce
ruby -e 'puts RbConfig::CONFIG["configure_args"]'
Expected output (on ruby 3.2.4 / Alpine 3.19)
'--build=aarch64-alpine-linux-musl' '--host=aarch64-alpine-linux-musl' '--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-sitedir=/usr/local/lib/site_ruby' '--with-search-path=/usr/lib/site_ruby/$(ruby_ver)/aarch64-linux' '--enable-pthread' '--disable-rpath' '--enable-shared' '--with-mantype=man' 'build_alias=aarch64-alpine-linux-musl' 'host_alias=aarch64-alpine-linux-musl' 'CC=gcc' 'CXX=g++' 'CFLAGS=-O2 -fstack-clash-protection -Wformat -Werror=format-security -g -fno-omit-frame-pointer -fno-strict-aliasing' 'LDFLAGS=-Wl,--as-needed,-O1,--sort-common' 'LIBS=-lucontext' 'CPPFLAGS= -fno-omit-frame-pointer -fno-strict-aliasing' 'CXXFLAGS=-Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -g'
Got:
'--build=aarch64-alpine-linux-musl' '--host=aarch64-alpine-linux-musl' '--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-sitedir=/usr/local/lib/site_ruby' '--with-search-path=/usr/lib/site_ruby/$(ruby_ver)/aarch64-linux' '--enable-pthread' '--disable-rpath' '--enable-shared' '--with-mantype=man' 'build_alias=aarch64-alpine-linux-musl' 'host_alias=aarch64-alpine-linux-musl' 'CC=gcc' 'CXX=g++' 'CFLAGS= -fstack-clash-protection -Wformat -Werror=format-security -g -fno-omit-frame-pointer -fno-strict-aliasing' 'LDFLAGS=-Wl,--as-needed,-O1,--sort-common' 'LIBS=-lucontext' 'CPPFLAGS= -fno-omit-frame-pointer -fno-strict-aliasing' 'CXXFLAGS=-Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -g'
Difference is that -O2
is gone.
This has been changed: https://git.alpinelinux.org/aports/commit/main/ruby/APKBUILD?id=d7d32f7202928f7fda3e49b28e67b4498189d855
The workaround for s390x
has been removed since then, but O2 change not.
https://git.alpinelinux.org/aports/diff/main/ruby/APKBUILD?id=bea135253642c9fe6019b3a66bbfe9524f2f3c42
Edited by Wojtek Kruszewski