From patchwork Fri Jan 17 16:53:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 11339549 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 195A714B4 for ; Fri, 17 Jan 2020 16:54:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB740214AF for ; Fri, 17 Jan 2020 16:53:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="U38fXrW2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729050AbgAQQx7 (ORCPT ); Fri, 17 Jan 2020 11:53:59 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:46219 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726684AbgAQQx7 (ORCPT ); Fri, 17 Jan 2020 11:53:59 -0500 Received: by mail-io1-f65.google.com with SMTP id t26so26751593ioi.13 for ; Fri, 17 Jan 2020 08:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nyGJWsyTKkrgy7HZPA+UXNCoDltHdQbF47bF/H777tA=; b=U38fXrW2OxaXp4sqTsmCr4POevsntbUi7GOoCjDmm6E2Eq8+gMvI5hv6kKT2VIHhfL FrG5j3Xvg01cDie2KSjwgDxmYzEYXO/L/gqboMLJYQL2Za8zv5AxYxN0XpyIh6t8Oiz1 4ysCZDtqNui0yNjenG2zObc4paijp5zwOGr3b8KU1ysGyp3+cd22OAjT3MyzvRkgH20V 8Us7MJ61BeuTsVGHZLn43PfJAFN5w096D0daUoROwzyDF+LP4JZ4fSXOs8sGE2Y3ZX7v s6uNeAa3X210wej7yLVvttw1txsGSpnDmhtsUELDq8WJH3Z1jStthNAHduDsl1I0kpoE hMYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nyGJWsyTKkrgy7HZPA+UXNCoDltHdQbF47bF/H777tA=; b=iqnfZqUqnuwHPCTfSYEXC+yjzlAHbbHcinskmuMjsl7zngM4rDIPLXViFKGXgn9vfl F/X9mv9Hfo2K0gNH7ChFl5QbUnqmSjpdLVbmaQc34fYKgykAu+i0Lk0EKwBAqZbZrmrL BIAXyU7+Rm2RdA2cDMBcr/EraziyDoI3POzwEinMKP/YrYoDRZQcbhRw70bgTGSgbEuj v9CXU4Yl4ZpbCzV2EtmyhJW2EsNCF7fKDVpJXjh6f3vt2nU+I4PWAmyJCInqwnF02hv0 tSBrOqoxtmtIAOaa2qKRdowqHcO52Va6P8zjbE9Gyv9OLOOaa7122HNMjgtPg4fyp9xC ssAg== X-Gm-Message-State: APjAAAVa4NS6XaUI6LVG+QgNN6K1Y2U+25wT5qNXV3QSw5swtTnlddOH 6ZWxQcyLiIYEOy5KHkL+YSQjkg== X-Google-Smtp-Source: APXvYqzcThZp+w7bcJSuEY6nvNEKKKQwjY3iu6iKJqwym9wa4/Nlt5pRDhUAXs4Xuv2n3kLUB8BpZw== X-Received: by 2002:a6b:fc02:: with SMTP id r2mr20538419ioh.183.1579280038463; Fri, 17 Jan 2020 08:53:58 -0800 (PST) Received: from alago.cortijodelrio.net (CableLink-189-219-74-147.Hosts.InterCable.net. [189.219.74.147]) by smtp.googlemail.com with ESMTPSA id f16sm8120662ilq.16.2020.01.17.08.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 08:53:57 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuah@kernel.org Cc: =?utf-8?q?Daniel_D=C3=ADaz?= , Thomas Gleixner , Andy Lutomirski , Dave Hansen , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/3] selftests/x86: Build with LDFLAGS and LDLIBS Date: Fri, 17 Jan 2020 10:53:26 -0600 Message-Id: <20200117165330.17015-1-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org During cross-compilation, it was discovered that LDFLAGS and LDLIBS were not being used while building binaries, leading to defaults which were not necessarily correct. OpenEmbedded reported this kind of problem: ERROR: QA Issue: No GNU_HASH in the ELF binary [...], didn't pass LDFLAGS? Signed-off-by: Daniel Díaz Acked-by: Thomas Gleixner --- tools/testing/selftests/x86/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 5d49bfec1e9a..f8360454eafd 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -71,10 +71,10 @@ all_64: $(BINARIES_64) EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64) $(BINARIES_32): $(OUTPUT)/%_32: %.c - $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm + $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -lrt -ldl -lm $(BINARIES_64): $(OUTPUT)/%_64: %.c - $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl + $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -lrt -ldl # x86_64 users should be encouraged to install 32-bit libraries ifeq ($(CAN_BUILD_I386)$(CAN_BUILD_X86_64),01) From patchwork Fri Jan 17 16:53:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 11339551 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7AF7414B4 for ; Fri, 17 Jan 2020 16:54:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 594BB21582 for ; Fri, 17 Jan 2020 16:54:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SZtwdh2o" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729138AbgAQQyG (ORCPT ); Fri, 17 Jan 2020 11:54:06 -0500 Received: from mail-il1-f195.google.com ([209.85.166.195]:41900 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729129AbgAQQyF (ORCPT ); Fri, 17 Jan 2020 11:54:05 -0500 Received: by mail-il1-f195.google.com with SMTP id f10so21787063ils.8 for ; Fri, 17 Jan 2020 08:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=brzZaUJh7FW1ka56Adtf/85XWoAeQqVQT/Er0invsYs=; b=SZtwdh2oqjI+UBiZ9BSi5WKvwkiUFyfwGoVa2E3NdmvReO0bKyMmTi7Ubdbzdm1zYx j/dvlz0YjLN6po1K1VfcfjAdHKCvHItvP3Fh0gJV3ri9ioJU/CfhoGK21WXnfbbiT9Ji VousTxLZB3mEZQk6cxudxSPYWMu4CwYT2N1RfGnbN5M51Qg1EEcVToajht0YCvQ0kEfi aFDZVWqMkJNUKyTuLZY22D6P6bg1mg5zo/PuTI9B2KNZ9AMzwyoslvWMmqdQS7Se9uAT caEUvK8/k9nEXVFSzcrVcZBzcRGDYYGKFiV5c/iPuhhat3MwI0pN5oV/tk6ytlYWaiwu EiUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=brzZaUJh7FW1ka56Adtf/85XWoAeQqVQT/Er0invsYs=; b=rfw8Eg/JYnqH5NHWhq5N1/kSafeeFs+uIj0Pl2sHAbw7uoKxYrVCbvO4Ymvbv+lInY SY3VhOd3TEQCU4JTcTFXbpCJtKNrChCfIAu7LdHa0Xn80y1+mvbhoSaF4hNqbwJiTptY Gwz2Uf3+m/jrZTnljUYAcFsKI+Y/Fp03sz3+rCmMFEDrVn3s3PEgALmMxWcHK3AEpB7l Om1rN3gRII0/98rYu2iCTg7NmF9cvumgVc+vn8xU/rCycQqG45REcCMzNJ7BBqii69uu z+m96eWDq/TCxVEckzQD/o+AxM4+O3Zg/WwpZH1CHYvBUxJJppqIcevxIRrmjh4VItqv D8Qw== X-Gm-Message-State: APjAAAUJ25gQaFE7W5fKDLF98q33vSZzMs8nrvHXQ30wQhRMLUZDS0uZ QXds9GVulDdW1Z3HlYib/thpXw== X-Google-Smtp-Source: APXvYqwYn6A64W6RYQdcSAW8Dx+vuADYJTH0IldHuTPwJSaUgo9yYVECtHmkSACxkdEpECMiMT5HEw== X-Received: by 2002:a92:4013:: with SMTP id n19mr3718111ila.279.1579280044000; Fri, 17 Jan 2020 08:54:04 -0800 (PST) Received: from alago.cortijodelrio.net (CableLink-189-219-74-147.Hosts.InterCable.net. [189.219.74.147]) by smtp.googlemail.com with ESMTPSA id f16sm8120662ilq.16.2020.01.17.08.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 08:54:03 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuah@kernel.org Cc: =?utf-8?q?Daniel_D=C3=ADaz?= , Mathieu Desnoyers , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , linux-kernel@vger.kernel.org (open list:RESTARTABLE SEQUENCES SUPPORT), linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK) Subject: [PATCH 2/3] selftests/rseq: Build with LDFLAGS Date: Fri, 17 Jan 2020 10:53:27 -0600 Message-Id: <20200117165330.17015-2-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200117165330.17015-1-daniel.diaz@linaro.org> References: <20200117165330.17015-1-daniel.diaz@linaro.org> MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org During cross-compilation, it was discovered that LDFLAGS were not being used while building binaries, leading to defaults which were not necessarily correct. OpenEmbedded reported this kind of problem: ERROR: QA Issue: No GNU_HASH in the ELF binary [...], didn't pass LDFLAGS? Signed-off-by: Daniel Díaz --- tools/testing/selftests/rseq/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile index d6469535630a..2d2d0c283de1 100644 --- a/tools/testing/selftests/rseq/Makefile +++ b/tools/testing/selftests/rseq/Makefile @@ -22,15 +22,15 @@ TEST_PROGS = run_param_test.sh include ../lib.mk $(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h - $(CC) $(CFLAGS) -shared -fPIC $< $(LDLIBS) -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -shared -fPIC $< $(LDLIBS) -o $@ $(OUTPUT)/%: %.c $(TEST_GEN_PROGS_EXTENDED) rseq.h rseq-*.h - $(CC) $(CFLAGS) $< $(LDLIBS) -lrseq -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS) -lrseq -o $@ $(OUTPUT)/param_test_benchmark: param_test.c $(TEST_GEN_PROGS_EXTENDED) \ rseq.h rseq-*.h - $(CC) $(CFLAGS) -DBENCHMARK $< $(LDLIBS) -lrseq -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -DBENCHMARK $< $(LDLIBS) -lrseq -o $@ $(OUTPUT)/param_test_compare_twice: param_test.c $(TEST_GEN_PROGS_EXTENDED) \ rseq.h rseq-*.h - $(CC) $(CFLAGS) -DRSEQ_COMPARE_TWICE $< $(LDLIBS) -lrseq -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -DRSEQ_COMPARE_TWICE $< $(LDLIBS) -lrseq -o $@ From patchwork Fri Jan 17 16:53:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 11339553 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42003109A for ; Fri, 17 Jan 2020 16:54:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 203B521582 for ; Fri, 17 Jan 2020 16:54:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ju3I1Jfs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729263AbgAQQyO (ORCPT ); Fri, 17 Jan 2020 11:54:14 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:38813 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729252AbgAQQyO (ORCPT ); Fri, 17 Jan 2020 11:54:14 -0500 Received: by mail-io1-f68.google.com with SMTP id i7so18293116ioo.5 for ; Fri, 17 Jan 2020 08:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uFIUVKsz4aPMvzp5H7zdGJcmUXpH7dHc5gmMJqmLGlg=; b=Ju3I1Jfs9dGT84Iy5fhqRFLUVMNJ2DaIdE+XAgBGJVq2WI7cBhYBPlKCVOfqs4VjMZ 5ICq/oE45Eg7QmU2ztU/ugOzLpOvQ2sTLgH4W6CEG5igTtgl1kKoVhX3J3f1sfZ7fO+I JlYaxN8NlIaKixzCZBXnSUCbPBdtD6QReoBvllPp/KtRlRs4nS+7Hm4udEoIrUm8C0m7 Bv5BGlkrns50GvcaB7Bf+XmCIptl1fNUe3m5b7HoaXRW5F86S/8vnDbb3AuiE2juhPi+ 5AJL6a9LVL5rapntmvKmiWEqM1aM55VyhUm/u1S9BHEP0VaaVuXAx4M5wkLazCr15Z/M 67ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uFIUVKsz4aPMvzp5H7zdGJcmUXpH7dHc5gmMJqmLGlg=; b=KIL0UVz07hHEmCPm98/ZhS+7swQsaHKQvr4qYFkcGQZBSSvr8BrOS05gvU9PscBOHJ BZIYaP9VkTuXWYiqRsz6S6uvnYiRS+Ii5+BU0CybiadOYsPUwiSgs1gKGk4we7bvRnmd 2qOHu7lI6OhpFJ1hbB0XxRYtd38Wi9lbSYWrECQ6DBUQsFszajI5iCGY2rcT/d7uHE68 QPSsyiXiOxJbU+7JZ7sY4saB0IPr06r9PSAxkdrDOtyfgKLq97nd94TxUm2+J8ENn7y3 2yDK2MitYh9qYQzh8hYnQAAD+dzpX0SORGQb7mMpsvA6mUOnIKHTvhrsuL78/pWATt9w 2dKA== X-Gm-Message-State: APjAAAUq1EyO+HzJRCoaDm9cJYvXvw/HZVIzioso4cSckQqwUiITp+o7 tOt8JZPW6NQBXWsK6oHqOFz20A== X-Google-Smtp-Source: APXvYqyb7lB/rV1ivpPHirD+5CsQ4f/jRvFS49kUJduVxa9UCt1nkgGP/tUwxXBNpRlOKcvyPaLpjg== X-Received: by 2002:a5e:9748:: with SMTP id h8mr23496836ioq.121.1579280053465; Fri, 17 Jan 2020 08:54:13 -0800 (PST) Received: from alago.cortijodelrio.net (CableLink-189-219-74-147.Hosts.InterCable.net. [189.219.74.147]) by smtp.googlemail.com with ESMTPSA id f16sm8120662ilq.16.2020.01.17.08.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 08:54:12 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuah@kernel.org Cc: =?utf-8?q?Daniel_D=C3=ADaz?= , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), netdev@vger.kernel.org (open list:BPF (Safe dynamic programs and tools)), bpf@vger.kernel.org (open list:BPF (Safe dynamic programs and tools)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/3] selftests/bpf: Build urandom_read with LDFLAGS and LDLIBS Date: Fri, 17 Jan 2020 10:53:28 -0600 Message-Id: <20200117165330.17015-3-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200117165330.17015-1-daniel.diaz@linaro.org> References: <20200117165330.17015-1-daniel.diaz@linaro.org> MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org During cross-compilation, it was discovered that LDFLAGS and LDLIBS were not being used while building binaries, leading to defaults which were not necessarily correct. OpenEmbedded reported this kind of problem: ERROR: QA Issue: No GNU_HASH in the ELF binary [...], didn't pass LDFLAGS? Signed-off-by: Daniel Díaz Acked-by: Andrii Nakryiko Acked-by: John Fastabend --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index e2fd6f8d579c..f1740113d5dc 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -88,7 +88,7 @@ $(notdir $(TEST_GEN_PROGS) \ $(TEST_CUSTOM_PROGS)): %: $(OUTPUT)/% ; $(OUTPUT)/urandom_read: urandom_read.c - $(CC) -o $@ $< -Wl,--build-id + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) -Wl,--build-id $(OUTPUT)/test_stub.o: test_stub.c $(CC) -c $(CFLAGS) -o $@ $<