summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2025-03-31 17:04:47 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-25 12:37:57 +0100
commit45533863966ee6e6776c033381800f649425fb6c (patch)
treec53c226ee0d0bc8d717ec4cf19cc5b479175abb1 /documentation
parentb90aaa6b65a97f1045599722ba4f929616b34ceb (diff)
downloadpoky-45533863966ee6e6776c033381800f649425fb6c.tar.gz
ref-manual/variables.rst: add missing documentation for BUILD_* variables
These toolchain variables are used in a native context. Some of the BUILD_* variables missed documentation. Also, some of the base commands were also not there so document them. Some of existing BUILD_* variable documentation were missing the note about their usage in a native context, so add it too so that all BUILD_* variables are documented the same way. [YOCTO #15719] Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> (From yocto-docs rev: f16a641086a7c3546b599a5996c4f7a6db04967e) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit 87103afa1cb6690e9aaa87ca1f23e45eaaa359ac) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/ref-manual/variables.rst250
1 files changed, 230 insertions, 20 deletions
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index ab41482988..02a4d7b8fd 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -978,55 +978,165 @@ system and gives an overview of their function and contents.
978 variable is a useful pointer in case a bug in the software being 978 variable is a useful pointer in case a bug in the software being
979 built needs to be manually reported. 979 built needs to be manually reported.
980 980
981 :term:`BUILD_AR`
982 Specifies the architecture-specific :manpage:`archiver <ar(1)>` for the
983 build host, and its default definition is derived in part from
984 :term:`BUILD_PREFIX`::
985
986 BUILD_AR = "${BUILD_PREFIX}ar"
987
988 When building a :ref:`ref-classes-native` recipe, :term:`AR` is set to the
989 value of this variable by default.
990
991 The :term:`BUILD_AR` variable should not be set manually, and is rarely
992 used in recipes as :term:`AR` contains the appropriate value depending on
993 the context (native or target recipes). Exception be made for target
994 recipes that need to use the :manpage:`archiver <ar(1)>` from the build
995 host at some point during the build.
996
981 :term:`BUILD_ARCH` 997 :term:`BUILD_ARCH`
982 Specifies the architecture of the build host (e.g. ``i686``). The 998 Specifies the architecture of the build host (e.g. ``i686``). The
983 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the 999 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
984 machine name reported by the ``uname`` command. 1000 machine name reported by the ``uname`` command.
985 1001
1002 :term:`BUILD_AS`
1003 Specifies the architecture-specific :manpage:`assembler <as(1)>` for the
1004 build host, and its default definition is derived in part from
1005 :term:`BUILD_PREFIX`::
1006
1007 BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
1008
1009 When building a :ref:`ref-classes-native` recipe, :term:`AS` is set to the
1010 value of this variable by default.
1011
1012 The :term:`BUILD_AS` variable should not be set manually, and is rarely
1013 used in recipes as :term:`AS` contains the appropriate value depending on
1014 the context (native or target recipes). Exception be made for target
1015 recipes that need to use the :manpage:`assembler <as(1)>` from the build
1016 host at some point during the build.
1017
986 :term:`BUILD_AS_ARCH` 1018 :term:`BUILD_AS_ARCH`
987 Specifies the architecture-specific assembler flags for the build 1019 Specifies the architecture-specific assembler flags for the build
988 host. By default, the value of :term:`BUILD_AS_ARCH` is empty. 1020 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
989 1021
1022 :term:`BUILD_CC`
1023 Specifies the architecture-specific C compiler for the build host,
1024 and its default definition is derived in part from :term:`BUILD_PREFIX`
1025 and :term:`BUILD_CC_ARCH`::
1026
1027 BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
1028
1029 When building a :ref:`ref-classes-native` recipe, :term:`CC` is set to the
1030 value of this variable by default.
1031
1032 The :term:`BUILD_CC` variable should not be set manually, and is rarely
1033 used in recipes as :term:`CC` contains the appropriate value depending on
1034 the context (native or target recipes). Exception be made for target
1035 recipes that need to use the compiler from the build host at some point
1036 during the build.
1037
990 :term:`BUILD_CC_ARCH` 1038 :term:`BUILD_CC_ARCH`
991 Specifies the architecture-specific C compiler flags for the build 1039 Specifies the architecture-specific C compiler flags for the build
992 host. By default, the value of :term:`BUILD_CC_ARCH` is empty. 1040 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
993 1041
994 :term:`BUILD_CCLD` 1042 :term:`BUILD_CCLD`
995 Specifies the linker command to be used for the build host when the C 1043 Specifies the :manpage:`linker <ld(1)>` command to be used for the build
996 compiler is being used as the linker. By default, :term:`BUILD_CCLD` 1044 host when the C compiler is being used as the linker, and its default
997 points to GCC and passes as arguments the value of 1045 definition is derived in part from :term:`BUILD_PREFIX` and
998 :term:`BUILD_CC_ARCH`, assuming 1046 :term:`BUILD_CC_ARCH`::
999 :term:`BUILD_CC_ARCH` is set. 1047
1048 BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
1049
1050 When building a :ref:`ref-classes-native` recipe, :term:`CCLD` is set to
1051 the value of this variable by default.
1052
1053 The :term:`BUILD_CCLD` variable should not be set manually, and is rarely
1054 used in recipes as :term:`CCLD` contains the appropriate value depending on
1055 the context (native or target recipes). Exception be made for target
1056 recipes that need to use the :manpage:`linker <ld(1)>` from the build host
1057 at some point during the build.
1000 1058
1001 :term:`BUILD_CFLAGS` 1059 :term:`BUILD_CFLAGS`
1002 Specifies the flags to pass to the C compiler when building for the 1060 Specifies the flags to pass to the C compiler when building for the
1003 build host. When building in the ``-native`` context, 1061 build host. When building a :ref:`ref-classes-native` recipe,
1004 :term:`CFLAGS` is set to the value of this variable by 1062 :term:`CFLAGS` is set to the value of this variable by
1005 default. 1063 default.
1006 1064
1065 :term:`BUILD_CPP`
1066 Specifies the C preprocessor command (to both the C and the C++ compilers)
1067 when building for the build host, and its default definition is derived in
1068 part from :term:`BUILD_PREFIX` and :term:`BUILD_CC_ARCH`::
1069
1070 BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"
1071
1072 When building a :ref:`ref-classes-native` recipe, :term:`CPP` is set to
1073 the value of this variable by default.
1074
1075 The :term:`BUILD_CPP` variable should not be set manually, and is rarely
1076 used in recipes as :term:`CPP` contains the appropriate value depending on
1077 the context (native or target recipes). Exception be made for target
1078 recipes that need to use the preprocessor from the build host at some
1079 point during the build.
1080
1007 :term:`BUILD_CPPFLAGS` 1081 :term:`BUILD_CPPFLAGS`
1008 Specifies the flags to pass to the C preprocessor (i.e. to both the C 1082 Specifies the flags to pass to the C preprocessor (i.e. to both the C
1009 and the C++ compilers) when building for the build host. When 1083 and the C++ compilers) when building for the build host. When
1010 building in the ``-native`` context, :term:`CPPFLAGS` 1084 building in the ``-native`` context, :term:`CPPFLAGS`
1011 is set to the value of this variable by default. 1085 is set to the value of this variable by default.
1012 1086
1087 :term:`BUILD_CXX`
1088 Specifies the architecture-specific C++ compiler for the build host,
1089 and its default definition is derived in part from :term:`BUILD_PREFIX`
1090 and :term:`BUILD_CC_ARCH`::
1091
1092 BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
1093
1094 When building a :ref:`ref-classes-native` recipe, :term:`CXX` is set to
1095 the value of this variable by default.
1096
1097 The :term:`BUILD_CXX` variable should not be set manually, and is rarely
1098 used in recipes as :term:`CXX` contains the appropriate value depending on
1099 the context (native or target recipes). Exception be made for target
1100 recipes that need to use the C++ compiler from the build host at some
1101 point during the build.
1102
1013 :term:`BUILD_CXXFLAGS` 1103 :term:`BUILD_CXXFLAGS`
1014 Specifies the flags to pass to the C++ compiler when building for the 1104 Specifies the flags to pass to the C++ compiler when building for the
1015 build host. When building in the ``-native`` context, 1105 build host. When building a :ref:`ref-classes-native` recipe,
1016 :term:`CXXFLAGS` is set to the value of this variable 1106 :term:`CXXFLAGS` is set to the value of this variable
1017 by default. 1107 by default.
1018 1108
1019 :term:`BUILD_FC` 1109 :term:`BUILD_FC`
1020 Specifies the Fortran compiler command for the build host. By 1110 Specifies the Fortran compiler command for the build host, and its default
1021 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the 1111 definition is derived in part from :term:`BUILD_PREFIX` and
1022 value of :term:`BUILD_CC_ARCH`, assuming 1112 :term:`BUILD_CC_ARCH`::
1023 :term:`BUILD_CC_ARCH` is set. 1113
1114 BUILD_FC = "${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
1115
1116 When building a :ref:`ref-classes-native` recipe, :term:`FC` is set to the
1117 value of this variable by default.
1118
1119 The :term:`BUILD_FC` variable should not be set manually, and is rarely
1120 used in recipes as :term:`FC` contains the appropriate value depending on
1121 the context (native or target recipes). Exception be made for target
1122 recipes that need to use the Fortran compiler from the build host at some
1123 point during the build.
1024 1124
1025 :term:`BUILD_LD` 1125 :term:`BUILD_LD`
1026 Specifies the linker command for the build host. By default, 1126 Specifies the linker command for the build host, and its default
1027 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments 1127 definition is derived in part from :term:`BUILD_PREFIX` and
1028 the value of :term:`BUILD_LD_ARCH`, assuming 1128 :term:`BUILD_LD_ARCH`::
1029 :term:`BUILD_LD_ARCH` is set. 1129
1130 BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
1131
1132 When building a :ref:`ref-classes-native` recipe, :term:`LD` is set to the
1133 value of this variable by default.
1134
1135 The :term:`BUILD_LD` variable should not be set manually, and is rarely
1136 used in recipes as :term:`LD` contains the appropriate value depending on
1137 the context (native or target recipes). Exception be made for target
1138 recipes that need to use the linker from the build host at some point
1139 during the build.
1030 1140
1031 :term:`BUILD_LD_ARCH` 1141 :term:`BUILD_LD_ARCH`
1032 Specifies architecture-specific linker flags for the build host. By 1142 Specifies architecture-specific linker flags for the build host. By
@@ -1034,10 +1144,58 @@ system and gives an overview of their function and contents.
1034 1144
1035 :term:`BUILD_LDFLAGS` 1145 :term:`BUILD_LDFLAGS`
1036 Specifies the flags to pass to the linker when building for the build 1146 Specifies the flags to pass to the linker when building for the build
1037 host. When building in the ``-native`` context, 1147 host. When building a :ref:`ref-classes-native` recipe,
1038 :term:`LDFLAGS` is set to the value of this variable 1148 :term:`LDFLAGS` is set to the value of this variable
1039 by default. 1149 by default.
1040 1150
1151 :term:`BUILD_NM`
1152 Specifies the architecture-specific utility to list symbols from object
1153 files for the build host, and its default definition is derived in part
1154 from :term:`BUILD_PREFIX`::
1155
1156 BUILD_NM = "${BUILD_PREFIX}nm"
1157
1158 When building a :ref:`ref-classes-native` recipe, :term:`NM` is set to the
1159 value of this variable by default.
1160
1161 The :term:`BUILD_NM` variable should not be set manually, and is rarely
1162 used in recipes as :term:`NM` contains the appropriate value depending on
1163 the context (native or target recipes). Exception be made for target
1164 recipes that need to use the utility from the build host at some point
1165 during the build.
1166
1167 :term:`BUILD_OBJCOPY`
1168 Specifies the architecture-specific utility to copy object files for the
1169 build host, and its default definition is derived in part from
1170 :term:`BUILD_PREFIX`::
1171
1172 BUILD_OBJCOPY = "${BUILD_PREFIX}objcopy"
1173
1174 When building a :ref:`ref-classes-native` recipe, :term:`OBJCOPY` is set
1175 to the value of this variable by default.
1176
1177 The :term:`BUILD_OBJCOPY` variable should not be set manually, and is
1178 rarely used in recipes as :term:`OBJCOPY` contains the appropriate value
1179 depending on the context (native or target recipes). Exception be made for
1180 target recipes that need to use the utility from the build host at some
1181 point during the build.
1182
1183 :term:`BUILD_OBJDUMP`
1184 Specifies the architecture-specific utility to display object files
1185 information for the build host, and its default definition is derived in
1186 part from :term:`BUILD_PREFIX`::
1187
1188 BUILD_OBJDUMP = "${BUILD_PREFIX}objdump"
1189
1190 When building a :ref:`ref-classes-native` recipe, :term:`OBJDUMP` is set
1191 to the value of this variable by default.
1192
1193 The :term:`BUILD_OBJDUMP` variable should not be set manually, and is
1194 rarely used in recipes as :term:`OBJDUMP` contains the appropriate value
1195 depending on the context (native or target recipes). Exception be made for
1196 target recipes that need to use the utility from the build host at some
1197 point during the build.
1198
1041 :term:`BUILD_OPTIMIZATION` 1199 :term:`BUILD_OPTIMIZATION`
1042 Specifies the optimization flags passed to the C compiler when 1200 Specifies the optimization flags passed to the C compiler when
1043 building for the build host or the SDK. The flags are passed through 1201 building for the build host or the SDK. The flags are passed through
@@ -1058,11 +1216,53 @@ system and gives an overview of their function and contents.
1058 build system uses the :term:`BUILD_PREFIX` value to set the 1216 build system uses the :term:`BUILD_PREFIX` value to set the
1059 :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes. 1217 :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes.
1060 1218
1219 :term:`BUILD_RANLIB`
1220 Specifies the architecture-specific utility to generate indexes for
1221 archives for the build host, and its default definition is derived in part
1222 from :term:`BUILD_PREFIX`::
1223
1224 BUILD_RANLIB = "${BUILD_PREFIX}ranlib -D"
1225
1226 When building a :ref:`ref-classes-native` recipe, :term:`RANLIB` is set to
1227 the value of this variable by default.
1228
1229 The :term:`BUILD_RANLIB` variable should not be set manually, and is
1230 rarely used in recipes as :term:`RANLIB` contains the appropriate value
1231 depending on the context (native or target recipes). Exception be made for
1232 target recipes that need to use the utility from the build host at some
1233 point during the build.
1234
1235 :term:`BUILD_READELF`
1236 Specifies the architecture-specific utility to display information about
1237 ELF files for the build host, and its default definition is derived in
1238 part from :term:`BUILD_PREFIX`::
1239
1240 BUILD_READELF = "${BUILD_PREFIX}readelf"
1241
1242 When building a :ref:`ref-classes-native` recipe, :term:`READELF` is set
1243 to the value of this variable by default.
1244
1245 The :term:`BUILD_READELF` variable should not be set manually, and is
1246 rarely used in recipes as :term:`READELF` contains the appropriate value
1247 depending on the context (native or target recipes). Exception be made for
1248 target recipes that need to use the utility from the build host at some
1249 point during the build.
1250
1061 :term:`BUILD_STRIP` 1251 :term:`BUILD_STRIP`
1062 Specifies the command to be used to strip debugging symbols from 1252 Specifies the command to be used to strip debugging symbols from binaries
1063 binaries produced for the build host. By default, :term:`BUILD_STRIP` 1253 produced for the build host, and its default definition is derived in part
1064 points to 1254 from :term:`BUILD_PREFIX`::
1065 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. 1255
1256 BUILD_STRIP = "${BUILD_PREFIX}strip"
1257
1258 When building a :ref:`ref-classes-native` recipe, :term:`STRIP` is set to
1259 the value of this variable by default.
1260
1261 The :term:`BUILD_STRIP` variable should not be set manually, and is
1262 rarely used in recipes as :term:`STRIP` contains the appropriate value
1263 depending on the context (native or target recipes). Exception be made for
1264 target recipes that need to use the utility from the build host at some
1265 point during the build.
1066 1266
1067 :term:`BUILD_SYS` 1267 :term:`BUILD_SYS`
1068 Specifies the system, including the architecture and the operating 1268 Specifies the system, including the architecture and the operating
@@ -1258,6 +1458,10 @@ system and gives an overview of their function and contents.
1258 :term:`CC` 1458 :term:`CC`
1259 The minimal command and arguments used to run the C compiler. 1459 The minimal command and arguments used to run the C compiler.
1260 1460
1461 :term:`CCLD`
1462 The minimal command and arguments used to run the linker when the C
1463 compiler is being used as the linker.
1464
1261 :term:`CFLAGS` 1465 :term:`CFLAGS`
1262 Specifies the flags to pass to the C compiler. This variable is 1466 Specifies the flags to pass to the C compiler. This variable is
1263 exported to an environment variable and thus made visible to the 1467 exported to an environment variable and thus made visible to the
@@ -2793,6 +2997,9 @@ system and gives an overview of their function and contents.
2793 :term:`FAKEROOTNOENV` 2997 :term:`FAKEROOTNOENV`
2794 See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual. 2998 See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual.
2795 2999
3000 :term:`FC`
3001 The minimal command and arguments used to run the Fortran compiler.
3002
2796 :term:`FEATURE_PACKAGES` 3003 :term:`FEATURE_PACKAGES`
2797 Defines one or more packages to include in an image when a specific 3004 Defines one or more packages to include in an image when a specific
2798 item is included in :term:`IMAGE_FEATURES`. 3005 item is included in :term:`IMAGE_FEATURES`.
@@ -7114,6 +7321,9 @@ system and gives an overview of their function and contents.
7114 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the 7321 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
7115 BitBake User Manual for additional information on tasks and dependencies. 7322 BitBake User Manual for additional information on tasks and dependencies.
7116 7323
7324 :term:`READELF`
7325 The minimal command and arguments to run :manpage:`readelf <readelf(1)>`.
7326
7117 :term:`RECIPE_MAINTAINER` 7327 :term:`RECIPE_MAINTAINER`
7118 This variable defines the name and e-mail address of the maintainer of a 7328 This variable defines the name and e-mail address of the maintainer of a
7119 recipe. Such information can be used by human users submitted changes, 7329 recipe. Such information can be used by human users submitted changes,