Skip to content

Commit

Permalink
lkl: use gnustat on freebsd
Browse files Browse the repository at this point in the history
Fixes torvalds#368.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Jan 19, 2018
1 parent bda5257 commit b1decfa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/lkl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ TARGETS := $(progs-y:%=$(OUTPUT)%$(EXESUF))
TARGETS += $(libs-y:%=$(OUTPUT)%$(SOSUF))
all: $(TARGETS)

# this workaround is for FreeBSD
bin/stat:
ifeq ($(LKL_HOST_CONFIG_BSD),y)
$(Q)ln -sf `which gnustat` bin/stat
else
$(Q)touch bin/stat
endif

# rule to build lkl.o
$(OUTPUT)lib/lkl.o:
$(OUTPUT)lib/lkl.o: bin/stat
$(Q)$(MAKE) -C ../.. ARCH=lkl $(KOPT) defconfig
# this workaround is for arm32 linker (ld.gold)
$(Q)export PATH=$(srctree)/tools/lkl/bin/:${PATH} ;\
Expand Down Expand Up @@ -81,7 +89,7 @@ clean:
-delete -o -name '\.*.d' -delete
$(call QUIET_CLEAN, headers)$(RM) -r $(OUTPUT)/include/lkl/
$(call QUIET_CLEAN, liblkl.a)$(RM) $(OUTPUT)/liblkl.a
$(call QUIET_CLEAN, targets)$(RM) $(TARGETS)
$(call QUIET_CLEAN, targets)$(RM) $(TARGETS) bin/stat

clean-conf: clean
$(call QUIET_CLEAN, Makefile.conf)$(RM) $(OUTPUT)/Makefile.conf
Expand Down

0 comments on commit b1decfa

Please sign in to comment.