aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/toolchain-scripts.bbclass
AgeCommit message (Expand)Author
2017-06-28toolchain-scripts: add check for LD_LIBRARY_PATH in the SDK env setup scriptDenys Dmytriyenko
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
2017-01-26toolchain-scripts: remove CCACHE_PATH from environment scriptJoshua Lock
2017-01-23Switch to Recipe Specific SysrootsRichard Purdie
2016-12-16meta: remove True option to getVar callsJoshua Lock
2016-09-23toolchain-scripts-base: add base class for toolchain_create_sdk_versionJoshua Lock
2016-09-22autotools/siteinfo: Tweak CONFIG_SITE handling for determism/racesRichard Purdie
2016-08-04bitbake.conf/toolchain-scripts.bbclass: Remove debug prefix mappings in SDKJacob Kroon
2016-07-01toolchain-scripts: add sysroot/usr/share/pkgconfig to PKG_CONFIG_PATHRoss Burton
2016-05-06toolchain-scripts: replace source built-in callStephano Cetola
2016-02-21toolchain-scripts.bbclass: add three other path to PATH in env.shJun Zhang
2016-02-07toolchain-scripts: drop PYTHONHOMEChristopher Larson
2016-02-06toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOMERandy Witt
2015-12-082014-11-12meta-environment: Fix config-site with a multilib configMark Hatle
2014-10-10toolchains-scripts: Add support for target environment scriptsRichard Purdie
2014-10-10toolchain-scripts.bbclass: Allow sourcing of subscript for environmentOtavio Salvador
2014-07-23toolchain-script: Really fix CANADIANEXTRAOE issuesRichard Purdie
2014-07-03toolchain-scripts: Add handling for CANADIANEXTRAOSRichard Purdie
2013-11-06toolchain-scripts/meta-environment: Further cleanup code duplicationRichard Purdie
2013-11-06toolchain-scripts: Drop darwin8 codeRichard Purdie
2013-11-06toolchain-scripts/meta-environment: Merge toolchain_create_sdk_env_script and...Richard Purdie
2013-10-11toolchain-scripts: Fix TARGET_SYS referenceRichard Purdie
2013-10-04cross-canadian: Fix TUNE_PKGARCH referencesRichard Purdie
2013-05-16toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup fileZongchun Yu
2013-02-28Add kernel arch variable in SDK environment variable list for supporting buil...Jessica Zhang
2013-02-19toolchain-scripts.bbclass: add PYTHONHOME variable to environment-setupLaurentiu Palcu
2012-10-05toolchain-scripts.bbclass: Export M4Khem Raj
2012-07-19toolchain-scripts: Remove extra - from ar/nm command namesRichard Purdie
2012-07-19Remove the - between ${TARGET_PREFIX} and ar/nm for the env script, as this w...Martin Ertsaas
2012-07-18meta-ide-support: Add native qemu support for meta-ide-supportJessica Zhang
2012-07-17toolchain-scripts: Sync the SDK/ADT values to the build systemMark Hatle
2012-07-03populate_sdk: enable basic multilib supportMark Hatle
2012-03-23meta-toolchain: Popluated the libc siteconfig files.Lianhao Lu
2012-03-05meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie
2012-03-01toolchain-scripts: Exclude variables causing the recipe to become unecessaril...Richard Purdie
2012-02-01classes: replace 'Poky' with 'OE-core'Koen Kooi
2012-01-09add sysroot support for meta-ide-support which is the toolchain within build ...Jessica Zhang
2011-11-29toolchain-scripts.bbclass: Make it work when TCLIBC=uclibcKhem Raj
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
2011-09-28Fixed a typo for setting up OECORE_ACLOCAL_OPTS for adt-installer caseJessica Zhang
"p">(self.version)} if option.removed == self.version: self.error(_("The %(option)s option is no longer supported.") % mapping) else: self.error(_("The %(option)s option was removed in version %(removed)s, but you are using kickstart syntax version %(version)s.") % mapping) elif seen(self, option) and usedDeprecated(self, option): mapping = {"lineno": self.lineno, "option": option} warnings.warn(_("Ignoring deprecated option on line %(lineno)s: The %(option)s option has been deprecated and no longer has any effect. It may be removed from future releases, which will result in a fatal error from kickstart. Please modify your kickstart file to remove this option.") % mapping, DeprecationWarning) return (values, args) def parse_args(self, *args, **kwargs): if kwargs.has_key("lineno"): self.lineno = kwargs.pop("lineno") return OptionParser.parse_args(self, **kwargs) def __init__(self, mapping=None, version=None): """Create a new KSOptionParser instance. Each KickstartCommand subclass should create one instance of KSOptionParser, providing at least the lineno attribute. mapping and version are not required. Instance attributes: mapping -- A mapping from option strings to different values. version -- The version of the kickstart syntax we are checking against. """ OptionParser.__init__(self, option_class=KSOption, add_help_option=False, conflict_handler="resolve") if mapping is None: self.map = {} else: self.map = mapping self.lineno = None self.option_seen = {} self.version = version def _check_ksboolean(option, opt, value): if value.lower() in ("on", "yes", "true", "1"): return True elif value.lower() in ("off", "no", "false", "0"): return False else: mapping = {"opt": opt, "value": value} raise OptionValueError(_("Option %(opt)s: invalid boolean value: %(value)r") % mapping) def _check_string(option, opt, value): if len(value) > 2 and value.startswith("--"): mapping = {"opt": opt, "value": value} raise OptionValueError(_("Option %(opt)s: invalid string value: %(value)r") % mapping) else: return value def _check_size(option, opt, value): # Former default was MB if (value.isdigit()): return int(value) * 1024L mapping = {"opt": opt, "value": value} if (not value[:-1].isdigit()): raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping) size = int(value[:-1]) if (value.endswith("k") or value.endswith("K")): return size if (value.endswith("M")): return size * 1024L if (value.endswith("G")): return size * 1024L * 1024L raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping) # Creates a new Option class that supports several new attributes: # - required: any option with this attribute must be supplied or an exception # is thrown # - introduced: the kickstart syntax version that this option first appeared # in - an exception will be raised if the option is used and # the specified syntax version is less than the value of this # attribute # - deprecated: the kickstart syntax version that this option was deprecated # in - a DeprecationWarning will be thrown if the option is # used and the specified syntax version is greater than the # value of this attribute # - removed: the kickstart syntax version that this option was removed in - an # exception will be raised if the option is used and the specified # syntax version is greated than the value of this attribute # Also creates a new type: # - ksboolean: support various kinds of boolean values on an option # And two new actions: # - map : allows you to define an opt -> val mapping such that dest gets val # when opt is seen # - map_extend: allows you to define an opt -> [val1, ... valn] mapping such # that dest gets a list of vals built up when opt is seen class KSOption (Option): ATTRS = Option.ATTRS + ['introduced', 'deprecated', 'removed', 'required'] ACTIONS = Option.ACTIONS + ("map", "map_extend",) STORE_ACTIONS = Option.STORE_ACTIONS + ("map", "map_extend",) TYPES = Option.TYPES + ("ksboolean", "string", "size") TYPE_CHECKER = copy(Option.TYPE_CHECKER) TYPE_CHECKER["ksboolean"] = _check_ksboolean TYPE_CHECKER["string"] = _check_string TYPE_CHECKER["size"] = _check_size def _check_required(self): if self.required and not self.takes_value(): raise OptionError(_("Required flag set for option that doesn't take a value"), self) # Make sure _check_required() is called from the constructor! CHECK_METHODS = Option.CHECK_METHODS + [_check_required] def process (self, opt, value, values, parser): Option.process(self, opt, value, values, parser) parser.option_seen[self] = 1 # Override default take_action method to handle our custom actions. def take_action(self, action, dest, opt, value, values, parser): if action == "map": values.ensure_value(dest, parser.map[opt.lstrip('-')]) elif action == "map_extend": values.ensure_value(dest, []).extend(parser.map[opt.lstrip('-')]) else: Option.take_action(self, action, dest, opt, value, values, parser) def takes_value(self): # Deprecated options don't take a value. return Option.takes_value(self) and not self.deprecated def __init__(self, *args, **kwargs): self.deprecated = False self.required = False Option.__init__(self, *args, **kwargs)