Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/niminst/makefile.nimf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ endif
target := ?{"$(binDir)/" & toLowerAscii(c.name)}


ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
## get CPU arch from GCC instead of using `uname -m` as GCC target CPU arch can be different from uname.
## see #25296
## it should also get OS from GCC so that csource can be build with more GCC for cross compilation.
## but parsing OS name from `gcc -dumpmachine` is hard:
## https://wiki.osdev.org/Target_Triplet
ucpu := $(shell sh -c '"$(CC)" -dumpmachine | sed "s/-.*//" | tr "[:upper:]" "[:lower:]"')
##ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
ifeq ($(OS),Windows_NT)
uos := windows
else
Expand Down
Loading