On Fri, Feb 3, 2017 at 5:32 PM, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote: > hm, i don't think we want it to build for amd64 if we're doing native > builds on x32, right? > > In mk/userland-cflags.mk, we have: > > ifeq ($(origin GCCM),undefined) > ifeq ($(ARCH),i686) > GCCM=-m32 > endif > ifeq ($(ARCH),x86_64) > GCCM=-m64 > endif > endif > USERLAND_CFLAGS+=$(GCCM) > > is ARCH defined as x86_64 for x32? If so, is there a preferred way that > libreswan should make this distinction? or should i just manually set
I'm not sure exactly where ARCH comes from - but one difference you could use is that the GNU triplet for x32 is x86_64-linux-gnux32, as opposed to x86_64-linux-gnu for amd64. > GCCM to -m32 in debian/rules when building for x32? The flag would be -mx32 (-m32 would try to cross-build for i386 and run into the same issue). Either that, or just drop the -m64/-m32/-mx32 flag altogether for Debian builds as it's not really necessary anyway. -- Daniel Schepler