android_kernel_xiaomi_sm8350/arch/um/scripts/Makefile.unmap
Paolo 'Blaisorblade' Giarrusso 20d0021394 [PATCH] uml: allow building as 32-bit binary on 64bit host
This patch makes the command:

make ARCH=um SUBARCH=i386

work on x86_64 hosts (with support for building 32-bit binaries).  This is
especially needed since 64-bit UMLs don't support 32-bit emulation for guest
binaries, currently.  This has been tested in all possible cases and works.

Only exception is that I've built but not tested a 64-bit binary, because I
hadn't a 64-bit filesystem available.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-14 09:00:25 -07:00

23 lines
661 B
Makefile

clean-files += unmap_tmp.o unmap_fin.o unmap.o
ifdef CONFIG_MODE_TT
#Always build unmap_fin.o
extra-y += unmap_fin.o
#Do dependency tracking for unmap.o (it will be always built, but won't get the tracking unless we use this).
targets += unmap.o
#XXX: partially copied from arch/um/scripts/Makefile.rules
$(obj)/unmap.o: _c_flags = $(call unprofile,$(CFLAGS))
quiet_cmd_wrapld = LD $@
define cmd_wrapld
$(LD) $(LDFLAGS) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) $(CFLAGS) -print-file-name=libc.a); \
$(OBJCOPY) $(UML_OBJCOPYFLAGS) $(obj)/unmap_tmp.o $@ -G switcheroo
endef
$(obj)/unmap_fin.o : $(obj)/unmap.o FORCE
$(call if_changed,wrapld)
endif