Control: tags -1 patch

On Fri, Jul 20, 2018 at 04:05:06PM +0200, Helmut Grohne wrote:
>...
> | /usr/bin/ld: tt.cpp:(.text+0xb51c): undefined reference to 
> `__atomic_store_8'
> | /usr/bin/ld: tt.cpp:(.text+0xb4dc): undefined reference to 
> `__atomic_store_8'
> | /usr/bin/ld: tt.cpp:(.text+0xb518): undefined reference to 
> `__atomic_store_8'
>...
> Given that this might be a toolchain problem, I've added
> debian-gcc@l.d.o to X-Debbugs-Cc.

The gcc bug for this is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358

A workaround is (tested on armel):

--- debian/rules.old    2018-08-18 20:38:53.923132930 +0000
+++ debian/rules        2018-08-18 21:25:44.578395650 +0000
@@ -29,6 +29,7 @@
 # no compile on the first shot
 ifneq (,$(findstring powerpc,$(DEB_HOST_ARCH_CPU)))
 TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
+export DEB_LDFLAGS_MAINT_APPEND=-latomic
 endif
 
 ifneq (,$(findstring s390,$(DEB_HOST_ARCH_CPU)))
@@ -41,20 +42,22 @@
 
 ifneq (,$(findstring mips,$(DEB_HOST_ARCH_CPU)))
 TARGET := profile-build ARCH=general-$(DEB_HOST_ARCH_BITS)
+export DEB_LDFLAGS_MAINT_APPEND=-latomic
 endif
 
 # Profiling fails due to compiler issues
 ifneq (,$(findstring mipsel,$(DEB_HOST_ARCH_CPU)))
 TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
+export DEB_LDFLAGS_MAINT_APPEND=-latomic
 endif
 
 ifeq (alpha,$(DEB_HOST_ARCH_CPU))
 TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
 endif
 
-# no compile on the first shot
 ifneq (,$(findstring armel,$(DEB_HOST_ARCH)))
 TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
+export DEB_LDFLAGS_MAINT_APPEND=-latomic
 endif
 
 ifneq (,$(findstring armhf,$(DEB_HOST_ARCH)))
@@ -67,6 +70,12 @@
 
 ifeq (m68k,$(DEB_HOST_ARCH_CPU))
 TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
+export DEB_LDFLAGS_MAINT_APPEND=-latomic
+endif
+
+ifeq (sh4,$(DEB_HOST_ARCH_CPU))
+TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
+export DEB_LDFLAGS_MAINT_APPEND=-latomic
 endif
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))


> Helmut

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Reply via email to