use no-as-needed when linking libatomic to work around library ordering issue. archive/raspbian/0.20.1+ds1-1+rpi1 raspbian/0.20.1+ds1-1+rpi1
authorPeter Michael Green <plugwash@raspbian.org>
Sat, 12 Mar 2022 21:13:38 +0000 (21:13 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Sat, 12 Mar 2022 21:13:38 +0000 (21:13 +0000)
debian/changelog
debian/rules

index 9dfa7cdf8e9984da8ba0f86d3b545851beb555bb..08a07b1914f4373649e6cdb2c7ff167b6facb747 100644 (file)
@@ -3,6 +3,9 @@ giada (0.20.1+ds1-1+rpi1) bookworm-staging; urgency=medium
   [changes brought forward from 0.15.2+ds1-2+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Sun, 17 Mar 2019 13:18:55 +0000]
   * Link against libatomic on armhf too for raspbian.
 
+  [changes introduced in 0.20.1+ds1-1+rpi1 by Peter Michael Green]
+  * Use no-as-needed when linking with libatomic to workaround library ordering issue.
+
  -- Raspbian forward porter <root@raspbian.org>  Fri, 11 Mar 2022 14:12:06 +0000
 
 giada (0.20.1+ds1-1) unstable; urgency=medium
index b5dd03579f5ce431352661e418d13c5a6aa7aac6..99dfcba2706caa9290024db0a3fc792670462e92 100755 (executable)
@@ -33,7 +33,7 @@ DEB_CXXFLAGS_MAINT_APPEND += $(shell pkg-config --cflags libjpeg libpng libcurl
 noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|armhf|powerpc|powerpcspe|m68k|mips|mipsel|sh4|riscv64)")
 # link with libatomic on architectures without built-in atomic
 ifeq ($(if $(noatomicarch),atomic), atomic)
-       LIBS += -latomic
+       LIBS += -Wl,-push-state -Wl,-no-as-needed -latomic -Wl,-pop-state
 endif
 
 DEB_LDFLAGS_MAINT_APPEND += $(LIBS)