[-- Attachment #1: Type: text/plain, Size: 448 bytes --] There is a new pull request by gco against master on the mblaze repository https://github.com/gco/mblaze stackprot https://github.com/leahneukirchen/mblaze/pull/229 use -fstack-protector-strong for both compiling and linking gcc needs -fstack-protector-strong when linking else `__stack_chk_fail` and `__stack_chk_guard` are not defined (at least on Solaris). A patch file from https://github.com/leahneukirchen/mblaze/pull/229.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-stackprot-229.patch --] [-- Type: text/x-diff, Size: 615 bytes --] From 35441478ad3bdc63c569c9f432b6e3e5df20026d Mon Sep 17 00:00:00 2001 From: gco <gco@jazzhaiku.com> Date: Fri, 10 Jun 2022 20:08:40 -0700 Subject: [PATCH] if -fstack-protector-strong is used, it needs to be specified for both compiling and linking --- GNUmakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/GNUmakefile b/GNUmakefile index 07a0b1a..c90e938 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,6 @@ CFLAGS?=-g -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 override CFLAGS:=-Wall -Wno-switch -Wextra $(CFLAGS) +LDFLAGS?=-fstack-protector-strong LDLIBS=-lrt OS := $(shell uname)
[-- Attachment #1: Type: text/plain, Size: 315 bytes --] There's a closed pull request on the mblaze repository use -fstack-protector-strong for both compiling and linking https://github.com/leahneukirchen/mblaze/pull/229 Description: gcc needs -fstack-protector-strong when linking else `__stack_chk_fail` and `__stack_chk_guard` are not defined (at least on Solaris).