Closed caryatid closed 7 years ago
oh i see what's going on here. nbperf is a tool that's supposed to run on the host, so it is subject to be compiled with the host C compiler:
$(TOOL_NBPERF): $(NBPERF_OBJS)
$(HOSTCC) $(LDFLAGS_HOST) $^ -o $@
what you're doing here is effectively cross-compiling, because your native toolchain is different from the target toolchain, and so the intention is that you set HOSTCC=gcc
, and if you want the temporary throw-away nbperf statically linked for whatever reason, you can use LDFLAGS_HOST. HOSTCC is the standard variable name for the hostcompiler in makefile-only build systems, such as e.g. the one from linux kernel, busybox, etc.
HTH
just for clarification: you can leave everything else as you have it right now, just add the HOSTCC. the build system detects crosscompilation when CC != HOSTCC and will do the right thing. if you encounter any more issues, you're welcome to ask!
Awesome && built. Thank you so much!
great! thanks for your report!
Attempting a static build. I have a static binutils, musl-libc, and gcc targeted to that libc.
My config.mak (aside, would be nice if build recognized config.mk as well ) looks like:
I then run "make all-static" but it doesn't seem to pull in the LDFLAGS and the build does not build nbperf statically:
It is just after the nbperf build that I get the error which is ( with nbperf's called build command for context )
Any ideas what could be going on? Also apologies if this is in the wrong place; didn't see anywhere else in the readme to submit a build issue.
Thank you!