From 9ff1e151e846fffe461e75bbc17ac32a445eb62c Mon Sep 17 00:00:00 2001 From: Joseph R. Prostko Date: Wed, 17 Oct 2012 08:02:30 -0400 Subject: [PATCH] Address issue with building code that relies on SSP * -lssp_nonshared being passed at link time was resulting in multiple definition errors * Apps such as Perl and CUPS would fail to build due to this * This should alleviate the problem when -fstack-protector or -fstack-protector-all are used Thanks to diger for letting me know of this issue and making me aware of a fix --- gcc/gcc/config/haiku.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index fbfb4f9..04fdb20 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -170,3 +170,8 @@ /* Haiku headers are C++-aware (and often use C++). */ #define NO_IMPLICIT_EXTERN_C + +/* Only allow -lssp for SSP, as -lssp_nonshared is problematic in Haiku */ +#ifndef TARGET_LIBC_PROVIDES_SSP +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}" +#endif -- gitore 0.2.2