From nobody Fri Nov 10 21:13:54 2023 X-Original-To: pkg@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 4SRs4y42GQz50TC5 for ; Fri, 10 Nov 2023 21:13:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SRs4y1dxkz3H2R for ; Fri, 10 Nov 2023 21:13:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699650834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RBnZkLWv+0TU6tXksqlAeXRJh+y9MbGCSBUFWEH14CY=; b=TSC6HvdkE9dUq/0lYBmVWik0mFuZgtvuNcW49TXkZg1eulDmwvgom6NKl90SFLewzWrNS5 jTMpMjujm4vDy/avvfJQ7BsixsrvuJo7ovv5fjeX1bZcC2m6IuwcSn+fKi2/IdhsKrJm9K pW6rlgwJcoJJo9mE9Xsy7CElmZ1sxmvfgAFt98Qffqwb2mcrwY51+eiA5haWMTrpnw9l2t jSj6RCa+bd5pQ2G+fnP5m7FYPUEGcsrZ1ZdizSs+SSe8PKRu4kC/ox9RhBLdM3XvC++jfu spC4PpvbevuHisjJ41xfuLeb7wuF1KDHK1TThO4gJ4GKewKygh3IerTCzNV4JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699650834; a=rsa-sha256; cv=none; b=jgiiYLFUM1j90rX6rTvUVcgUsZ2G7X5liefZoiT2MVOCdJDpV1GFsXNIy2B9CyAncISYTh Jhsl2U5gK42twT1Igvt0UB/p0qApHRXyCPg04IkGqAzqX7GpQc3nHuKwC/CVdVLQjlJKc2 UC7CP69cHon4XTi+Ecj+FDAH37YDHJ8DLzsqxZj/4YuakaYT4Y5YK45Xl+oUZ+gFUpAcLE u4Yaa5sawVp+s5qjdgBTLDmigaceKoZDXCyZwAvcp2cSxZnSV9zkO6OZwBrk/qIxQMWrrq ujjP1DOhSMyr0G6gKB7wLRnPFFROgpIP4YfZJKB5yvK+NL2QVnXQ5+RPVgtWOQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SRs4y0kB4z1Cqp for ; Fri, 10 Nov 2023 21:13:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3AALDstt047316 for ; Fri, 10 Nov 2023 21:13:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3AALDsvS047315 for pkg@FreeBSD.org; Fri, 10 Nov 2023 21:13:54 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 275018] ports-mgmt/pkg: building with PIE and RELRO is broken when CFLAGS are set Date: Fri, 10 Nov 2023 21:13:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zarychtam@plan-b.pwste.edu.pl X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275018 Bug ID: 275018 Summary: ports-mgmt/pkg: building with PIE and RELRO is broken when CFLAGS are set Product: Ports & Packages Version: Latest Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: zarychtam@plan-b.pwste.edu.pl Assignee: pkg@FreeBSD.org Flags: maintainer-feedback?(pkg@FreeBSD.org) Since WITH_PIE and WITH_RELRO were introduced to ports, it was impossible to build ports-mgmt/pkg when CFLAGS were also set. To reproduce try to build ports-mgmt/pkg with these settings in make.conf: CFLAGS=3D-O2 -pipe -fno-strict-aliasing=20 WITH_PIE=3DYES=20 WITH_RELRO=3DYES it looks like setting CFLAGS is killing -fPIC at some point which results i= n: ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC I initially believed it was only a flaw, but I was encouraged to submit a PR about it. --=20 You are receiving this mail because: You are the assignee for the bug.=