• Emil Velikov's avatar
    c11/threads: resolve link issues with -O0 · 7e196cd1
    Emil Velikov authored
    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 <apinheiro@igalia.com>
    Cc: Ben Widawsky <ben@bwidawsk.net>
    Cc: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: Rob Herring <robh@kernel.org>
    Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    Tested-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
    Tested-by: Mark Janes's avatarMark Janes <mark.a.janes@intel.com>
    7e196cd1
configure.ac 90.5 KB