From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 728F879FD for ; Mon, 4 Nov 2024 14:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730729152; cv=none; b=s7D3xalW7bVKghyg/Gy1VJybPUhNyXcumwvw+zLUBOqW30nCh1xoeWUfQCkYHM1SuuCPyc4BcF9VhUWGxSkeXLEt99NCECneCRYPp+I7zqTSnxs2Z+hWfX/nL5NqHoKiDZY+GvzCux9+lY1HkOC0Q49cLDSn68PTFG4lY9WocrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730729152; c=relaxed/simple; bh=81C3/l31aOF+X3wTj2KS3ryL3Kk4KGUfYpJISg+WXFI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=UnDCe4RMqS4RDUeViPjyT89+w+ODp0cE/Gbl08zsMQ7EorJkcLNw9BSfdFZM55me9n8/IZXnU0HsD4wKcFW6GKRnDXkhrcbnKok49a28taAMgqm3VttAPJKoAZOLmEJL1jo9QTMuDKfNC8g+RWzdpNGmKMXXeaAfB+blPq5zROU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YJq8w4w+; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YJq8w4w+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730729149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Gb1UMU1XuqOWDOTO5MhkKHQFWdwLrxCKkHpbwSRHyvM=; b=YJq8w4w+VQWox7Dw5fXMUBVTV7PX2JBAj1fL0uVzXElgiGUVWVw/3xssZ/oKu7IgChobo1 VGNmMjxEceFNYBsxSYzNCTIfXm0gqdTvQZkcqW2NLEX594MDhL8mV1q9BMjfHWimvVc4Tg 1YzsO3ulVr5H1o5A+LyJFaL0GxAWGHE= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-362-tauRU6SnMrGmPLnRhmlG1A-1; Mon, 04 Nov 2024 09:05:47 -0500 X-MC-Unique: tauRU6SnMrGmPLnRhmlG1A-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a9a2593e9e9so285281866b.0 for ; Mon, 04 Nov 2024 06:05:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730729146; x=1731333946; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gb1UMU1XuqOWDOTO5MhkKHQFWdwLrxCKkHpbwSRHyvM=; b=CBLoiiYuaM8arhTWlgH0dmvtIgdgPfbns7xyp1ylKKQ8/EPHftrJdLJZgYFchQg/Pa 85uVULTsiv+ng5kvdjsUbSuO1rJk/qc8bXsSyioyRZU7saPxkHHCsfE3fn9zGd35EARr FjKJ6htkKC3xJvRtU9QNwCsgSSdLAbzoEoQDhWAOg1Ba6/7aH/JVzaZaZ8+sEpm4xJ5y 8H0zPwutfe/+97Y0ThQR4ovDzqdObI98y2b3vUOlu7V8pjtOwPzMHVfutyZtiuRUZgBy 6Jg/b3DqnSDAUDGiaUgiCGIN60rOJ4D8sWY1yntkflaTdVzRCHofnS726KidD40Nut3h kAkw== X-Forwarded-Encrypted: i=1; AJvYcCXvGtwRNIKR1e3TEqRB7ZRsi+iWOBAOCk5N5wwSpr+Qd+hREGFdOjfZQkHTFBJaSiozKQY=@vger.kernel.org X-Gm-Message-State: AOJu0YybFw4wie3wSuD5Voxnxp2l9c0h3AVxLVxOMPEQcsX+5gBK3ULw 4Yy7ZJ2j7VF7ijBGLr8inpxEe2s1KPN69mrQDDHHuAa5whi4bPoZQ/uQobd8SfA+v8ZboscvlkQ C7lmnl+sekUSLQtWTdzbpp/MGVuXbNnssemfWWOnj7Wg4V0KAgQ== X-Received: by 2002:a17:907:ea8:b0:a99:44d1:5bba with SMTP id a640c23a62f3a-a9e6587e272mr1158687766b.45.1730729145880; Mon, 04 Nov 2024 06:05:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwG3aC/c4cclAeImIU1LjygXWnInwgPHOsuGZwo0d4K0zU188xmFb+7HuOopN0xWIMoXcstw== X-Received: by 2002:a17:907:ea8:b0:a99:44d1:5bba with SMTP id a640c23a62f3a-a9e6587e272mr1158683466b.45.1730729145452; Mon, 04 Nov 2024 06:05:45 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e56641249sm556140266b.156.2024.11.04.06.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 06:05:45 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id ED301164C03D; Mon, 04 Nov 2024 15:05:43 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Viktor Malik , bpf@vger.kernel.org Cc: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Viktor Malik , Quentin Monnet Subject: Re: [PATCH bpf-next v3 2/3] bpftool: Prevent setting duplicate _GNU_SOURCE in Makefile In-Reply-To: References: X-Clacks-Overhead: GNU Terry Pratchett Date: Mon, 04 Nov 2024 15:05:43 +0100 Message-ID: <874j4n9jrc.fsf@toke.dk> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Viktor Malik writes: > When building selftests with CFLAGS set via env variable, the value of > CFLAGS is propagated into bpftool Makefile (called from selftests > Makefile). This makes the compilation fail as _GNU_SOURCE is defined two > times - once from selftests Makefile (by including lib.mk) and once from > bpftool Makefile (by calling `llvm-config --cflags`): > > $ CFLAGS=3D"" make -C tools/testing/selftests/bpf > [...] > CC /bpf-next/tools/testing/selftests/bpf/tools/build/bpftool/btf= .o > : error: "_GNU_SOURCE" redefined [-Werror] > : note: this is the location of the previous definition > cc1: all warnings being treated as errors > [...] > > Filter out -D_GNU_SOURCE from the result of `llvm-config --cflags` in > bpftool Makefile to prevent this error. > > Signed-off-by: Viktor Malik > Acked-by: Quentin Monnet > Acked-by: Jiri Olsa Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen