From d805098c739a9dfffacb2591ad8906b70376216e Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 29 Jul 2018 20:55:23 +0200 Subject: Check for -fstack-protector Not all toolchains provide support for -fstack-protector. This patch provides a configure check to avoid build errors like /home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared /home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp --- src/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index c26293dd..5c52658a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,9 +35,12 @@ AM_CPPFLAGS = \ driver_cflags = \ -Wall \ -fvisibility=hidden \ - -fstack-protector \ $(NULL) +if USE_SSP +driver_cflags += -fstack-protector +endif + driver_ldflags = \ -avoid-version \ -no-undefined \ -- cgit v1.2.1