tce-load -i compiletc libffi-dev openssl-dev libyaml-dev

wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.1.tar.xz

cd ruby-3.3.1

CC="gcc -flto -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --enable-shared --disable-install-doc --disable-install-rdoc --disable-install-capi --without-valgrind -without-baseruby ac_cv_func_qsort_r=no

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;
find . -name Makefile -type f -exec sed -i 's/-O3//g' {} \;
find . -name Makefile -type f -exec sed -i 's/-ggdb3//g' {} \;
find . -name config.status -type f -exec sed -i 's/-O3//g' {} \;
find . -name config.status -type f -exec sed -i 's/-ggdb3//g' {} \;

make [41m 17.75s]
sudo make install

Configuration summary for ruby version 3.3.1

   * Installation prefix: /usr/local
   * exec prefix:         ${prefix}
   * arch:                i686-linux
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * enable shared:       yes
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           linux
   * compiler:            gcc -flto -march=i486 -mtune=i686 -Os -pipe
   * with thread:         pthread
   * with coroutine:      x86
   * enable shared libs:  yes
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -fstack-protector-strong -rdynamic \
                          -Wl,-export-dynamic -Wl,--no-as-needed
   * DLDFLAGS:            -Wl,--compress-debug-sections=zlib
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations \
                          -Wdiv-by-zero -Wduplicated-cond \
                          -Wimplicit-function-declaration -Wimplicit-int \
                          -Wpointer-arith -Wwrite-strings \
                          -Wold-style-definition -Wimplicit-fallthrough=0 \
                          -Wmissing-noreturn -Wno-cast-function-type \
                          -Wno-constant-logical-operand -Wno-long-long \
                          -Wno-missing-field-initializers \
                          -Wno-overlength-strings \
                          -Wno-packed-bitfield-compat \
                          -Wno-parentheses-equality -Wno-self-assign \
                          -Wno-tautological-compare -Wno-unused-parameter \
                          -Wno-unused-value -Wsuggest-attribute=format \
                          -Wsuggest-attribute=noreturn -Wunused-variable \
                          -Wmisleading-indentation -Wundef
   * strip command:       strip -S -x
   * install doc:         no
   * YJIT support:        no
   * RJIT support:        no
   * man page type:       man