From patchwork Mon Jan 8 11:34:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roberto Bartzen Acosta X-Patchwork-Id: 1883643 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=luizalabs.com header.i=@luizalabs.com header.a=rsa-sha256 header.s=google header.b=U9vWzYcN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7sR02628z1yP7 for ; Mon, 8 Jan 2024 22:34:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4FA0B60F71; Mon, 8 Jan 2024 11:34:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4FA0B60F71 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=luizalabs.com header.i=@luizalabs.com header.a=rsa-sha256 header.s=google header.b=U9vWzYcN X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id okj1SgE5VW4M; Mon, 8 Jan 2024 11:34:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 746B260F42; Mon, 8 Jan 2024 11:34:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 746B260F42 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 462F6C0077; Mon, 8 Jan 2024 11:34:16 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id CBD49C0037 for ; Mon, 8 Jan 2024 11:34:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A1FF860F42 for ; Mon, 8 Jan 2024 11:34:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A1FF860F42 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oIyrc6QIzwbQ for ; Mon, 8 Jan 2024 11:34:13 +0000 (UTC) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by smtp3.osuosl.org (Postfix) with ESMTPS id 96F6460D72 for ; Mon, 8 Jan 2024 11:34:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 96F6460D72 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-557d08bb0f7so439964a12.3 for ; Mon, 08 Jan 2024 03:34:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luizalabs.com; s=google; t=1704713651; x=1705318451; darn=openvswitch.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=r9kE9fyYeC5koE77GixJ0GKaiq/pXugmIQh3rGTM0rA=; b=U9vWzYcNr3S9ACWJZuvzZs9VudxhLk2biBXZfykzX/BD4hMhru0rhrihFRogNIOQj0 ReeHiAP79f70C5AqcL/haUyGAoy9BW7FumOUi48ESdhoAUNELKhZc8+qRg9cua7GN1ca QMdNFaEbIdJ5Vdee0sgVa0bVg9++E1Mkp62FI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704713651; x=1705318451; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r9kE9fyYeC5koE77GixJ0GKaiq/pXugmIQh3rGTM0rA=; b=CKANG8SkJut5fy1oAXil3FwNHP3PY/ETXOx9fxK8EdYX+saJCschiJ6cfwkiz6IQhM UpOM4N49kEex+MCvoT3YmeYngZGSKMgYuXUqXG3z0wVjBX5fFhF7VYKFU4vui3w4JG6F 6bquZ3BmDIAe/FJu0Nt3BOszcFVvYOph08Z967WkTAmyyODxAWzynTYr4c5Kl2s3gUAl C4bb3lzVYFdA835wTA4AZR9mGFyyGuV6DTIIhe6G5EnvkMcWpoP5UoUCNBIxuwGpX9sQ Uwk5FkGlKJEJMjTbX388+iOOeX5GNetfYLxjOZxInpJNjWPi/Hc4SYZiWK+XeOQM5cWT FvvA== X-Gm-Message-State: AOJu0Yy0aO7M72CQJrdHT9jpPVIvQajYLsHLjWml1iU7qIJkrFRZbuGL 0BVubJEgDxzBKI9HzHZsLLLG6QCVv9ewg76LwAjXu2O3yg7IUS2HxTSjvwJIDDqjNNZJYK+syYH +qfT7rylfa1OnJ5pJ5wXxiFNb7YiCY8SQZL195QVaNrU= X-Google-Smtp-Source: AGHT+IHkFQs8Vnazag8B9KP9484kZgiGfy37bRxIFO6hQRQ8UECy/fEodsgCcEeAM4HlLDjh5FEN3iQBA9Ml+MisZOM= X-Received: by 2002:a17:906:c2d4:b0:a28:b20b:3ede with SMTP id ch20-20020a170906c2d400b00a28b20b3edemr888355ejb.69.1704713651393; Mon, 08 Jan 2024 03:34:11 -0800 (PST) MIME-Version: 1.0 Date: Mon, 8 Jan 2024 08:34:36 -0300 Message-ID: To: dev@openvswitch.org Subject: [ovs-dev] [PATCH ovs v3] debian/rules: Fix incorrect use of link-time optimizer. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Roberto Bartzen Acosta via dev From: Roberto Bartzen Acosta Reply-To: Roberto Bartzen Acosta Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Current version of debian/rules simply uses the default lto GCC optimization settings during the linkage process. The main problem with this approach is that GCC on OS like Ubuntu Jammy, for example, can enable the -flto=auto option during the openvswitch building and linking process. In this case, the linked dynamic libraries would need to be builded based on the same lto optimization options, at the risk of not working, according to documentation [1]. I'm not sure of the real benefits of using this link-time optimization option, and since when it is enabled it causes problems with shared libs link libjemalloc, for example, it seems safer overwritten compiler decision by passing -fno-lto command. [1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto Reported-at: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/2015748 Signed-off-by: Roberto Bartzen Acosta Acked-by: Simon Horman --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index dc5cc8a65..de8771813 100755 --- a/debian/rules +++ b/debian/rules @@ -2,7 +2,7 @@ # -*- makefile -*- #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DEB_CFLAGS_MAINT_APPEND = -fPIC +export DEB_CFLAGS_MAINT_APPEND = -fPIC -fno-lto %: dh $@