]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
compiler: Rename host_build() to tools_build()
authorSimon Glass <sjg@chromium.org>
Sun, 26 Sep 2021 01:43:14 +0000 (19:43 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:26 +0000 (15:53 -0400)
With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are
heading towards calling this a tools build rather than a host build,
although of course it does happen on the host.

I cannot think of anything built by the host which cannot be described as
a tool, so rename this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
common/image-fit.c
common/image.c
include/compiler.h

index 5a0a0cc200727890c32ae797c2dc207681089c97..6f8e67e4158d8c0167a287ab8af4527ea1cad669 100644 (file)
@@ -509,7 +509,7 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
 
        ret = fit_image_get_data_and_size(fit, image_noffset, &data, &size);
 
-       if (!host_build()) {
+       if (!tools_build()) {
                printf("%s  Data Start:   ", p);
                if (ret) {
                        printf("unavailable\n");
@@ -1845,7 +1845,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
        if (conf_uname == NULL) {
                /* get configuration unit name from the default property */
                debug("No configuration specified, trying default...\n");
-               if (!host_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
+               if (!tools_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
                        noffset = fit_find_config_node(fit);
                        if (noffset < 0)
                                return noffset;
@@ -2093,7 +2093,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
        }
 
        bootstage_mark(bootstage_id + BOOTSTAGE_SUB_CHECK_ARCH);
-       if (!host_build() && IS_ENABLED(CONFIG_SANDBOX)) {
+       if (!tools_build() && IS_ENABLED(CONFIG_SANDBOX)) {
                if (!fit_image_check_target_arch(fit, noffset)) {
                        puts("Unsupported Architecture\n");
                        bootstage_error(bootstage_id + BOOTSTAGE_SUB_CHECK_ARCH);
@@ -2158,7 +2158,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
        }
 
        /* perform any post-processing on the image data */
-       if (!host_build() && IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS))
+       if (!tools_build() && IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS))
                board_fit_image_post_process(fit, noffset, &buf, &size);
 
        len = (ulong)size;
index 2f2fd052c508196fc6d384e5dfb82ddad3f037de..66685b4ba998011071f00981e0d6d7d307b7efb7 100644 (file)
@@ -460,11 +460,11 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
                        ret = -ENOSPC;
                break;
        case IH_COMP_GZIP:
-               if (!host_build() && CONFIG_IS_ENABLED(GZIP))
+               if (!tools_build() && CONFIG_IS_ENABLED(GZIP))
                        ret = gunzip(load_buf, unc_len, image_buf, &image_len);
                break;
        case IH_COMP_BZIP2:
-               if (!host_build() && CONFIG_IS_ENABLED(BZIP2)) {
+               if (!tools_build() && CONFIG_IS_ENABLED(BZIP2)) {
                        uint size = unc_len;
 
                        /*
@@ -478,7 +478,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
                }
                break;
        case IH_COMP_LZMA:
-               if (!host_build() && CONFIG_IS_ENABLED(LZMA)) {
+               if (!tools_build() && CONFIG_IS_ENABLED(LZMA)) {
                        SizeT lzma_len = unc_len;
 
                        ret = lzmaBuffToBuffDecompress(load_buf, &lzma_len,
@@ -487,7 +487,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
                }
                break;
        case IH_COMP_LZO:
-               if (!host_build() && CONFIG_IS_ENABLED(LZO)) {
+               if (!tools_build() && CONFIG_IS_ENABLED(LZO)) {
                        size_t size = unc_len;
 
                        ret = lzop_decompress(image_buf, image_len, load_buf, &size);
@@ -495,7 +495,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
                }
                break;
        case IH_COMP_LZ4:
-               if (!host_build() && CONFIG_IS_ENABLED(LZ4)) {
+               if (!tools_build() && CONFIG_IS_ENABLED(LZ4)) {
                        size_t size = unc_len;
 
                        ret = ulz4fn(image_buf, image_len, load_buf, &size);
@@ -503,7 +503,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
                }
                break;
        case IH_COMP_ZSTD:
-               if (!host_build() && CONFIG_IS_ENABLED(ZSTD)) {
+               if (!tools_build() && CONFIG_IS_ENABLED(ZSTD)) {
                        struct abuf in, out;
 
                        abuf_init_set(&in, image_buf, image_len);
index 6b0d3bf5374245af589b223b53cb1dc3ceb0e004..8cf11792e24853ffe20b3fac548b3a0a0d14e30d 100644 (file)
@@ -155,11 +155,12 @@ typedef unsigned long int uintptr_t;
 #endif
 
 /**
- * host_build() - check if we are building for the host
+ * tools_build() - check if we are building host tools
  *
  * @return true if building for the host, false if for a target
  */
-static inline bool host_build(void) {
+static inline bool tools_build(void)
+{
 #ifdef USE_HOSTCC
        return true;
 #else