[DEV] add missing m lib on global platform

This commit is contained in:
Edouard DUPIN 2016-01-18 21:18:01 +01:00
parent 198513660e
commit 7c664f156d
15 changed files with 147 additions and 30 deletions

View File

@ -122,6 +122,18 @@ def link(file, binary, target, depancy, flags, name, basic_path, static = False)
cmd.append(target.global_flags_ld) cmd.append(target.global_flags_ld)
except: except:
pass pass
for view in ["local", "export"]:
if view not in flags:
continue
for type in ["link-lib"]:
if type in flags[view]:
cmd.append([("-l" + sss).replace("-l/", "/") for sss in flags[view][type] ])
for type in ["link-lib"]:
if type in depancy.flags:
cmd.append([("-l" + sss).replace("-l/", "/") for sss in depancy.flags[type] ])
for type in ["link-lib"]:
if type in target.global_flags:
cmd.append([("-l" + sss).replace("-l/", "/") for sss in target.global_flags[type] ])
cmd_line = tools.list_to_str(cmd) cmd_line = tools.list_to_str(cmd)
# check the dependency for this file : # check the dependency for this file :
if depend.need_re_package(file_dst, file_src, True, file_cmd=file_cmd, cmd_line=cmd_line) == False \ if depend.need_re_package(file_dst, file_src, True, file_cmd=file_cmd, cmd_line=cmd_line) == False \

View File

@ -82,26 +82,19 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False):
except: except:
pass pass
for view in ["local", "export"]: for view in ["local", "export"]:
if view not in flags:
continue
for type in ["link", "link-dynamic"]: for type in ["link", "link-dynamic"]:
try: if type in flags[view]:
cmd.append(flags[view][type]) cmd.append(flags[view][type])
except:
pass
for type in ["link", "link-dynamic"]: for type in ["link", "link-dynamic"]:
try: if type in depancy.flags:
cmd.append(depancy.flags[type]) cmd.append(depancy.flags[type])
except:
pass
for type in ["link", "link-dynamic"]: for type in ["link", "link-dynamic"]:
try: if type in target.global_flags:
cmd.append(target.global_flags[type]) cmd.append(target.global_flags[type])
except: if 'src' in depancy.src:
pass
try:
# keep only compilated files ...
cmd.append(tools.filter_extention(depancy.src['src'], get_input_type())) cmd.append(tools.filter_extention(depancy.src['src'], get_input_type()))
except:
pass
try: try:
cmd.append(list_static) cmd.append(list_static)
except: except:
@ -118,6 +111,18 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False):
cmd.append("-Wl,-R$ORIGIN/../lib/") cmd.append("-Wl,-R$ORIGIN/../lib/")
except: except:
pass pass
for view in ["local", "export"]:
if view not in flags:
continue
for type in ["link-lib"]:
if type in flags[view]:
cmd.append([("-l" + sss).replace("-l/", "/") for sss in flags[view][type] ])
for type in ["link-lib"]:
if type in depancy.flags:
cmd.append([("-l" + sss).replace("-l/", "/") for sss in depancy.flags[type] ])
for type in ["link-lib"]:
if type in target.global_flags:
cmd.append([("-l" + sss).replace("-l/", "/") for sss in target.global_flags[type] ])
cmdLine=tools.list_to_str(cmd) cmdLine=tools.list_to_str(cmd)
# check the dependency for this file : # check the dependency for this file :
if depend.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \ if depend.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \

View File

@ -23,8 +23,8 @@ class System(system.System):
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_sources(jar_file_path) self.add_export_sources(jar_file_path)
self.add_export_flag("link", "-ldl") self.add_export_flag("link-lib", "dl")
self.add_export_flag("link", "-llog") self.add_export_flag("link-lib", "log")
self.add_export_flag("link", "-landroid") self.add_export_flag("link-lib", "android")

View File

@ -0,0 +1,25 @@
#!/usr/bin/python
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
# No check ==> on the basic std libs:
self.valid = True
# todo : create a searcher of the presence of the library:
self.add_export_flag("link-lib", "m")

View File

@ -0,0 +1,25 @@
#!/usr/bin/python
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
# No check ==> on the basic std libs:
self.valid = True
# todo : create a searcher of the presence of the library:
self.add_export_flag("link-lib", "m")

View File

@ -24,6 +24,6 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", "-lasound") self.add_export_flag("link-lib", "asound")

View File

@ -23,10 +23,10 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", [ self.add_export_flag("link-lib", [
"-lboost_system", "boost_system",
"-lboost_thread", "boost_thread",
"-lboost_chrono" "boost_chrono"
]) ])

View File

@ -23,6 +23,6 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", "-ljack") self.add_export_flag("link-lib", "jack")

View File

@ -20,6 +20,6 @@ class System(system.System):
# No check ==> on the basic std libs: # No check ==> on the basic std libs:
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", "-lm") self.add_export_flag("link-lib", "m")

View File

@ -24,7 +24,7 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", "-ljack") self.add_export_flag("link-lib", "oss")
""" """

View File

@ -23,6 +23,6 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", ["-lpulse-simple", "-lpulse"]) self.add_export_flag("link-lib", ["pulse-simple", "pulse"])

View File

@ -23,6 +23,6 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link", "-lz") self.add_export_flag("link-lib", "z")

View File

@ -0,0 +1,25 @@
#!/usr/bin/python
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
# No check ==> on the basic std libs:
self.valid = True
# todo : create a searcher of the presence of the library:
self.add_export_flag("link-lib", "m")

View File

@ -23,10 +23,10 @@ class System(system.System):
return; return;
self.valid = True self.valid = True
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_export_flag("link",[ self.add_export_flag("link-lib",[
"-ldsound", "dsound",
"-lwinmm", "winmm",
"-lole32" "ole32"
]) ])

View File

@ -0,0 +1,25 @@
#!/usr/bin/python
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license APACHE v2.0 (see license file)
##
from lutin import debug
from lutin import system
from lutin import tools
import os
class System(system.System):
def __init__(self, target):
system.System.__init__(self)
# create some HELP:
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
# No check ==> on the basic std libs:
self.valid = True
# todo : create a searcher of the presence of the library:
self.add_export_flag("link-lib", "m")