From nobody Mon Nov 3 01:07:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1733757408; cv=none; d=zohomail.com; s=zohoarc; b=Le811lFHROfFuN1KruIBXQh0WDzGQmDxok09NLME/ba29JEv3qDyxSL1hXzvhgCg5z8R/iqtrxy3L6cT7nRKyHJk47Z/BpZ/fNhNocXdY09IrQ8llXBMQzDfWXBW+8DsiLIzbI7AY2+llLEKUoyWOHyaeBBdsEp0zqcwap7sPL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733757408; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=y4D25h9apZWWqcYaQPYHIl6EB6+ZFsV8yaOICIU50IY=; b=J1qka5/4a5Wz9f3PZSqL3uE4eCwUml7ncnsjbEbfVa3bhnEAXpWgZwp7jrk2WiJYuW/OlfTzKc/3F72H9W6lbN0sdcashX13s6+0FZs2MuzVBCgr3Rp0bxw+gg9/x4cc9z4kYkSvMreGsuCCzm//Zr0f9vX9WmCzAtJJFcVTgJg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1733757404176916.0865686043323; Mon, 9 Dec 2024 07:16:44 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.851517.1265583 (Exim 4.92) (envelope-from ) id 1tKfUp-0003xV-Ce; Mon, 09 Dec 2024 15:16:27 +0000 Received: by outflank-mailman (output) from mailman id 851517.1265583; Mon, 09 Dec 2024 15:16:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tKfUp-0003xM-9j; Mon, 09 Dec 2024 15:16:27 +0000 Received: by outflank-mailman (input) for mailman id 851517; Mon, 09 Dec 2024 15:16:25 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tKfUn-0003j3-TV for xen-devel@lists.xenproject.org; Mon, 09 Dec 2024 15:16:25 +0000 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [2a00:1450:4864:20::630]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8e4644ec-b640-11ef-a0d5-8be0dac302b0; Mon, 09 Dec 2024 16:16:25 +0100 (CET) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-aa5325af6a0so711518966b.2 for ; Mon, 09 Dec 2024 07:16:25 -0800 (PST) Received: from CSGPROD238885.citrite.net (cpc92320-cmbg19-2-0-cust1786.5-4.cable.virginm.net. [82.13.70.251]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa663334906sm365993466b.72.2024.12.09.07.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 07:16:24 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8e4644ec-b640-11ef-a0d5-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1733757384; x=1734362184; darn=lists.xenproject.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=y4D25h9apZWWqcYaQPYHIl6EB6+ZFsV8yaOICIU50IY=; b=ZMaPOW6LR8gjbyle/Y7Gr3aXUr595Kd06lns4ItEMf9p4L6o8JdPTOulUAB29lYbpx nRTzYBtrPFAKmwSstojPdCxud5LbG4DGA9NJDTXp8M1uZIxHJ2pvNefqoeF7hmGHO/Ig 0XwKIGiCsoseiGzoLSleZeMu4bFjZjQuKPbg4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733757384; x=1734362184; 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=y4D25h9apZWWqcYaQPYHIl6EB6+ZFsV8yaOICIU50IY=; b=VxN2xnYUfjXFMKqdSkIy/loKKtRt+L+INW4n/upH07AT+dyMQpAZSwysP3TlQSO999 P/Kp5lqIlNo81lHIlrRhQWqQ0u4KMFUbVJjBIhZ+XFI67VxME009QSX4n5AUTIl496MB SmlfkIzDnulZdG+Mbg2boOOW3NcNSJY3zgl/NHbuFCiwWjYDbYXXfzbAI+1uma1up6pb 3YSy9iyN+Hm6GHPUFNlEqd5ea98ERMBq7VttzGDVQ7KGw65hiMnuaK/GRCRwzEfS60Ug 4liRCOA4e8wqdS9AU9PeujSRi+wrEy5uC6dxmGJ0/q5/8TO16j/h+0Tr62zK1dJQAVfc LNXg== X-Gm-Message-State: AOJu0Ywf+ry9fOCLTsMverX8ux6/aiut8zetz8vzlpD9biHMY4v4e5IC 0ck13zi5PZnI367YsjpQaxZ+r/aQSgn2av3Ep6MA1czluzBd03oSKz/MtGsFRbDCijfAcHBrZG2 s X-Gm-Gg: ASbGncsE4CqGEHXmWSoTj3X78C69tu+pDyT7R17xnVBWD+QBVfgLXPFN5a19jLSrx4S lpfkP7NVlNX7KcufJSTrHvNZ2yug52KX7u0bbnnzEbqxLZ7Ngjte2LbdH7E0J5pVpWAkom0STPF OAcSHBUPmdQ2cD7Z/+LOYwPAIZa7ThwN6EgI/KoNAmkf5Wi5CQ0NhUSUQyxzu6on9VFMDYGjLB1 Z9/pLWftKK+EPkd3xVr3XNES0udg4QgzY2LSe3HF5OrsgFMB/wSEcLQpAa0f7iteh9c/0sI62IQ L9NYEfdVKIEL88iaR4l3E5jWiqKepfsJgkpZ2D4VNDYZ9+grGT0iIIgk X-Google-Smtp-Source: AGHT+IG0PpfUHGsCTEXkTZY+j/ytG3AMW4kHEO+LHjVjuBPfDj20tnTHu7qMy+atj5jud5QjmEDCbg== X-Received: by 2002:a17:906:2189:b0:aa5:391e:cadf with SMTP id a640c23a62f3a-aa69ce223c2mr91253666b.42.1733757384563; Mon, 09 Dec 2024 07:16:24 -0800 (PST) From: Andrii Sultanov To: xen-devel@lists.xenproject.org Cc: Andrii Sultanov , Christian Lindig , David Scott , Anthony PERARD Subject: [PATCH v1 1/1] tools/ocaml: Specify rpath correctly for ocamlmklib Date: Mon, 9 Dec 2024 15:16:18 +0000 Message-Id: <231f20e0c1dae7eadfeb4b806e1bb415f5f15b33.1733757256.git.andrii.sultanov@cloud.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1733757412483116600 Content-Type: text/plain; charset="utf-8" ocamlmklib has special handling for C-like '-Wl,-rpath' option, but does not know how to handle '-Wl,-rpath-link', as evidenced by warnings like: "Unknown option -Wl,-rpath-link=3D$HOME/xen/tools/ocaml/libs/eventchn/../../../../tools/lib= s/toollog" Pass this option directly to the compiler with -ccopt instead. This prevents embedding absolute paths from buildtime into binary's RPATH. Fixes: f7b4e4558b42 ("tools/ocaml: Fix OCaml libs rules") Signed-off-by: Andrii Sultanov Acked-by: Christian Lindig --- tools/ocaml/Makefile.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules index b9d4b51f0a..055725d910 100644 --- a/tools/ocaml/Makefile.rules +++ b/tools/ocaml/Makefile.rules @@ -63,7 +63,7 @@ mk-caml-lib-bytecode =3D $(call quiet-command, $(OCAMLC) = $(OCAMLCFLAGS) -a -o $1 $ =20 mk-caml-stubs =3D $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a` = $2,MKLIB,$1) mk-caml-lib-stubs =3D \ - $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//= '` $2 $3,MKLIB,$1) + $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//= '` $2 `echo $3 | sed -e 's/-ccopt \(-l\|-L\)/\1/g'`,MKLIB,$1) =20 # define a library target .cmxa and .cma define OCAML_LIBRARY_template @@ -74,7 +74,7 @@ define OCAML_LIBRARY_template $(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o) $(call mk-caml-stubs,$$@, $$+) lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o) - $(call mk-caml-lib-stubs,$$@, $$+, $(foreach lib,$(LIBS_$(1)),$(lib))) + $(call mk-caml-lib-stubs,$$@, $$+, $(foreach lib,$(LIBS_$(1)),-ccopt $(li= b))) endef =20 # Dynamically linked OCaml libraries ("plugins" in Dynlink parlance) --=20 2.39.5