Skip to content

Instantly share code, notes, and snippets.

@shadoi
Last active December 17, 2015 11:19
Show Gist options
  • Save shadoi/5601462 to your computer and use it in GitHub Desktop.
Save shadoi/5601462 to your computer and use it in GitHub Desktop.
Using the following configuration to build
------------------------------------------
module Rubinius
# Make this reload friendly without silly constant defined warnings.
BUILD_CONFIG = {
:command_line => "--system-name=ubuntu-12.04 --default-version=19 --bindir=/usr/bin --includedir=/usr/include/rubinius --libdir=/usr/lib --mandir=/usr/share/man/man1 --gemsdir=/usr/lib/rubinius/gems",
:which_ruby => :ruby,
:build_ruby => "/usr/bin/ruby1.8",
:build_rake => "rake",
:build_perl => "perl",
:llvm => :prebuilt,
:llvm_configure => "/tmp/buildd/rubinius-2.0.0pre/vendor/llvm/Release/bin/llvm-config",
:llvm_version => "3.2svn",
:cc => "gcc",
:cxx => "g++",
:ldshared => "gcc -shared",
:ldsharedxx => "g++ -shared -lstdc++",
:gcc_major => "4.6",
:user_cflags => "-I/usr/include -fPIC",
:user_cppflags => "",
:user_ldflags => "-L/usr/lib -Wl,--export-dynamic -lrt -lcrypt -ldl -lpthread -Wl,-rpath=/usr/lib",
:system_cflags => "-I/usr/local/include -fPIC",
:system_cppflags => "",
:system_ldflags => "-L/usr/local/lib -Wl,--export-dynamic -lrt -lcrypt -ldl -lpthread -Wl,-rpath=/usr/local/lib",
:make => "make",
:include_dirs => ["/usr/local/include"],
:lib_dirs => ["/usr/local/lib"],
:defines => ["HAS_EXECINFO", "HAVE_SPT_REUSEARGV", "HAVE_CLOCK_GETTIME", "HAVE_NL_LANGINFO", "HAVE_POSIX_FADVISE", "HAVE_TM_GMTOFF", "HAVE_TM_ZONE", "HAVE_TIMEZONE", "HAVE_TZNAME", "HAVE_DAYLIGHT", "HAVE_ALLOCA_H", "HAVE_STRING_H", "HAVE_SYS_TIME_H", "HAVE_SYS_TIMES_H", "HAVE_SYS_TYPES_H", "HAVE_UNISTD_H", "HAVE_STDARG_H"],
:curses => "curses",
:host => "x86_64-unknown-linux-gnu",
:cpu => "x86_64",
:vendor => "unknown",
:os => "linux-gnu",
:little_endian => true,
:sizeof_long => 8,
:x86_32 => false,
:x86_64 => true,
:dtrace => false,
:fibers => true,
:sourcedir => "/tmp/buildd/rubinius-2.0.0pre",
:stagingdir => "/tmp/buildd/rubinius-2.0.0pre/staging",
:prefixdir => "",
:bindir => "/usr/bin",
:libdir => "/tmp/buildd/rubinius-2.0.0pre/lib",
:runtimedir => "/tmp/buildd/rubinius-2.0.0pre/runtime",
:kerneldir => "/tmp/buildd/rubinius-2.0.0pre/kernel",
:sitedir => "/tmp/buildd/rubinius-2.0.0pre/site",
:vendordir => "/tmp/buildd/rubinius-2.0.0pre/vendor",
:include18dir => "/usr/include/rubinius/18",
:include19dir => "/usr/include/rubinius/19",
:include20dir => "/usr/include/rubinius/20",
:mandir => "/usr/share/man/man1",
:gemsdir => "/usr/lib/rubinius/gems",
:program_name => "rbx",
:bin_links => ["ruby", "rake", "gem", "irb", "rdoc", "ri"],
:use_bin_links => true,
:version => "2.0.0.rc1",
:libversion => "2.0",
:release_date => "yyyy-mm-dd",
:config_version => 172,
:windows => false,
:darwin => false,
:bsd => false,
:linux => true,
:version_list => ["18", "19"],
:default_version => "19",
:vendor_zlib => false,
:readline => :c_readline,
}
end
Setting the following defines for the VM
----------------------------------------
#define RBX_HOST "x86_64-unknown-linux-gnu"
#define RBX_CPU "x86_64"
#define RBX_VENDOR "unknown"
#define RBX_OS "linux-gnu"
#define RBX_PREFIX_PATH ""
#define RBX_BIN_PATH "/usr/bin"
#define RBX_GEMS_PATH "/usr/lib/rubinius/gems"
#define RBX_RUNTIME_PATH "/tmp/buildd/rubinius-2.0.0pre/runtime"
#define RBX_KERNEL_PATH "/tmp/buildd/rubinius-2.0.0pre/kernel"
#define RBX_LIB_PATH "/tmp/buildd/rubinius-2.0.0pre/lib"
#define RBX_HDR18_PATH "/usr/include/rubinius/18"
#define RBX_HDR19_PATH "/usr/include/rubinius/19"
#define RBX_HDR20_PATH "/usr/include/rubinius/20"
#define RBX_SITE_PATH "/tmp/buildd/rubinius-2.0.0pre/site"
#define RBX_VENDOR_PATH "/tmp/buildd/rubinius-2.0.0pre/vendor"
#define RBX_VERSION "2.0.0.rc1"
#define RBX_LIB_VERSION "2.0"
#define RBX_LDSHARED "gcc -shared"
#define RBX_LDSHAREDXX "g++ -shared -lstdc++"
#define RBX_RELEASE_DATE "yyyy-mm-dd"
#define RBX_SIZEOF_LONG 8
#define RBX_LLVM_API_VER 302
#define RBX_LIBC "libc.so.6"
#define RBX_DEFAULT_18 false
#define RBX_DEFAULT_19 true
#define RBX_DEFAULT_20 false
#define RBX_ENABLED_18 1
#define RBX_ENABLED_19 1
#define RBX_LITTLE_ENDIAN 1
#define RBX_HAVE_TR1_HASH 1
#define RBX_LINUX 1
#define RBX_FIBER_ENABLED 1
#define HAS_EXECINFO 1
#define HAVE_SPT_REUSEARGV 1
#define HAVE_CLOCK_GETTIME 1
#define HAVE_NL_LANGINFO 1
#define HAVE_POSIX_FADVISE 1
#define HAVE_TM_GMTOFF 1
#define HAVE_TM_ZONE 1
#define HAVE_TIMEZONE 1
#define HAVE_TZNAME 1
#define HAVE_DAYLIGHT 1
#define HAVE_ALLOCA_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STDARG_H 1
Build-Depends: debhelper (>= 7), autotools-dev, libreadline-dev, zlib1g-dev,
build-essential, libssl-dev, ruby, ruby-dev, texinfo, libgdbm-dev,
bison, llvm-dev (>= 2.9), libyaml-dev, git-core, libffi-dev, libncurses5-dev
PKG_DIR := $(CURDIR)/debian/$(PACKAGE)
BIN_DIR := /usr/bin
MAN_DIR := /usr/share/man/man1
INC_DIR := /usr/include/$(PACKAGE)
LIB_DIR := /usr/lib
GEM_DIR := /usr/lib/rubinius/gems
export FAKEROOT=$(PKG_DIR)
configure: configure-stamp
dh_testdir
./configure \
--system-name=ubuntu-12.04 \
--default-version=19 \
--bindir=$(BIN_DIR) \
--includedir=$(INC_DIR) \
--libdir=$(LIB_DIR) \
--mandir=$(MAN_DIR) \
--gemsdir=$(GEM_DIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment