From nobody Thu Apr 23 01:00:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Hnl139Nz6bCMF for ; Thu, 23 Apr 2026 01:00:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Hnk0YwJz3mH9 for ; Thu, 23 Apr 2026 01:00:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=Nwzia46N; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::42a as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-82fbdd60b64so2533093b3a.3 for ; Wed, 22 Apr 2026 18:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776906020; x=1777510820; darn=freebsd.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=Bqi0k8H49N/o2nY+5zTatgK82OGz8qQaGlu0UOEyzYo=; b=Nwzia46Nu6+M4wGjSdOieqWKr+LZVxICMvn3mYGzPuVXHjjad28Nj931TmHYxfwmi7 Mu7pvDrUNdUYuBIXLgbpvexfXeMFTxaDySuxXsj/pSFIac5UdHckuIKh8rYagmE6v3eY rrut4Cr89pQHK3VHyMJ41y9kxndswm2n/9Tbwcnh7obZFuLcn0/WH0+9NLZtbbhbda1i OpxIYU8SjSHKOyqP6KjhSlxhXIpoHrI7Wbg6C/jk5GppM1JqpZxDaYpahhMagxO6/DTC j1MX7h4vIpLs/3yeruB2/4z8/D7KIiiXVgShuOG4+PIgOo0aZIyyoOyrKD5wdvDjIBKk Pbew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776906020; x=1777510820; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Bqi0k8H49N/o2nY+5zTatgK82OGz8qQaGlu0UOEyzYo=; b=XksrRNd8gJzuqXnZEf+wG/AydNytsF9rJyFKeFuY27ukouK3Rqf4xfVNamQPkRe6pp GcaoToR6WWGHwzmECEtJGXhqlz5fo78jVurUXXEQpimmuz2/oAFFhE4OkHdXzkIZS3B8 zvxEZd8JKrtq0EpbVJer48KaanVfAjIQvw4p2mng9mEEPZmQfU8y0amBY0IT5ZCtKs8F 1Ltv5Cteqc7PhAuXOQ68JclWDpFDgpNeFrYtqKxIc5PeYw41UB80lP6gsKALNvaGPJVX CPBfmABVe146oaQZgWrVTcsi0QYJIE+dq5SsQq7pE6K+LIEdYlVFsA1ovBTzsXbxzCZl W3ug== X-Forwarded-Encrypted: i=1; AFNElJ+Ywkkl4qLW3EGub2q99JL3zkNTKQ3j4QeaEvcLsmAn+z5Z1sv91bQrDsU+N/ogIANMrk2LUJ2ifdPmH6yBUjGqwfHfXw==@freebsd.org X-Gm-Message-State: AOJu0Yz3pKwnfP8l6xy4V+Hpz5fSMMwUojA0N7wVZx8CGfg/lbAlXVOr IQ3ZL5g/m/EFCihyp1zFQ9WZ9gfHAc516GAjhxosJWerT+Ajo+BLfi3W X-Gm-Gg: AeBDievyF5LVkgnkfJbA4u0JKNWAov3NlqOLMPFsdsSGrVGuWB3uwdPa6sUtj9ayDPL JMsv+4+q2i5oyjYCMLvgne3wmvjz7Xbi+78TaqhzZAqeMtEUUgn6PBCvV+Rkwb0a0fyiC42L8Pa TZr+qqgLVQY9+vi9p5Ceo9u7UMIdt5j/2O727aVBUkM2yW4qXasUmbhbTBQzaN5V0HamaRmJhLO t2Yjol0GL/5yg6SUzDzeSLDhZVFFHZ6SA865F9GCGwZGfK9W6XMPBrzcALvWJ9c0L596ad2ABE1 ip8wAIdMxk5AT8WJzrIXXWNUSrBenYwpF5nA/sMxLeMWGRtCBoszLmj1wn41xtNLdV9f3xavMQm 9Nm0LFVb5xlddyu1OKSKmbHem8OExuLhKt5mytagJXLWpQBW33GkXhx27mtWLhv33PMRVFjEXrl GyFzWtc4+YQOg3wnABGdU6jr2rtajvUuDQcSKy2+aCTT+XTKRo7qFeXbV0 X-Received: by 2002:a05:6a00:3498:b0:824:93e4:2ddf with SMTP id d2e1a72fcca58-82f8c861923mr25071897b3a.13.1776906019670; Wed, 22 Apr 2026 18:00:19 -0700 (PDT) Received: from smtpclient.apple ([176.100.43.95]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8e9fbb85sm21446308b3a.22.2026.04.22.18.00.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Apr 2026 18:00:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: git: 48d6db4932c8 - main - OpenSSL: move `-DOPENSSL_PIC` from `PIC_FLAG` to `SHARED_CFLAGS` From: "Enji Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 22 Apr 2026 18:00:08 -0700 Cc: Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <961C60AE-B053-4531-9C81-E30AC2FEC3A0@gmail.com> References: <69e930dd.253f6.360e2614@gitrepo.freebsd.org> To: Jessica Clarke X-Mailer: Apple Mail (2.3864.400.21) X-Spamd-Result: default: False [-2.66 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.95)[-0.948]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_SPAM_SHORT(0.29)[0.289]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20251104]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::42a:from]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4g1Hnk0YwJz3mH9 X-Spamd-Bar: -- > On Apr 22, 2026, at 4:49=E2=80=AFPM, Enji Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Apr 22, 2026, at 2:24=E2=80=AFPM, Jessica Clarke = wrote: >>=20 >> On 22 Apr 2026, at 21:34, Enji Cooper wrote: >>>=20 >>> The branch main has been updated by ngie: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D48d6db4932c8ec04ca3df79119803f8c= 7c1570d7 >>>=20 >>> commit 48d6db4932c8ec04ca3df79119803f8c7c1570d7 >>> Author: Enji Cooper >>> AuthorDate: 2026-04-21 23:46:19 +0000 >>> Commit: Enji Cooper >>> CommitDate: 2026-04-22 20:34:25 +0000 >>>=20 >>> OpenSSL: move `-DOPENSSL_PIC` from `PIC_FLAG` to `SHARED_CFLAGS` >>>=20 >>> `PIC_FLAG` should be used strictly for `-fPIC`, `-fpic`, etc, = options. >>> `SHARED_CFLAGS` is the more appropriate place to this flag to be = set. >>>=20 >>> Requested by: jrtc27 >>=20 >> Thank you! >>=20 >>> MFC after: 3 days >>> MFC with: 3797fe720a >>> --- >>> secure/lib/libcrypto/Makefile.inc | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>=20 >>> diff --git a/secure/lib/libcrypto/Makefile.inc = b/secure/lib/libcrypto/Makefile.inc >>> index 8f22d501e005..85e2c0813b79 100644 >>> --- a/secure/lib/libcrypto/Makefile.inc >>> +++ b/secure/lib/libcrypto/Makefile.inc >>> @@ -13,7 +13,7 @@ CFLAGS+=3D -I${LCRYPTO_SRC}/providers/fips/include >>> CFLAGS+=3D -I${LCRYPTO_SRC}/providers/implementations/include >>>=20 >>> PICFLAG=3D -fPIC >>=20 >> Assuming nothing else is messing with it, this can now go? >=20 > That=E2=80=99s a good question. I=E2=80=99ll try taking it out and see = what happens. > -Enji >=20 > PS This is what the code used to look like prior to my other change = =E2=80=94 I moved the definitions from secure/lib/libcrypto/Makefile to = secure/lib/libcrypto/Makefile.inc so the symbols could be incorporated = into all of the OpenSSL-related libraries (including the legacy = provider, libssl, etc): Hmmm=E2=80=A6 PICFLAG=3D -fpic by default per share/mk/=E2=80=A6 = and now it=E2=80=99s set to PICFLAG=3D -fPIC. A previous comment said = the value was needed because PowerPC required it. I=E2=80=99m going to = leave this be given that OpenSSL always builds with -fPIC on FreeBSD = (look for "#### *BSD=E2=80=9D in = `crypto/openssl/Configurations/10-main.conf `). Cheers, -Enji =46rom https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html (because = clang=E2=80=99s documentation is far from ideal=E2=80=A6). -fpic Generate position-independent code (PIC) suitable for use in a = shared library, if supported for the target machine. Such code accesses = all constant addresses through a global offset table (GOT). The dynamic = loader resolves the GOT entries when the program starts (the dynamic = loader is not part of GCC; it is part of the operating system). If the = GOT size for the linked executable exceeds a machine-specific maximum = size, you get an error message from the linker indicating that -fpic = does not work; in that case, recompile with -fPIC instead. (These = maximums are 8k on the SPARC, 28k on AArch64 and 32k on the m68k and = RS/6000. The x86 has no such limit.) Position-independent code requires special support, and = therefore works only on certain machines. For the x86, GCC supports PIC = for System V but not for the Sun 386i. Code generated for the IBM = RS/6000 is always position-independent. When this flag is set, the macros __pic__ and __PIC__ are = defined to 1. -fPIC If supported for the target machine, emit position-independent = code, suitable for dynamic linking and avoiding any limit on the size of = the global offset table. This option makes a difference on AArch64, = m68k, PowerPC and SPARC. Position-independent code requires special support, and = therefore works only on certain machines. When this flag is set, the macros __pic__ and __PIC__ are = defined to 2.