platform_build/core/combo/linux-x86.mk
Doug Zongker 742fa575d0 fix problems with new image size calculations
The build servers have GNU coreutils 5.93, where stat does not output
a newline.  Ubuntu hardy has GNU coreutils 6.10, where it does.
Lacking a newline messes up the summing of the sizes.  Fix
get-file-size to remove the newline if present, and make the total
calculation in assert-max-file-size more robust.

Also, if the image was too big, it was not actually making the build
fail (because /bin/false was not the last thing called).  Fix that so
it does.
2009-07-08 12:09:04 -07:00

33 lines
1 KiB
Makefile

# Configuration for Linux on x86.
# Included by combo/select.make
# right now we get these from the environment, but we should
# pick them from the tree somewhere
$(combo_target)CC := $(CC)
$(combo_target)CXX := $(CXX)
$(combo_target)AR := $(AR)
ifeq ($(combo_target),HOST_)
# $(1): The file to check
define get-file-size
stat --format "%s" "$(1)" | tr -d '\n'
endef
endif
# On the sim, we build the "host" tools in 64 bit iff the compiler
# does it for us automatically. In other words, that means on 64 bit
# system, they're 64 bit and on 32 bit systems, they're 32 bits. In
# all other cases, we build 32 bit, since this is what we release.
ifneq ($(combo_target)$(TARGET_SIMULATOR),HOST_true)
$(combo_target)GLOBAL_CFLAGS := $($(combo_target)GLOBAL_CFLAGS) -m32
$(combo_target)GLOBAL_LDFLAGS := $($(combo_target)GLOBAL_LDFLAGS) -m32
endif
$(combo_target)GLOBAL_CFLAGS += -fPIC
$(combo_target)GLOBAL_CFLAGS += \
-include $(call select-android-config-h,linux-x86)
$(combo_target)NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined