From patchwork Fri Aug 30 07:29:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Ambardar X-Patchwork-Id: 824264 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 4CC0616BE0C; Fri, 30 Aug 2024 07:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725003024; cv=none; b=q3l/MZcAzG2bow9vAH6LX04U83fquSUaaTEVHdde1eBLJ2gdoNZaNtaq995r8o8Ag4P74zkjxR4pBxroADqlUVuxZnEcQW/Z+WRmtGtJ+rgsh/cmXc//LRzrDul0I8zQi4nIunvn5b2QXCLHXEmFUWWDd4vlV61qfP1KC6VGrkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725003024; c=relaxed/simple; bh=Sf7g9q6kzZ2QDVZ42l9TEK1MrgR/netlPt93lP7g9x4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qvu5kMo2Owsez961UyXU8cjowkfWFoajArp6mx2HKmtAwHkuitIQUZkwfgw7F840umaCYZVz6/nl9dgtT5sm7eRuI3c37QTduGxtFjT/iOK2PnvusVDKHC74cc2hK7cV0hAqkZMa1PoERMj4oGUDcbPoqX1VVwgh4hR7IpmVT5o= 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=D/+8cHw/; arc=none smtp.client-ip=209.85.214.182 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="D/+8cHw/" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-201f2b7fe0dso12818905ad.1; Fri, 30 Aug 2024 00:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725003022; x=1725607822; 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=DRgUXWe8dZjfzs16xzJQ+DDVhbgl0JeJ2Y/m+gXLXrs=; b=D/+8cHw/6SMPg0vXP2K+PVjCQpvUBYFwPaA8ioQSgBd+MCK/eYjpdbdrudd1nazRKt S77ipLRYWnEPgDZtNLGzU5k9AbHDc59sg+ieml6ohJ8Q9MkfuD9a3CpJ3XJA+bRbU3Qo FPGrcCYBKQiHJkgZ96a54plk2gfnyWKPcTluuBzwV1YTTZisKfyshvaTA6EmVj1GHIA+ uQALOhcnhRfpnXbTc1/0bjaE6sE9otd/4nXqPpJP9kpHwwndxvWiNbVKFV0buN7oRBfy tC1KMPnyj4KnEO5OcOp9F+jFOgaOfD9pkubMa9V/kRVbMiUV3VxbalOiXQaI1MN+Vt1X GvEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725003022; x=1725607822; 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=DRgUXWe8dZjfzs16xzJQ+DDVhbgl0JeJ2Y/m+gXLXrs=; b=Mbra98jErVwR7ippTWo7HOcg8rG6WsbR1LHFbs7NFsADg2+h9UpqqZT2HUyaNhaBPE 6x80uv9ALziWsr+ZO93JuOibVIergd7kIDzyADjEl8Z+Sctdg5DR7Na5vjnX4rAqpH6D LxxXOph2u9TGKOzJoYvHoS0Aje68syOSvbqRHl6TgWhKuVqdjdq4vSnX+OpHP5sqU87w 0lB7QsmwEMhrhZTdWYY5TiRPq8lxIqh6RvoccJH7gdUaKeRvpIcZnpSthAp4rQfxHkAf IkINAxQWRu+W3oW7oQ5khUrgjDb1NQxl4WRoS65GZ+0OCrsXQj9J8vIVpuCtXTDSHocy 5KGg== X-Forwarded-Encrypted: i=1; AJvYcCWzJSLLLPlRvzO/QyrH3O16Nb0Pjv02tGyKoLtnvtOgKxajS9qIrxR3atAOSMP/m98wER3+WUJFVYHV1Zpzbsw=@vger.kernel.org X-Gm-Message-State: AOJu0YzYQzeYAEnMTh4YsMENvy1ug1xVV8BkGGT67Uiw1okEHSuGcfLe U3XDkKhTL6KM4Vryiye4isWwF1DcktZwD/N5gabDDDrH/C3UgETRoQ9VKRFW X-Google-Smtp-Source: AGHT+IF8A+tzbxB2dPzmuiLZQVlvRGJkJrjG6ut3uVXWa1gSLUlWERkW2TZfKNDo8kF7/P8Ei5N+yw== X-Received: by 2002:a17:903:2444:b0:202:562c:f3cd with SMTP id d9443c01a7336-2050c4f4331mr54598785ad.56.1725003022188; Fri, 30 Aug 2024 00:30:22 -0700 (PDT) Received: from localhost.localdomain (69-172-146-21.cable.teksavvy.com. [69.172.146.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-205152b4dd0sm21698085ad.15.2024.08.30.00.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 00:30:22 -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 v4 8/8] selftests/bpf: Support cross-endian building Date: Fri, 30 Aug 2024 00:29:30 -0700 Message-Id: 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. 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 c120617b64ad..27afbfa9e831 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -438,6 +438,7 @@ endef IS_LITTLE_ENDIAN = $(shell $(CC) -dM -E -