Open MisterMartin opened 7 years ago
Erik came up with a convenient method to display the build arguments for Ruby:
$ docker run ruby:2.2.7 ruby -e 'puts RbConfig::CONFIG["cflags"]'
-O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat
$ docker run ruby:2.4.1 ruby -e 'puts RbConfig::CONFIG["cflags"]'
-O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format
Likewise, to list the configuration keys:
$ docker run ruby:2.2 ruby -e 'puts RbConfig::CONFIG.keys.sort'
ALLOCA
AR
ARCHFILE
ARCH_FLAG
AS
ASFLAGS
ASMEXT
BTESTRUBY
BUILTIN_TRANSSRCS
CAPITARGET
CC
CCDLFLAGS
CC_VERSION
CFLAGS
...
vendorarchhdrdir
vendordir
vendorhdrdir
vendorlibdir
warnflags
In light of the recent Stack Clash vulnerability, we need to insure that
-fstack-check
is specified for the ruby build used in CHORDS.The latest official Docker image for ruby:2.2 is the Ruby release 2.2.7 (2017-03-28). Building it reveals that
-fstack-check
is not specified for gcc:The same holds true for the latest official ruby:2.4 image: