From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 49676385842F for ; Mon, 18 Dec 2023 05:02:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49676385842F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 49676385842F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702875723; cv=none; b=PxTBx4UO8MrpY7IZRP4UXqEp8M5ytBJZ5yrGgbBOgvr7ZZYWfc84e545RSB3o9IKUU+sZcZh7F4TU/e/XcwxoxfcvSR6VQ207P3/wdmXLGRRpYCpez4pIS4Eqp0JTVyYncDJzf4AUA3JKl2AeILQHzpDy3dmeHdpu9xUm5Ow/JE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702875723; c=relaxed/simple; bh=SZ7ecGl6PaybQ169MXTmVtlt6Y4mgWCAFamoF2uhTEg=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=GGD65tiqfygCnyu1pXqYXt9U4retHdPvvRo/7dJAmxXLH8cRUBWhGlywYoOkL8HcoEKLeIgF+koPFAKEKi1wZbgz4MuMK/DpaCf/++IuFuDPCme0oJUucp9HdYIC+GcHTTDpsXwOrTl72aBUzo4N7sTW6m52c/WtUNtODsB9cwg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1d3b60c5054so382725ad.2 for ; Sun, 17 Dec 2023 21:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702875721; x=1703480521; darn=sourceware.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=so2Yx507QvRiUKm8mVzJaiJudKl2bT3zuJGNrXHFkRg=; b=fPOSDhH6JQ2swWxBEMaac8BJ9I6C/TkuoR4PJX7V0BzQxeerdmllpQ5m5c7NJ6vUao BuLJiPQz1KIHVX1Mkd8QzngXeX6dLKNV/FRVFE9pmt1O/sKyU8CeyswCZNOPSlKdPqHE t8laG8/Ahd7Xz1UiNnr/yL18DUDMKZk318wDaKaBRgr65Pl1Ol9kvOHExySihcblFXSp QwlBSLHUEHjhh1mEY1N0gLU9rudKjUt+KHwlXcECoLZscoOdIdcBho61VgTu/Yu2u3R6 LGDflaMnpRYdXnCNpqz128XzcVcPc6ciAppy6ws56R3gMLsgTuqECJ9vejccJW96OIsu 7Y9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702875721; x=1703480521; 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=so2Yx507QvRiUKm8mVzJaiJudKl2bT3zuJGNrXHFkRg=; b=wEf1zIOrGzDf9Bf9aL8BOdjvOE6SVGQxwSSEUcq/gOZntcs3MDSJyRyFo+pstwfcN4 4xykgJsq/XHx8M6P+9lozwHoucIOCPRrA39MUp+bw2kZ5ciwfyR58ZjwECx8DOO9kP4u n2rD0pBdJ2ulqjCBhS0U8J9OLA3wku5Rd9MHnDAUo2xNDwyZqFZRZtOngXEQc6ltTG19 mTDRhf0OLandaLuh9Cw2ZAE43yVRY5ZTUYmPVrZoz70JVHyZ9/QalCZNW3z8oDxYWCnl pPsVJ0iprbucNhuryd/Id2p3i84/1Rx3atCl/6eRCXW2G9rr9Ezb95AgOMOsx/aw4qNj hfHw== X-Gm-Message-State: AOJu0Ywba/6RZ6OaogbhHmnBrC8K/gnufNrnwKKad/wRnm4f2DSCRm1E NA+Bj7TeScKvGuyVTxixPY2kcEmb2N4= X-Google-Smtp-Source: AGHT+IGhXheQqiRGs4W8iIHGF2AbYnwhDY51BCqEjc0pvK573QITpL6GGdBlRt+yzIGCGAMbpqy7Hg== X-Received: by 2002:a17:903:32cc:b0:1d3:9f6e:cd7d with SMTP id i12-20020a17090332cc00b001d39f6ecd7dmr299258plr.135.1702875721027; Sun, 17 Dec 2023 21:02:01 -0800 (PST) Received: from kamensky-p15s.cisco.com ([2601:641:8080:1a70::73a5]) by smtp.gmail.com with ESMTPSA id k9-20020a170902c40900b001bc676df6a9sm17990406plk.132.2023.12.17.21.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 21:02:00 -0800 (PST) From: Victor Kamensky To: systemtap@sourceware.org Cc: "Frank Ch . Eigler" , Victor Kamensky Subject: [PATCH 2/2] Makefile.am: fix build with --with-debuginfod=/path configure option Date: Sun, 17 Dec 2023 21:01:35 -0800 Message-Id: <20231218050135.12565-2-victor.kamensky7@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231218050135.12565-1-victor.kamensky7@gmail.com> References: <20231218050135.12565-1-victor.kamensky7@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: While I was testing my previous fix with libdebuginfod auto detection failure I've noticed that configure option --with-debuginfod=/path does not work in case if system does not have elfutils-debuginfod-client-devel. I had external elfutils branch with debuginfod metadata change installed at /path and when I've tried to build SystemTap with it, it was failing in multiple places. My system is FC38. It boils dows for couple issues applied in serveral Makefile.am files. 1. util.cxx is C++ file so debuginfod_CFLAGS should be added to _CXXFLAGS flags, rather then just _CFLAGS 2. debuginfod_LDFLAGS should be added to _LDFLAGS, otherwise link command does not get proper -L flag Note this patch fixes only proper Makefile.am, someone would need to run autoreconf and commit proper regenerated configure and Makefile.in files. Signed-off-by: Victor Kamensky --- Makefile.am | 16 ++++++++-------- stapbpf/Makefile.am | 4 ++-- stapdyn/Makefile.am | 8 ++++---- staprun/Makefile.am | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2ba896088..cfa693e65 100644 --- a/Makefile.am +++ b/Makefile.am @@ -188,9 +188,9 @@ if BUILD_TRANSLATOR if HAVE_NSS stap_sign_module_SOURCES = stap-sign-module.cxx nsscommon.cxx util.cxx stap_sign_module_CPPFLAGS = $(AM_CPPFLAGS) -stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) +stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) stap_sign_module_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) -stap_sign_module_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ +stap_sign_module_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(debuginfod_LDFLAGS) stap_sign_module_LDADD = $(nss_LIBS) $(debuginfod_LIBS) if HAVE_HTTP_SUPPORT stap_sign_module_LDADD += $(openssl_LIBS) @@ -198,9 +198,9 @@ endif stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS) -stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) +stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) stap_authorize_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) -stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ +stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(debuginfod_LDFLAGS) stap_authorize_cert_LDADD = $(nss_LIBS) $(debuginfod_LIBS) if HAVE_HTTP_SUPPORT stap_authorize_cert_LDADD += $(openssl_LIBS) @@ -208,9 +208,9 @@ endif if BUILD_SERVER stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx privilege.cxx nsscommon.cxx cmdline.cxx -stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) +stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) stap_serverd_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) -stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ +stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(debuginfod_LDFLAGS) stap_serverd_LDADD = $(nss_LIBS) -lpthread $(debuginfod_LIBS) if HAVE_AVAHI stap_serverd_CFLAGS += $(avahi_CFLAGS) @@ -223,9 +223,9 @@ endif stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx -stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) +stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) -stap_gen_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ +stap_gen_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(debuginfod_LDFLAGS) stap_gen_cert_LDADD = $(nss_LIBS) $(debuginfod_LIBS) if HAVE_HTTP_SUPPORT stap_gen_cert_LDADD += $(openssl_LIBS) diff --git a/stapbpf/Makefile.am b/stapbpf/Makefile.am index 26b9a0cdf..e8c5168cf 100644 --- a/stapbpf/Makefile.am +++ b/stapbpf/Makefile.am @@ -22,8 +22,8 @@ stapbpf_SOURCES = stapbpf.cxx bpfinterp.cxx libbpf.c ../util.cxx \ ../staprun/start_cmd.c stapbpf_CPPFLAGS = $(AM_CPPFLAGS) stapbpf_CFLAGS = $(AM_CFLAGS) $(debuginfod_CFLAGS) -stapbpf_CXXFLAGS = $(AM_CXXFLAGS) -stapbpf_LDFLAGS = $(AM_LDFLAGS) +stapbpf_CXXFLAGS = $(AM_CXXFLAGS) $(debuginfod_CFLAGS) +stapbpf_LDFLAGS = $(AM_LDFLAGS) $(debuginfod_LDFLAGS) stapbpf_LDADD = $(stapbpf_LIBS) -lpthread $(debuginfod_LIBS) BUILT_SOURCES = diff --git a/stapdyn/Makefile.am b/stapdyn/Makefile.am index 1b0dcf116..bd63d497b 100644 --- a/stapdyn/Makefile.am +++ b/stapdyn/Makefile.am @@ -30,15 +30,15 @@ man_MANS = stapdyn.8 stapdyn_SOURCES = stapdyn.cxx mutator.cxx mutatee.cxx \ dynprobe.cxx dynutil.cxx ../util.cxx -stapdyn_CXXFLAGS = $(AM_CXXFLAGS) @DYNINST_CXXFLAGS@ -stapdyn_LDFLAGS = $(AM_LDFLAGS) @DYNINST_LDFLAGS@ +stapdyn_CXXFLAGS = $(AM_CXXFLAGS) @DYNINST_CXXFLAGS@ $(debuginfod_CFLAGS) +stapdyn_LDFLAGS = $(AM_LDFLAGS) @DYNINST_LDFLAGS@ $(debuginfod_LDFLAGS) stapdyn_LDADD = -ldl -ldyninstAPI -lsymtabAPI -lpthread $(debuginfod_LIBS) stapdyn_CFLAGS = $(debuginfod_CFLAGS) dynsdt_SOURCES = dynsdt.cxx dynutil.cxx ../util.cxx dynsdt_CPPFLAGS = $(AM_CPPFLAGS) -dynsdt_CXXFLAGS = $(AM_CXXFLAGS) @DYNINST_CXXFLAGS@ -dynsdt_LDFLAGS = $(AM_LDFLAGS) @DYNINST_LDFLAGS@ +dynsdt_CXXFLAGS = $(AM_CXXFLAGS) @DYNINST_CXXFLAGS@ $(debuginfod_CFLAGS) +dynsdt_LDFLAGS = $(AM_LDFLAGS) @DYNINST_LDFLAGS@ $(debuginfod_LDFLAGS) dynsdt_LDADD = -ldl -lelf -ldyninstAPI -lsymtabAPI -lpthread $(debuginfod_LIBS) dynsdt_CFLAGS = $(debuginfod_CFLAGS) diff --git a/staprun/Makefile.am b/staprun/Makefile.am index 410d2b28f..f3694e592 100644 --- a/staprun/Makefile.am +++ b/staprun/Makefile.am @@ -26,10 +26,10 @@ libstrfloctime_a_CFLAGS = $(AM_CFLAGS) -Wno-format-nonliteral staprun_SOURCES = staprun.c staprun_funcs.c ctl.c common.c start_cmd.c \ ../privilege.cxx ../util.cxx staprun_CFLAGS = $(AM_CFLAGS) -DSINGLE_THREADED $(debuginfod_CFLAGS) -staprun_CXXFLAGS = $(AM_CXXFLAGS) -DSINGLE_THREADED +staprun_CXXFLAGS = $(AM_CXXFLAGS) -DSINGLE_THREADED $(debuginfod_CFLAGS) staprun_CPPFLAGS = $(AM_CPPFLAGS) staprun_LDADD = libstrfloctime.a $(staprun_LIBS) $(debuginfod_LIBS) -staprun_LDFLAGS = $(AM_LDFLAGS) -Wl,--whole-archive,libstrfloctime.a,--no-whole-archive +staprun_LDFLAGS = $(AM_LDFLAGS) -Wl,--whole-archive,libstrfloctime.a,--no-whole-archive $(debuginfod_LDFLAGS) if HAVE_NSS staprun_SOURCES += modverify.c ../nsscommon.cxx -- 2.31.1