From owner-freebsd-ppc@freebsd.org Sun Jul 28 20:07:30 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B67BB2D76 for ; Sun, 28 Jul 2019 20:07:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7936674988 for ; Sun, 28 Jul 2019 20:07:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by freefall.freebsd.org (Postfix) id 6276211A80; Sun, 28 Jul 2019 20:07:30 +0000 (UTC) Delivered-To: powerpc@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (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 "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 5E8B211A7F for ; Sun, 28 Jul 2019 20:07:30 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33B8674986 for ; Sun, 28 Jul 2019 20:07:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 239751CF00 for ; Sun, 28 Jul 2019 20:07:30 +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 x6SK7T6e026384 for ; Sun, 28 Jul 2019 20:07:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6SK7Tqp026383 for powerpc@FreeBSD.org; Sun, 28 Jul 2019 20:07:29 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: powerpc@FreeBSD.org Subject: [Bug 239007] lang/gcc8 enable secure-plt by default for powerpc* Date: Sun, 28 Jul 2019 20:07:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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 Some People X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: andreast@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: 7936674988 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2019 20:07:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239007 Mark Millard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marklmi26-fbsd@yahoo.com --- Comment #5 from Mark Millard --- (In reply to Justin Hibbits from comment #3) For system-clang-b-ased cross build contexts, possibly including powerpc64 building its lib32, what I've observed follows (in hopes that it will help track things down). For lld based ld . . . >From what I've seen via trying cc/c++ commands that target linking for 32-bit powerpc, with with -### added, the linker command has the likes of: "-m" "elf32ppc_fbsd" and I do not see anything else that it is given on the command line that directly indicates a 32-bit powerpc context. So my guess is that the linker needs to enable allowing the --secure-plt option based on the likes of that -m elf32ppc_fbsd . lld does not do this yet and rejects the option. As for modern gnu ld . . . Modern gnu ld does allow the --secure-plt (as does the historical FreeBSD system binutils). But, unlike the old FreeBSD binutils, modern gnu ld returns an error code when --secure-plt was specified but the linker reports the likes of: /usr/local/powerpc64-unknown-freebsd13.0/bin/ld: bss-plt forced due to ... (and it does report such during builds when system-clang is used). The non-zero return status from ld stops the build when such a modern gnu ld is used. The easiest way to see many of using bss-plt messages is to search building with system clang and the historical freebsd binutils: Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/crt1.o Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/crtbeginS.o Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(fixdfdi.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(fixsfdi.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(floatdidf.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(floatdisf.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(floatundidf.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(floatundisf.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(moddi3.o) Using bss-plt due to /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/= lib/libgcc.a(umoddi3.o) Using bss-plt due to accf_http.kld Using bss-plt due to acl_nfs4.kld Using bss-plt due to acl_posix1e.kld Using bss-plt due to if_ae.kld Using bss-plt due to if_age.kld Using bss-plt due to reloc.o Note: This stopped where it did because of: --- agp.ko.full --- ld: agp.kld(.text+0x37a4): R_PPC_PLTREL24 reloc against local symbol agp.kld: could not read symbols: Bad value *** [agp.ko.full] Error code 1 so there might be more places. (I'll not here get into why gnu ld decides that bss-plt is to be used for the clang output.) Between the two types of modern ld's, I've not managed a system-clang based 32-bit powerpc cross build since the secure-plt switch was made. --=20 You are receiving this mail because: You are on the CC list for the bug.=