# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../musl/pkg/gcc/0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch # Copyright (C) 2020 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- From 740342a0e4b0b3af498964440918abba1a27ba33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 21 Aug 2020 07:03:00 +0000 Subject: [PATCH 22/30] Alpine musl package provides libssp_nonshared.a. We link to it unconditionally, as otherwise we get link failures if some objects are -fstack-protector built and final link happens with -fno-stack-protector. This seems to be the common case when bootstrapping gcc, the piepatches do not seem to fully fix the crosstoolchain and bootstrap sequence wrt. stack-protector flag usage. --- gcc/gcc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index daeb4d0c8ea..6920bec0fa0 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -894,8 +894,7 @@ proper position among the other output files. */ #ifndef LINK_SSP_SPEC #ifdef TARGET_LIBC_PROVIDES_SSP -#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" +#define LINK_SSP_SPEC "-lssp_nonshared" #else #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ "|fstack-protector-strong|fstack-protector-explicit" \ -- 2.27.0