Skip to content

Commit 625dd9c

Browse files
committed
detect-environment: Document the detect_arch function
Ticket: ENT-12600 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 5b32d1a commit 625dd9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build-scripts/detect-environment

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ detect_packaging()
272272
export DEP_PACKAGING PACKAGING
273273
}
274274

275+
# This function determines which architecture to build for based on the system
276+
# we're building on. Unless we are cross compiling, then it's determined by the
277+
# CROSS_TARGET variable.
275278
detect_arch()
276279
{
277280
case "$DEP_PACKAGING" in
@@ -307,6 +310,9 @@ detect_arch()
307310
;;
308311
esac
309312

313+
# Windows is build on Debian. Hence we need to determine the architecture
314+
# based on the 'CROSS_TARGET' variable which is derived from the 'label'
315+
# variable instead of the system that we are building on.
310316
case "$CROSS_TARGET" in
311317
'')
312318
;;

0 commit comments

Comments
 (0)