diff options
80 files changed, 385 insertions, 30 deletions
diff --git a/Makeconfig b/Makeconfig index c3496452b6..b6357d0b19 100644 --- a/Makeconfig +++ b/Makeconfig @@ -1235,6 +1235,20 @@ $(common-objpfx)versions.stmp: $(common-objpfx)Versions.all \ touch $@ endif # avoid-generated endif # $(build-shared) = yes + +-include $(common-objpfx)time64-compat.mk +postclean-generated += time64-compat.mk + +$(common-objpfx)time64-compat.mk: $(sysd-versions-force) \ + $(common-objpfx)time64-compat.i + sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T + mv -f $@T $@ +$(common-objpfx)time64-compat.i: $(..)Makeconfig + printf "#include <time64-compat.h>\n#ifdef TIME64_NON_DEFAULT\nhave-time64-compat = yes\n#endif" \ + | $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - > $@T + mv -f $@T $@ + + endif # sysd-sorted-done # The name under which the run-time dynamic linker is installed. @@ -771,7 +771,8 @@ endif $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \ $(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \ $(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \ - $(addsuffix .d,$(tests) $(tests-internal) $(xtests) $(test-srcs)) + $(addsuffix .d,$(tests) $(tests-internal) $(xtests) \ + $(test-srcs) $(tests-time64) $(xtests-time64)) ifeq ($(build-programs),yes) +depfiles += $(addsuffix .d,$(others) $(sysdep-others)) endif @@ -1286,6 +1287,21 @@ check: tests .PHONY: xcheck xcheck: xtests +# Handle tests-time64 and xtests-time64 that should built with LFS +# and 64-bit time support. +include $(o-iterator) +define o-iterator-doit +$(foreach f,$(tests-time64) $(xtests-time64),\ + $(objpfx)$(f)$(o)): CFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +ifeq ($(have-time64-compat),yes) +tests += $(foreach t,$(tests-time64),$(t)) +xtests += $(foreach t,$(xtests-time64),$(t)) +endif + # The only difference between MODULE_NAME=testsuite and MODULE_NAME=nonlib is # that almost all internal declarations from config.h, libc-symbols.h, and # include/*.h are not available to 'testsuite' code, but are to 'nonlib' code. |
