Skip to content

Commit

Permalink
fixup! build: Generate toolchain.cmake in depends
Browse files Browse the repository at this point in the history
To detect cross-compiling, the host and build platforms are compared.
The `build` variable is always an output of `config.sub`, but the `host`
is not. This can lead to false results. For example, on OpenBSD:
 - host=amd64-unknown-openbsd7.5
 - build=x86_64-unknown-openbsd7.5

This change replaces the `host` variable with `canonical_host`, which is
also always an output of `config.sub`. Thus, `canonical_host` and
`build` are always properly comparable.
  • Loading branch information
hebasto committed Aug 4, 2024
1 parent a687016 commit 263135c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
$< > $@
touch $@

ifeq ($(host),$(build))
ifeq ($(canonical_host),$(build))
crosscompiling=FALSE
else
crosscompiling=TRUE
Expand Down

0 comments on commit 263135c

Please sign in to comment.