lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 2/3] selftests/x86/Makefile: Support per-target $(LIBS) configuration
    Date
    And avoid compiling PCHs by accident.

    Signed-off-by: Florian Weimer <fweimer@redhat.com>
    ---
    v3: Patch split out.

    tools/testing/selftests/x86/Makefile | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
    index 8a1f62ab3c8e..0993d12f2c38 100644
    --- a/tools/testing/selftests/x86/Makefile
    +++ b/tools/testing/selftests/x86/Makefile
    @@ -72,10 +72,12 @@ all_64: $(BINARIES_64)
    EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64)

    $(BINARIES_32): $(OUTPUT)/%_32: %.c helpers.h
    - $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm
    + $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(filter-out %.h, $^) \
    + $(or $(LIBS), -lrt -ldl -lm)

    $(BINARIES_64): $(OUTPUT)/%_64: %.c helpers.h
    - $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
    + $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(filter-out %.h, $^) \
    + $(or $(LIBS), -lrt -ldl -lm)

    # x86_64 users should be encouraged to install 32-bit libraries
    ifeq ($(CAN_BUILD_I386)$(CAN_BUILD_X86_64),01)
    --
    2.33.1

    \
     
     \ /
      Last update: 2022-01-05 17:03    [W:4.050 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site