Re: [PATCH] selftests: fix compile error for sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/05/2017 03:08 AM, Lei Yang wrote:
> I got below error message when building sync test:
> 
> make[1]: Entering directory `tools/testing/selftests/sync'
> gcc -c sync.c -o tools/testing/selftests/sync/sync.o
> sync.c:42:29: fatal error: linux/sync_file.h: No such file or directory
>  #include <linux/sync_file.h>
> 
> obviously, CFLAGS and LDFLAGS are not used when comipling.
> 
> Signed-off-by: Lei Yang <Lei.Yang@xxxxxxxxxxxxx>
> ---
>  tools/testing/selftests/sync/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
> index 8e04d0a..46cbcc3 100644
> --- a/tools/testing/selftests/sync/Makefile
> +++ b/tools/testing/selftests/sync/Makefile
> @@ -29,9 +29,9 @@ $(TEST_CUSTOM_PROGS): $(TESTS) $(OBJS)
>  	$(CC) -o $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS) $(CFLAGS) $(LDFLAGS)
>  
>  $(OBJS): $(OUTPUT)/%.o: %.c
> -	$(CC) -c $^ -o $@
> +	$(CC) -c $^ -o $@ $(CFLAGS) $(LDFLAGS)
>  
>  $(TESTS): $(OUTPUT)/%.o: %.c
> -	$(CC) -c $^ -o $@
> +	$(CC) -c $^ -o $@ $(CFLAGS) $(LDFLAGS)
>  
>  EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS)
> 

How are you building the test? I am not seeing the error on linux-4.14.0-rc8

thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux