From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id 3345A3858438 for ; Mon, 30 Oct 2023 16:19:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3345A3858438 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 3345A3858438 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698682791; cv=none; b=VCTpjy9zqzeo02VtD/BNJ6AIn6gXEfSBgZoTlnSHJw39tidTaig3XtigXQW40z0Lo1Jwj0Kt5suSuhkXzUyPDQfde5uvj60PURHmLrN6kDhx9GLnHwNVHoTzKa/9RiOvle2tT99ha2eGz1VShLP/hPCA4WA06+CI4qi9SGMSGBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698682791; c=relaxed/simple; bh=STEkUlVlnYtSzjs85wM5Po3EXlczvFbH6/aEz++qqxA=; h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To; b=dG2MOh+vll3KJI7lKr+QcyB4PP5Ge327zZDJLxRVL49uf3t8Dnw3YmmjQOp29yYlaAySQpn/0UfIrQtWUrQGi/2sOyYssL6VnqR4cHxj9jhDhsOxdWfm+F/Mjk8FzWgfAweFKJBigQgDP/JmTvLIQfbLKW4INz9f8TKMGjVCE4w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-507bd64814fso6489130e87.1 for ; Mon, 30 Oct 2023 09:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698682787; x=1699287587; darn=gcc.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bzl7qX8Znk3akhX+yKHyYjvWhKINHFR0EL3xYAadIG0=; b=QLFr6LYleT4xNNDLQRPa7EnknnT48IpZ1F5Ka6dfiY752xrvrqt7HbsC3hIfPY34PV a+0SI4dAnWQsUfJ42JOpIYnB+3KKVF8B3Xpxa9mMFvFFEH2tk6gB8T+lH5PlY4Z68GxD gwsb9hPlUIddIE0H3DNP9Hm4bCWw5e7DOrCazCWgKDAlOeAkUH7mBMGWcSvF3YJpnX6G r7ocQCyIxMA8tlE8VFxBF737VHkRqLUFkPYVZ1Wdr+KTdFlwVBqYHyiK02b3Q+s6neSU Fxie1KLLTvfdNNT0ENF9l9GFrgxXl8Qy7led35ARD+SLqMfVQDnceWc3XgNkfMoRpQRG ywvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698682787; x=1699287587; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bzl7qX8Znk3akhX+yKHyYjvWhKINHFR0EL3xYAadIG0=; b=dV9kAYYysqEmPy54yY4Emf/JRVLQqMUFgkXT6F9acdTg46zoPTe1KBhENb+glq8lIS pieaAJvve6T7ThZza6lBmY9dIF1LWZRUs8VkVfSeNRJmeEMJc0RzrcxVY5CcdDm/xaAQ MtRA8PdFH6c8YGXvCG92AE4wsMzUa65i83bUH/tKPopkTMiuK16C0L8r4b1Q7Qx2VUOD BzL6pBqrz0qWPcazzwnCd49w39g5aYOBRZGxK+Wj0BYyA+wIJ+golsdj5bCzfiwvZTex eT+MyiJbg/tGeOiZrURQh3CKZQ4ZmsPD4OnS0t/S+F3EeBVrszWi0ljzOeAOr+Rx8znu EDlA== X-Gm-Message-State: AOJu0YwCya8ghYjb6u/bYJV/h/9wF6ggw3rw0VVCBvxubG9Vjx6sxZ9G v33ekDQ0JrJZ50QyP5fChUg= X-Google-Smtp-Source: AGHT+IEhWRKbMYOzlEiqZwMvtCavk5ygF7Lff7ydBp/zwAb1qEobBWGU3wHQE76xAYL9G0lkONd0tQ== X-Received: by 2002:a05:6512:2356:b0:505:73e7:b478 with SMTP id p22-20020a056512235600b0050573e7b478mr9644163lfu.16.1698682787320; Mon, 30 Oct 2023 09:19:47 -0700 (PDT) Received: from smtpclient.apple (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id e14-20020a056000120e00b0032415213a6fsm8531301wrx.87.2023.10.30.09.19.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2023 09:19:47 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: Darwin: Replace environment runpath with embedded [PR88590] From: Iain Sandoe In-Reply-To: <653fd72a.050a0220.a6a20.de86SMTPIN_ADDED_BROKEN@mx.google.com> Date: Mon, 30 Oct 2023 16:19:46 +0000 Cc: FX Coudert , GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: <12F98F9F-EB77-4514-BB8E-78177A731BAE@gmail.com> References: <653fd72a.050a0220.a6a20.de86SMTPIN_ADDED_BROKEN@mx.google.com> To: Martin Jambor X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: Hi Martin, > On 30 Oct 2023, at 16:17, Martin Jambor wrote: > On Tue, Aug 15 2023, FX Coudert via Gcc-patches wrote: >>=20 >=20 > [...] >=20 >> =46rom e1cf04cadb9fa065fb3f7d6bccf9ed6f1e9e3fc1 Mon Sep 17 00:00:00 = 2001 >> From: Iain Sandoe >> Date: Sun, 28 Mar 2021 14:48:17 +0100 >> Subject: [PATCH 2/4] Darwin: Allow for configuring Darwin to use = embedded >> runpath. >=20 > our buildbot checker found that after this patch, there is an > uncommitted auto(re)conf generated hunk in fixincludes/configure: >=20 > diff --git a/fixincludes/configure b/fixincludes/configure > index b9770489adc..1bb547a1724 100755 > --- a/fixincludes/configure > +++ b/fixincludes/configure > @@ -3027,6 +3027,7 @@ ac_configure=3D"$SHELL $ac_aux_dir/configure" # = Please don't use this var. > # --------------------------- > # _LT_COMPILER_PIC >=20 > +enable_darwin_at_rpath_$1=3Dno >=20 > # _LT_LINKER_SHLIBS([TAGNAME]) > # ---------------------------- > @@ -3049,7 +3050,6 @@ ac_configure=3D"$SHELL $ac_aux_dir/configure" # = Please don't use this var. > # the compiler configuration to `libtool'. > # _LT_LANG_CXX_CONFIG >=20 > - > # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) > # --------------------------------- > # Figure out "hidden" library dependencies from verbose >=20 >=20 > Can I commit it (with an appropriate ChangeLog message) or do you want > to take care of it yourself? Sorry for the omission, I=E2=80=99ll take care of it later today, thanks = for spotting it. Iain >=20 > Thanks, >=20 > Martin >=20 >=20 >>=20 >> Recent Darwin versions place contraints on the use of run paths >> specified in environment variables. This breaks some assumptions >> in the GCC build. >>=20 >> This change allows the user to configure a Darwin build to use >> '@rpath/libraryname.dylib' in library names and then to add an >> embedded runpath to executables (and libraries with dependents). >>=20 >> The embedded runpath is added by default unless the user adds >> '-nodefaultrpaths' to the link line. >>=20 >> For an installed compiler, it means that any executable built with >> that compiler will reference the runtimes installed with the >> compiler (equivalent to hard-coding the library path into the name >> of the library). >>=20 >> During build-time configurations any "-B" entries will be added to >> the runpath thus the newly-built libraries will be found by exes. >>=20 >> Since the install name is set in libtool, that decision needs to be >> available here (but might also cause dependent ones in Makefiles, >> so we need to export a conditional). >>=20 >> This facility is not available for Darwin 8 or earlier, however the >> existing environment variable runpath does work there. >>=20 >> We default this on for systems where the external DYLD_LIBRARY_PATH >> does not work and off for Darwin 8 or earlier. For systems that can >> use either method, if the value is unset, we use the default (which >> is currently DYLD_LIBRARY_PATH). >>=20 >> ---- >>=20 >> Ada changes: >> add paths relative to @loader-path >>=20 >> JIT changes: >>=20 >> This patch expects DARWIN_RPATH to be computed and available; which >> means that we will use @rpath or ${libdir} as the name prefix >> depending on the system version and the setting of >> --enable-darwin-at-rpath. For branches that do not have this >> available, the value should be set to ${libdir}. >>=20 >> added m2 library changes. >>=20 >> ChangeLog: >>=20 >> * configure: Regenerate. >> * configure.ac: Do not add default runpaths to GCC exes >> when we are building -static-libstdc++/-static-libgcc (the >> default). >> * libtool.m4: Add 'enable-darwin-at-runpath'. Act on the >> enable flag to alter Darwin libraries to use @rpath names. >>=20 >> fixincludes/ChangeLog: >>=20 >> * configure: Regenerate. >>=20 >> gcc/ChangeLog: >>=20 >> * aclocal.m4: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >> * config/darwin-driver.cc: Handle Darwin rpaths. >> * config/darwin.h: Handle Darwin rpaths. >> * config/darwin.opt: Handle Darwin rpaths. >> * Makefile.in: Handle Darwin rpaths. >>=20 >> gcc/ada/ChangeLog: >>=20 >> * gcc-interface/Makefile.in: Handle Darwin rpaths. >>=20 >> gcc/jit/ChangeLog: >> * Make-lang.in: Handle Darwin rpaths. >>=20 >> libatomic/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> libbacktrace/ChangeLog: >>=20 >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> libcc1/ChangeLog: >>=20 >> * configure: Regenerate. >>=20 >> libffi/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >>=20 >> libgcc/ChangeLog: >>=20 >> * config/t-slibgcc-darwin: Generate libgcc_s >> with an @rpath name. >> * config.host: Handle Darwin rpaths. >>=20 >> libgfortran/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths >>=20 >> libgm2/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * aclocal.m4: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >> * libm2cor/Makefile.am: Handle Darwin rpaths. >> * libm2cor/Makefile.in: Regenerate. >> * libm2iso/Makefile.am: Handle Darwin rpaths. >> * libm2iso/Makefile.in: Regenerate. >> * libm2log/Makefile.am: Handle Darwin rpaths. >> * libm2log/Makefile.in: Regenerate. >> * libm2min/Makefile.am: Handle Darwin rpaths. >> * libm2min/Makefile.in: Regenerate. >> * libm2pim/Makefile.am: Handle Darwin rpaths. >> * libm2pim/Makefile.in: Regenerate. >>=20 >> libgomp/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths >>=20 >> libitm/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> libobjc/ChangeLog: >>=20 >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> libphobos/ChangeLog: >>=20 >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >> * libdruntime/Makefile.am: Handle Darwin rpaths. >> * libdruntime/Makefile.in: Regenerate. >> * src/Makefile.am: Handle Darwin rpaths. >> * src/Makefile.in: Regenerate. >>=20 >> libquadmath/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> libsanitizer/ChangeLog: >>=20 >> * asan/Makefile.am: Handle Darwin rpaths. >> * asan/Makefile.in: Regenerate. >> * configure: Regenerate. >> * hwasan/Makefile.am: Handle Darwin rpaths. >> * hwasan/Makefile.in: Regenerate. >> * lsan/Makefile.am: Handle Darwin rpaths. >> * lsan/Makefile.in: Regenerate. >> * tsan/Makefile.am: Handle Darwin rpaths. >> * tsan/Makefile.in: Regenerate. >> * ubsan/Makefile.am: Handle Darwin rpaths. >> * ubsan/Makefile.in: Regenerate. >>=20 >> libssp/ChangeLog: >>=20 >> * Makefile.am: Handle Darwin rpaths. >> * Makefile.in: Regenerate. >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> libstdc++-v3/ChangeLog: >>=20 >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >> * src/Makefile.am: Handle Darwin rpaths. >> * src/Makefile.in: Regenerate. >>=20 >> libvtv/ChangeLog: >>=20 >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> lto-plugin/ChangeLog: >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths. >>=20 >> zlib/ChangeLog: >> * configure: Regenerate. >> * configure.ac: Handle Darwin rpaths.