You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before the first compile of NEMU, $(CONFIG_CC) is not set by KConfig. So calling CC = $(call remove_quote,$(CONFIG_CC)) clears $(CC) by mistake, which leads to the probable failure of make menuconfig when compiling fixdeps.c . And that failure seems distribution dependent (specifically, default GNU Make configuration in each distribution). e.g. Arch Linux seems giving a default value cc to $(CC) for each make instance but Nix does not, which causes error in the latter.
#84 and #89 resolve this problem by adding a check of $(CONFIG_CC), setting $(CC) only if config variable is not empty. However, it doesn't really solve the missing compiler problem but leaving it behind to uncertain fallback value. IMO, as a build prerequisite, the compiling process and tools should be well-defined to ensure menuconfig would work.
So my suggestion is, $(CC) should be explicitly set in tools/fixdep/Makefile :
--- a/nemu/tools/fixdep/Makefile+++ b/nemu/tools/fixdep/Makefile@@ -1,3 +1,4 @@
NAME = fixdep
SRCS = fixdep.c
+CC = gcc
include $(NEMU_HOME)/scripts/build.mk
The text was updated successfully, but these errors were encountered:
PeterWang-dev
changed the title
[Feature Request] $(CC) should be explicitly defined when compiling fixdeps.c
[Bug] $(CC) should be explicitly defined when compiling fixdeps.cDec 6, 2024
Before the first compile of NEMU, $(CONFIG_CC) is not set by KConfig. So calling
CC = $(call remove_quote,$(CONFIG_CC))
clears$(CC)
by mistake, which leads to the probable failure ofmake menuconfig
when compilingfixdeps.c
. And that failure seems distribution dependent (specifically, default GNU Make configuration in each distribution). e.g. Arch Linux seems giving a default valuecc
to$(CC)
for eachmake
instance but Nix does not, which causes error in the latter.#84 and #89 resolve this problem by adding a check of
$(CONFIG_CC)
, setting$(CC)
only if config variable is not empty. However, it doesn't really solve the missing compiler problem but leaving it behind to uncertain fallback value. IMO, as a build prerequisite, the compiling process and tools should be well-defined to ensuremenuconfig
would work.So my suggestion is,
$(CC)
should be explicitly set intools/fixdep/Makefile
:The text was updated successfully, but these errors were encountered: