From patchwork Mon Sep 16 08:37:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 13805123 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7EBD1482E1; Mon, 16 Sep 2024 08:39:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726475954; cv=none; b=FyQoBHi47CSV2tMS8Kr0Cc/8TwYIO8kMVyUUbMKO05dETG1QvjZqFJ8yPW4hyynvhDQ06GLSOaYNjw3IUZ6QYQ8XgYBkF4wlSOIKuEkoPZhkI2A5UjQmryV4/wbcqGP7Pb/ExbCe6DimMVBb7MyL6sQ0qd4M+ZWWuEahsc8njPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726475954; c=relaxed/simple; bh=wYhjsx5j0fSruWiw7lF8smhly6RiatiU3SuINB0Dgns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B/yLLqZ27BLewtXtM5rzlOG13GTLWMmPDe9ioQyx77Vvitc/ewWuJvx9F4wVK9LEzDHWNh9e6i+pdGi+7sWoaLDWXtzOd4TQ73D2iUpFeFsPJTWz6uZmXbKuTLqAOZrsI3zNvCeLW01cfUTugjVKB+zYSjjTfhJkm7V7P7hvXdo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Htu+jnXY; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Htu+jnXY" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2d8abac30ddso3353520a91.0; Mon, 16 Sep 2024 01:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726475952; x=1727080752; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3lrrcX4sFl9xP5tQ4rgS/LVCcaLEvFX62xTF6IwSfAU=; b=Htu+jnXYDTYUg30dP7ovuBDCLH98otBGrd5gzndMoE3wF0wgkg8eEb+yHm6QCZYpDY LYV5GRcw5PqLvfuiSsWSrIvVBfXqUSkawr//JSxXGxzAkKmYd47v+yP334WvaNiB2uL0 vIHmrhiPsV1q64CktvG2gWXG1aOYOWrKV2XANLIhCkClfHDjhyPmgBJukToFfAVc02gV NKaKS/jaPlTcDKOu2JsY30vTfUZK/M/ZnaBiauzPWcimc1jwPdsw2sX/dfRd5gx5y9oZ Iq8HmMrlMdjet8Ah8Y2lipJjnQH+5oZ9I9Cdp01JfAXhfY44aTZZYj11JvedOU4EQvNC t+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726475952; x=1727080752; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3lrrcX4sFl9xP5tQ4rgS/LVCcaLEvFX62xTF6IwSfAU=; b=LFEqykxG2WPImQvluzJHu+HqYJ6mTE8/3jxbzfmSzxiehLpCmsEJJQmjAQEt8kbaub cgmosSpExS4hsgyk8lXuRKCkZtQP4S4LYPMdZr+5Sh5ed7RUTFU3b/ucFyuL0UxU+9Hd FimLz525T8xpu9avueTAk/x4kQNem8Nb2Wzyjejd+GjHPj4CCVujHM1DHOAWs3hEPnRw uwGGN/zBUAGHKe0hkxn9PcqmrA1VEdmP3sHIAmR9FdY1p7rAtVa63Q2qHjdmh+F1lnBq ZII40RygVjdFcPHZeXLh7xKbIqfNabokfItpVGqGt7EOT1HszuGwlvLNTrw602w6XSOZ DSOg== X-Forwarded-Encrypted: i=1; AJvYcCUPea9ejtFY6h5WLUiKpdmTMBFrGh5x5wSXv0ElD34dUevd/VDKRtpYvnXpIlq9zVLBUz3zEIaeXFZ82j0GKqc=@vger.kernel.org X-Gm-Message-State: AOJu0YyeGlxvP8GS8/+1gG4KP0m0eMG1Ieavr0ZLJSDlmbkzJHnPSlCw nqZ8VEKRJfuMP5XG7K3ewKKXgPNI/mYPx0dpjYYtafnSWqp9QdUWV5Oonw== X-Google-Smtp-Source: AGHT+IHfy+YwKDLqXgEJCABCfB88Ld0SIoFmbJeurWm032FCSH4b4G3KPoeopwedhBnITpy5yR8niA== X-Received: by 2002:a17:90a:77cb:b0:2d8:8681:44ba with SMTP id 98e67ed59e1d1-2db9ffbccb4mr15478025a91.15.1726475951628; Mon, 16 Sep 2024 01:39:11 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dbcfcbb424sm4585832a91.7.2024.09.16.01.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 01:39:11 -0700 (PDT) From: Tony Ambardar To: bpf@vger.kernel.org Cc: Tony Ambardar , linux-kselftest@vger.kernel.org, Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Ilya Leoshkevich , Quentin Monnet Subject: [PATCH bpf-next v6 8/8] selftests/bpf: Support cross-endian building Date: Mon, 16 Sep 2024 01:37:47 -0700 Message-Id: <880ccc6342cfc4d3c48b44f581e87adfbce2876e.1726475448.git.tony.ambardar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update Makefile build rules to compile BPF programs with target endianness rather than host byte-order. With recent changes, this allows building the full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb for example. Acked-by: Yonghong Song Signed-off-by: Tony Ambardar --- tools/testing/selftests/bpf/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index f04af11df8eb..5d302db43778 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -446,6 +446,7 @@ endef IS_LITTLE_ENDIAN = $(shell $(CC) -dM -E -