giada
                                
                                
                                
                                    giada copied to clipboard
                            
                            
                            
                        Add -latomic flag for -DARM
This is partA of a revamped version of https://github.com/monocasual/giada/pull/504, that only includes the "-latomic" fix for arm.
this PR has the "fix typo" commits squashed into a single commit.
also note, that there are more architectures that require linking with -latomic (though most of them being rather exotic).
this is the reason we us the following in the meta-buildsystem for the giada Debian package:
noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4|riscv64)")
# link with libatomic on architectures without built-in atomic
ifeq ($(if $(noatomicarch),atomic), atomic)
        LIBS += -latomic
endif
and then inject the LIBS into the CMake invocation.
so I personally don't have any special interest in this PR (as it seems to be somewhat over-specific for my needs), and you might just want to use it as a starting point for a more generic solution (e.g. rather than if(DEFINED ARM) use an option WITH_ATOMIC or somesuch)
Thanks for the revamp @umlaeute. I'm talking to the original author here  - actually this might not be 100% correct, because the check is performed inside the if(WITH_VST2 OR WITH_VST3) block and we are using atomics regardless of the presence of VSTs. Anyway I'll keep this one open as a memo for the -latomic flag issue for ARM.
the original author is @DatanoiseTV (just mentioning them here, so they get notified)