From 7e196cd1708bfe567454269bba7bc3f7b75364dc Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 24 May 2016 16:23:09 +0100 Subject: c11/threads: resolve link issues with -O0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add weak symbol notation for the pthread_mutexattr* symbols, thus making the linker happy. When building with -O1 or greater the optimiser will kick in and remove the said functions as they are dead/unreachable code. Ideally we'll enable the optimisations locally, yet that does not seem to work atm. v2: Add the AX_GCC_FUNC_ATTRIBUTE([weak]) hunk in configure. Cc: Alejandro PiƱeiro Cc: Ben Widawsky Cc: Ilia Mirkin Cc: Rob Herring Signed-off-by: Emil Velikov Tested-by: Rob Clark Tested-by: Mark Janes --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 47c138a..fc0b1db 100644 --- a/configure.ac +++ b/configure.ac @@ -233,6 +233,7 @@ AX_GCC_FUNC_ATTRIBUTE([pure]) AX_GCC_FUNC_ATTRIBUTE([returns_nonnull]) AX_GCC_FUNC_ATTRIBUTE([unused]) AX_GCC_FUNC_ATTRIBUTE([warn_unused_result]) +AX_GCC_FUNC_ATTRIBUTE([weak]) AM_CONDITIONAL([GEN_ASM_OFFSETS], test "x$GEN_ASM_OFFSETS" = xyes) -- cgit v1.1