glibc's build system rebuilds too much under Plash

When glibc's build system is run under Plash, make rebuilds too much: it seems it always rebuilds all the targets, unnecessarily.

Possible reasons:

Different globbing behaviour

Here is a small Makefile that reproduces the problem:

all:
        @echo $(wildcard .)

Normally, this prints ".". Under Plash, it prints an empty line.

Causes:

glibc makefiles

The following fragment in Makerules is responsible for making the different globbing behaviour rebuild everything:

# Make sure the subdirectory for object files gets created.
ifdef objpfx
ifeq (,$(wildcard $(objpfx).))
before-compile += $(objpfx).
$(objpfx).:
        $(make-target-directory)
endif
endif

Commenting out this block allows make -C glibc-build to re-run without rebuilding anything.

make has some odd code in dir.c in REAL_DIR_ENTRY(): when building with glibc, if d_ino == 0, the directory entry is not considered a proper entry and is ignored.

Resolution

I have partly fixed this by changing glibc's Makerules.

PlashIssues/MakeRebuildsTooMuch (last edited 2008-08-18 18:54:29 by MarkSeaborn)