rakeoe 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c5335857ee888f2e6ba2d8c9a82713e533fc89d
4
- data.tar.gz: 55e7546b4b68dbc570d40348df9e7f091bd42d91
3
+ metadata.gz: ff8600a75f67ce19ddd87476e7cbbd4f15df6fe9
4
+ data.tar.gz: 8199dc6180e67b9e054a5d3aece5881944b1f55f
5
5
  SHA512:
6
- metadata.gz: c22c1fc32d6dc1798ac197d417b9e0c1bfc9af88bcc95af19b3f089d3b56cd4850dd44fac322d6bca7a46dcce7cd20d25081c1f5937ea37d0dc55651498b1594
7
- data.tar.gz: e9e6f9f72480d54cf854ad98e076b0a913b213f04d7fa7326a5fe822854417a2175e4953d079779461406269f98d4af5215277a82b04e328a0779e33c463d89d
6
+ metadata.gz: a457a0c7f3d4077267f45440e3cae9c5bb7a38da56df25ba1832160f613efd07b3da1b15ab38467613fa5c72ce18e50accd107db57a69989295508ef0eea3366
7
+ data.tar.gz: 484f0b0c74a3060b2afe89659395971f2336a66669943f02ae370a996678dc5ee81100f6c04582ccee1c83e570908539540f7e1620774bd4c6e79b7e7ef9df62
data/README.md CHANGED
@@ -11,7 +11,7 @@ Though it's possible to override defaults, tweak library specific platform flags
11
11
  <br/>
12
12
  RakeOE uses OpenEmbedded / Yocto environment files to automatically pick up all appropriate paths and flags for the given build platform. In this way it supports cross compilation in whatever target platform the cross compiler builds. But it's also possible and encouraged to use it for native host development.<br/>
13
13
  <br/>
14
- The toolchain has to be [gcc](http://gcc.gnu.org/) compatible at the moment, i.e. has to implement the **-dumpmachine**, **-MM**, **-MF** and **-MT** options among others. [Clang](http://clang.llvm.org/) qualifies for that as well.
14
+ The toolchain has to be [gcc](http://gcc.gnu.org/) and GNU ld compatible at the moment, i.e. has to implement the **-dumpmachine**, **-MM**, **-MF**, **-MT** and **-Wl,--start-group** options among others.
15
15
 
16
16
  ## Acknowledgements
17
17
 
data/lib/rakeoe/lib.rb CHANGED
@@ -35,9 +35,11 @@ module RakeOE
35
35
  task name => [binary]
36
36
 
37
37
  file binary => paths_of_local_libs + deps + objs do
38
+ prj_libs = search_libs(settings)
38
39
  tc.lib(:objects => objs,
39
- :lib => binary,
40
- :settings => @settings)
40
+ :lib => binary,
41
+ :libs => prj_libs[:all],
42
+ :settings => @settings)
41
43
  end
42
44
 
43
45
  if test_objs.any? && (tc.config.test_fw.size > 0)
@@ -218,7 +218,7 @@ class Toolchain
218
218
  @settings['CFLAGS'] += ' -fPIC'
219
219
  end
220
220
  # !! don't change order of the following string components without care !!
221
- @settings['LDFLAGS'] = @settings['LDFLAGS'] + " -L #{@settings['LIB_OUT']} #{@settings['SYS_LFLAGS']} -Wl,--start-group"
221
+ @settings['LDFLAGS'] = @settings['LDFLAGS'] + " -L #{@settings['LIB_OUT']} #{@settings['SYS_LFLAGS']} -Wl,--no-as-needed -Wl,--start-group"
222
222
  end
223
223
 
224
224
  # Executes the command
@@ -294,6 +294,7 @@ class Toolchain
294
294
  # @return [String] Linker line
295
295
  #
296
296
  def linker_line_for(libs)
297
+ return '' if (libs.nil? || libs.empty?)
297
298
  libs.map do |lib|
298
299
  settings = platform_settings_for(lib)
299
300
  if settings[:LDFLAGS].nil?
@@ -415,8 +416,9 @@ class Toolchain
415
416
  # @option params [Hash] :settings project specific settings
416
417
  #
417
418
  def lib(params = {})
418
- ldflags = params[:settings]['ADD_LDFLAGS']
419
+ ldflags = params[:settings]['ADD_LDFLAGS'] + ' ' + @settings['LDFLAGS']
419
420
  objs = params[:objects].join(' ')
421
+ libs = linker_line_for(params[:libs])
420
422
  extension = File.extname(params[:lib])
421
423
 
422
424
  case extension
@@ -425,7 +427,7 @@ class Toolchain
425
427
  # if archive hasn't changed
426
428
  sh "#{@settings['AR']} curv #{params[:lib]} #{objs} && #{@settings['TOUCH']} #{params[:lib]}"
427
429
  when '.so'
428
- sh "#{@settings['CXX']} -shared #{ldflags} #{objs} -o #{params[:lib]}"
430
+ sh "#{@settings['CXX']} -shared #{ldflags} #{libs} #{objs} -o #{params[:lib]}"
429
431
  else
430
432
  raise "unsupported library extension (#{extension})!"
431
433
  end
@@ -1,3 +1,3 @@
1
1
  module RakeOE
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rakeoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schnell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-07 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler