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: 208921 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F86DC33CB1 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 046AB2083E 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 --- 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: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: 208920 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EEF2C33CB1 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 035602087E 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 --- 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 $@ $<