Skip to content

Commit 6700c32

Browse files
committed
Luckfox Pico config: Use realpath, comment flags and cmath exclusion
1 parent f98a05c commit 6700c32

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

build_config/luckfox_pico.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
MRuby::CrossBuild.new("luckfox_pico") do |conf|
1010
# Clone the luckfox-pico repo above next to (same directory level) as mruby.
11-
SDK_BASE = File.expand_path("../../../", File.expand_path(__FILE__)) + "/luckfox-pico"
11+
SDK_BASE = File.realpath(File.expand_path("../../../", File.expand_path(__FILE__)) + "/luckfox-pico")
1212
TOOLCHAIN_BASE = "#{SDK_BASE}/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf"
1313
SYSROOT = "#{TOOLCHAIN_BASE}/arm-rockchip830-linux-uclibcgnueabihf/sysroot"
1414

@@ -23,9 +23,10 @@
2323
cc.include_paths << "#{TOOLCHAIN_BASE}/arm-rockchip830-linux-uclibcgnueabihf/include/c++/8.3.0/arm-rockchip830-linux-uclibcgnueabihf"
2424
cc.include_paths << "#{SYSROOT}/usr/include"
2525

26+
# Flags taken from the SDK's Makefile
2627
cc.flags << ["-march=armv7-a", "-mfpu=neon", "-mfloat-abi=hard"]
27-
cc.flags << ["-O2", "-fPIC"]
2828
cc.flags << ["-D_LARGEFILE_SOURCE", "-D_LARGEFILE64_SOURCE", "-D_FILE_OFFSET_BITS=64", "-ffunction-sections", "-fdata-sections"]
29+
cc.flags << ["-O2", "-fPIC"]
2930
cc.flags << ["-Wl,--copy-dt-needed-entries", "-Wl,-lc,-lgcc_s"]
3031
end
3132

@@ -59,6 +60,7 @@
5960
conf.gem 'mrbgems/mruby-binding/'
6061
conf.gem 'mrbgems/mruby-catch/'
6162
conf.gem 'mrbgems/mruby-class-ext/'
63+
# SDK doesn't include complex math for uClibc
6264
# conf.gem 'mrbgems/mruby-cmath/'
6365
conf.gem 'mrbgems/mruby-compar-ext/'
6466
conf.gem 'mrbgems/mruby-compiler/'

0 commit comments

Comments
 (0)