Skip to content

Commit

Permalink
busybox: fix the problem of repeated compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwckf committed Dec 30, 2020
1 parent b425137 commit c3993d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion trunk/user/busybox/busybox-1.24.x/Makefile.flags
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CPPFLAGS += \
-include include/autoconf.h \
-D_GNU_SOURCE -DNDEBUG \
$(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
-D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP
-DBB_VER=$(call name-fix,$(BB_VER)) -DBB_BT=AUTOCONF_TIMESTAMP

CFLAGS += $(call cc-option,-Wall,)
CFLAGS += $(call cc-option,-Wshadow,)
Expand Down
1 change: 0 additions & 1 deletion trunk/user/busybox/busybox-1.24.x/scripts/Makefile.IMA
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump

CFLAGS := $(CFLAGS)
CPPFLAGS += -D"KBUILD_STR(s)=\#s" #-Q

# We need some generic definitions
include $(srctree)/scripts/Kbuild.include
Expand Down
8 changes: 4 additions & 4 deletions trunk/user/busybox/busybox-1.24.x/scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs))
# Note: It's possible that one object gets potentially linked into more
# than one module. In that case KBUILD_MODNAME will be set to foo_bar,
# where foo and bar are the name of the modules.
name-fix = $(subst $(comma),_,$(subst -,_,$1))
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(*F)))"
name-fix = $(squote)$(quote)$(subst $(comma),_,$(subst -,_,$1))$(quote)$(squote)
basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
modname_flags = $(if $(filter 1,$(words $(modname))),\
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
-DKBUILD_MODNAME=$(call name-fix,$(modname)))

_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
Expand All @@ -110,7 +110,7 @@ endif

c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
$(__c_flags) $(modkern_cflags) \
-D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
$(basename_flags) $(modname_flags)

a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
$(__a_flags) $(modkern_aflags)
Expand Down

0 comments on commit c3993d4

Please sign in to comment.