source: EcnlProtoTool/trunk/mruby-1.3.0/examples/targets/build_config_IntelEdison.rb@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby
File size: 2.3 KB
Line 
1# Cross-compiling setup for Intel Edison (poky linux) platform
2# Get SDK from here: https://software.intel.com/en-us/iot/hardware/edison/downloads
3# REMEMBER to check and update the SDK root in the constant POKY_EDISON_PATH
4
5MRuby::Build.new do |conf|
6 toolchain :gcc
7 conf.gembox 'default'
8 conf.cc.defines = %w(ENABLE_READLINE)
9 conf.gembox 'default'
10
11 #lightweight regular expression
12 conf.gem :github => "pbosetti/mruby-hs-regexp", :branch => "master"
13
14end
15
16# Define cross build settings
17MRuby::CrossBuild.new('core2-32-poky-linux') do |conf|
18 toolchain :gcc
19
20 # Mac OS X
21 #
22 POKY_EDISON_PATH = '/opt/poky-edison/1.7.2'
23
24 POKY_EDISON_SYSROOT = "#{POKY_EDISON_PATH}/sysroots/core2-32-poky-linux"
25 POKY_EDISON_X86_PATH = "#{POKY_EDISON_PATH}/sysroots/i386-pokysdk-darwin"
26 POKY_EDISON_BIN_PATH = "#{POKY_EDISON_X86_PATH}/usr/bin/i586-poky-linux"
27
28
29 conf.cc do |cc|
30 cc.command = "#{POKY_EDISON_BIN_PATH}/i586-poky-linux-gcc"
31 cc.include_paths << ["#{POKY_EDISON_SYSROOT}/usr/include", "#{POKY_EDISON_X86_PATH}/usr/include"]
32 cc.flags = %w(-m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer)
33 cc.flags << %w(-O2 -pipe -g -feliminate-unused-debug-types)
34 cc.flags << "--sysroot=#{POKY_EDISON_SYSROOT}"
35 cc.compile_options = "%{flags} -o %{outfile} -c %{infile}"
36 cc.defines = %w(ENABLE_READLINE)
37 end
38
39 conf.cxx do |cxx|
40 cxx.command = "#{POKY_EDISON_BIN_PATH}/i586-poky-linux-g++"
41 cxx.include_paths = conf.cc.include_paths.dup
42 cxx.include_paths << ["#{POKY_EDISON_SYSROOT}/usr/include/c++/4.9.1"]
43 cxx.flags = conf.cc.flags.dup
44 cxx.defines = conf.cc.defines.dup
45 cxx.compile_options = conf.cc.compile_options.dup
46 end
47
48 conf.archiver do |archiver|
49 archiver.command = "#{POKY_EDISON_BIN_PATH}/i586-poky-linux-ar"
50 archiver.archive_options = 'rcs %{outfile} %{objs}'
51 end
52
53 conf.linker do |linker|
54 linker.command = "#{POKY_EDISON_BIN_PATH}/i586-poky-linux-g++"
55 linker.flags = %w(-m32 -march=i586)
56 linker.flags << "--sysroot=#{POKY_EDISON_SYSROOT}"
57 linker.flags << %w(-O1)
58 linker.libraries = %w(m pthread)
59 end
60
61 #do not build executable test
62 conf.build_mrbtest_lib_only
63
64 conf.gembox 'default'
65
66 #lightweight regular expression
67 conf.gem :github => "pbosetti/mruby-hs-regexp", :branch => "master"
68
69end
Note: See TracBrowser for help on using the repository browser.