Emilio Pozuelo Monfort <po...@debian.org> writes: > On 05/01/17 14:00, Gaudenz Steinlin wrote: >> >> Hi >> >> Aurelien Jarno <aurel...@aurel32.net> writes: >> >>> On 2016-12-30 10:06, Emilio Pozuelo Monfort wrote: >>>> On 29/12/16 20:56, Gaudenz Steinlin wrote: >>> >>> The problem is indeed a memory issue, not that the buildd doesn't have >>> enough memory, but just that you can allocate only 2GB per process on a >>> 32-bit MIPS machine. As Emilio said, the above GCC flag should help to >>> reduce the memory usage by running the garbage collector more often. >>> >>> However gcc 6.3 seems to have improved the situation a bit, so I given >>> back the packages, I hope they will build now. Otherwise I have a patch >>> ready to change the GCC defaults. That said GCC upstream consider it's a >>> bug in the garbage collector [1], so that should be fixed instead and the >>> patch should be considered as a temporary workaround. >>> >> >> Aurelien thanks for taking care and resheduling the build. Unfortunately >> this did not solve the problem. But setting the following variables >> solves the virtual memory issue for me on the mipsel porterbox (eller): >> >> export DEB_CFLAGS_MAINT_APPEND= --param ggc-min-expand=10 -O1 >> export DEB_CXXFLAGS_MAINT_APPEND= --param ggc-min-expand=10 -O1 >> export DEB_CFLAGS_MAINT_STRIP= -O2 >> export DEB_CXXFLAGS_MAINT_STRIP= -O2 >> >> But unfortunately the build fails at another point. See the log below. >> I'm not sure how to fix this. If I understand it right these atomic >> operations are just not supported on mipsel[1]. Or is there a way to make >> them work? > > They are supported. You are probably missing -latomic.
You are right, using -latomic fixes the issue. If I understand this right -latomic "emulates" the atomic operation if there is no direct support in the processor for it. What's the correct way to detect if -latomic is needed? Or is it safe to use -latomic everywhere on all architectures and let the linker/compiler do the right thing? I'd like to patch the build system in a way that can be sent upstream instead of working around it. Gaudenz -- PGP: 836E 4F81 EFBB ADA7 0852 79BF A97A 7702 BAF9 1EF5
signature.asc
Description: PGP signature