[DEV] add control on a specific new clang flag

This commit is contained in:
Edouard DUPIN 2016-11-17 23:43:35 +01:00
parent 98e4dc9e8d
commit 49bb4ffa2b

View File

@ -90,7 +90,9 @@ class Target:
'-D__TARGET_ADDR__' + self.config["bus-size"] + 'BITS', '-D__TARGET_ADDR__' + self.config["bus-size"] + 'BITS',
'-D_REENTRANT' '-D_REENTRANT'
]) ])
self.add_flag("c++", "-Wno-undefined-var-template") if self.config["compilator"] == "clang" \
and self.xx_version >= 4002001: # >= 4.2.1
self.add_flag("c++", "-Wno-undefined-var-template")
self.add_flag("c", "-nodefaultlibs") self.add_flag("c", "-nodefaultlibs")
self.add_flag("c++", "-nostdlib") self.add_flag("c++", "-nostdlib")
self.add_flag("ar", 'rcs') self.add_flag("ar", 'rcs')
@ -317,7 +319,7 @@ class Target:
if ret == False: if ret == False:
debug.error("Can not get the g++/clang++ version ...") debug.error("Can not get the g++/clang++ version ...")
self.xx_version = self.create_number_from_version_string(ret) self.xx_version = self.create_number_from_version_string(ret)
debug.verbose(self.config["compilator"] + "++ version=" + str(ret) + " number=" + str(self.xx_version)) debug.debug(self.config["compilator"] + "++ version=" + str(ret) + " number=" + str(self.xx_version))
self.ld = self.cross + "ld" self.ld = self.cross + "ld"
self.nm = self.cross + "nm" self.nm = self.cross + "nm"