This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] FreeBSD PowerPC use secure-plt


On 26.09.19 08:13, Andreas Tobler wrote:
Hi Segher,

On 26.09.19 00:49, Segher Boessenkool wrote:

On Wed, Sep 25, 2019 at 10:46:57PM +0200, Andreas Tobler wrote:
--- gcc/config/rs6000/t-freebsd64	(revision 276090)
+++ gcc/config/rs6000/t-freebsd64	(working copy)
@@ -27,3 +27,6 @@
   MULTILIB_EXCEPTIONS     =
   MULTILIB_OSDIRNAMES	= ../lib32
+SECURE_PLT = $(if $(findstring TARGET_FREEBSD32_SECURE_PLT=1, $(tm_defines)),msecure-plt)
+
+MULTILIB_EXTRA_OPTS += $(SECURE_PLT)

$(findstring) isn't super great, it looks for substrings, so it would
also match "TARGET_FREEBSD32_SECURE_PLT=123"; you can use $(filter) instead?

Thank you for the feedback. Indeed, filter looks better. Testing again :)

And here for completeness the CL.

2019-09-25  Andreas Tobler  <andreast@gcc.gnu.org>

	* config.gcc: Use the secure-plt on FreeBSD 13 and upwards for
	32-bit PowerPC.
	Define TARGET_FREEBSD32_SECURE_PLT for 64-bit PowerPC.
	* config/rs6000/t-freebsd64: Make use of the above define and build
	the 32-bit libraries with secure-plt.

Looks fine to me either way.

Committed to trunk.

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]