[LTP] [PATCH 1/1] compat_16: Define USE_LEGACY_COMPAT_16_H for legacy tests
Li Wang
liwang@redhat.com
Thu Jul 20 05:13:59 CEST 2023
Hi Petr,
On Wed, Jul 19, 2023 at 6:12 PM Petr Vorel <pvorel@suse.cz> wrote:
> Hi Li,
>
> ...
> > I'm not sure here if we really need COMPAT_16_H for choosing two compat
> > header file.
> > As we already use hard code in C source file like #include "compat_16.h"
> or
> > "compat_tst_16.h",
> > so compile with -I the header directory is enough I guess.
>
> > Try this simple compat_16.mk, it at least works well on my side.
> > Or, did I miss anything in the 16bit compilation?
>
> I like this simplification.
>
> Well, touch compat_16.h causes rebuilding tests which use compat_tst_16.h.
> I don't mind that. But OTOH touch compat_tst_16.h does not trigger
> rebuilding
> tests which use compat_tst_16.h :( (tested on
> testcases/kernel/syscalls/setregid). Could you please recheck that?
>
Good point, I overlooked the prerequisite for the target build, so it needs
adding back.
But we don't have the necessary to keep INTERMEDIATE object syntax.
Delete some lines based on your patch:
--- a/testcases/kernel/syscalls/utils/compat_16.mk
+++ b/testcases/kernel/syscalls/utils/compat_16.mk
@@ -53,11 +53,8 @@ CPPFLAGS += -I$(abs_srcdir)
-I$(abs_srcdir)/../utils
SRCS ?= $(sort $(wildcard $(abs_srcdir)/*.c))
MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
-MAKE_TARGETS_OBJS_WO_COMPAT_16 := $(addsuffix .o,$(MAKE_TARGETS))
MAKE_TARGETS += $(addsuffix _16,$(MAKE_TARGETS))
-# XXX (garrcoop): This code should be put in question as it cannot be
applied
-# (no .h file, no TST_USE_NEWER64_SYSCALL def).
DEF_16 := TST_USE_COMPAT16_SYSCALL
ifeq ($(USE_LEGACY_COMPAT_16_H),1)
@@ -66,13 +63,7 @@ else
COMPAT_16_H := $(abs_srcdir)/../utils/compat_tst_16.h
endif
-ifneq ($(wildcard $(COMPAT_16_H)),)
-$(MAKE_TARGETS_OBJS_WO_COMPAT_16): $(COMPAT_16_H)
-.INTERMEDIATE: $(MAKE_TARGETS_OBJS_WO_COMPAT_16)
-endif
-
%_16: CPPFLAGS += -D$(DEF_16)=1
-# XXX (garrcoop): End section of code in question..
%_16.o: %.c $(COMPAT_16_H)
$(COMPILE.c) $(OUTPUT_OPTION) $<
--
Regards,
Li Wang
More information about the ltp
mailing list