Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2022 18:23:09 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Ed Maste <emaste@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 2f3a961487c9 - main - Add RELRO build knob, default to enabled
Message-ID:  <79422862-b886-09c0-8af9-d5136a7e6f7f@FreeBSD.org>
In-Reply-To: <202206221620.25MGKCHU098065@gitrepo.freebsd.org>
References:  <202206221620.25MGKCHU098065@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/22/22 9:20 AM, Ed Maste wrote:
> The branch main has been updated by emaste:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=2f3a961487c97dc879f07bb97bc62d7bd70b3f8d
> 
> commit 2f3a961487c97dc879f07bb97bc62d7bd70b3f8d
> Author:     Ed Maste <emaste@FreeBSD.org>
> AuthorDate: 2022-06-22 12:58:04 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2022-06-22 16:18:41 +0000
> 
>      Add RELRO build knob, default to enabled
>      
>      Note that lld enables relro by default, so that we already had either
>      partial or full RELRO, depending on the state of the BIND_NOW knob.
>      
>      Add a RELRO knob so that the option can be disabled if desired, and so
>      that builds using the GNU toolchain are equivalent to those using the
>      standard Clang/LLVM toolchain.
>      
>      Reviewed by:    markj
>      MFC after:      3 weeks
>      Sponsored by:   The FreeBSD Foundation
>      Differential Revision:  https://reviews.freebsd.org/D35545

This broke the cross-build on macOS (the GitHub jobs are failing on main now).

Looks like macOS's linker doesn't like '-z relro'.

996 --------------------------------------------------------------
997 >>> stage 1.2: bootstrap tools
998 --------------------------------------------------------------
999 ===> lib/clang/libllvmminimal (obj,all,install)
1000 ===> usr.bin/fortune/strfile (obj,all,install)
1001 ===> usr.bin/dtc (obj,all,install)
1002 warning: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Wunknown-warning-option]
1003 warning: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Wunknown-warning-option]
1004 warning: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Wunknown-warning-option]
1005 1 warning generated.
1006 ld: unknown option: -zrelro
1007 clang: error: linker command failed with exit code 1 (use -v to see invocation)
1008 --- strfile ---
1009 *** [strfile] Error code 1

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79422862-b886-09c0-8af9-d5136a7e6f7f>