Author: jcrouse Date: 2007-10-24 16:59:05 +0200 (Wed, 24 Oct 2007) New Revision: 47
Modified: buildrom-devel/packages/memtest/memtest.mk buildrom-devel/packages/uclibc/uclibc.mk buildrom-devel/scripts/Build.settings Log: [BUILDROM] fix memtest errors when building on a 64 bit system
Make sure we pass the 32 bit flags for the GNU tools - this allows memtest to build correctly on a 64 bit machine.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: buildrom-devel/packages/memtest/memtest.mk =================================================================== --- buildrom-devel/packages/memtest/memtest.mk 2007-10-24 14:56:47 UTC (rev 46) +++ buildrom-devel/packages/memtest/memtest.mk 2007-10-24 14:59:05 UTC (rev 47) @@ -36,7 +36,7 @@ $(MEMTEST_SRC_DIR)/memtest: $(MEMTEST_CONFIG_TARGET) @ echo "Building memtest..." - @ $(MAKE) -C $(MEMTEST_SRC_DIR) CCFLAGS="$(CFLAGS)" memtest > $(MEMTEST_BUILD_LOG) 2>&1 + @ $(MAKE) -C $(MEMTEST_SRC_DIR) AS="$(AS)" CC="$(CC)" LD="$(LD)" CCFLAGS="$(CFLAGS)" memtest > $(MEMTEST_BUILD_LOG) 2>&1
$(MEMTEST_STAMP_DIR) $(MEMTEST_LOG_DIR): @ mkdir -p $@
Modified: buildrom-devel/packages/uclibc/uclibc.mk =================================================================== --- buildrom-devel/packages/uclibc/uclibc.mk 2007-10-24 14:56:47 UTC (rev 46) +++ buildrom-devel/packages/uclibc/uclibc.mk 2007-10-24 14:59:05 UTC (rev 47) @@ -32,7 +32,7 @@ @ echo "Building uclibc..." @ ( unset CFLAGS; unset LDFLAGS; \ $(MAKE) -C $(UCLIBC_SRC_DIR) TARGET_ARCH="$(UCLIBC_ARCH)" \ - CC="$(CC) $(CROSS_CFLAGS)" LD="$(LD) $(CROSS_LDFLAGS)" \ + CC="$(CC)" LD="$(LD)" \ HOSTCC="$(HOST_CC)" KERNEL_SOURCE="$(KERNEL_SRC_DIR)" \ RUNTIME_PREFIX="/" \ SHARED_LIB_LOADER_PATH="/lib" \
Modified: buildrom-devel/scripts/Build.settings =================================================================== --- buildrom-devel/scripts/Build.settings 2007-10-24 14:56:47 UTC (rev 46) +++ buildrom-devel/scripts/Build.settings 2007-10-24 14:59:05 UTC (rev 47) @@ -15,6 +15,7 @@ find-tool=$(shell set -e; if which $(1) > /dev/null 2>&1; \ then echo "y"; else echo "n"; fi)
+ CC ?= gcc STRIP ?= strip AS ?= as @@ -28,9 +29,15 @@
ifeq ($(BUILD_ARCH),x86_64) ifneq ($(BUILD_ARCH), $(TARGET_ARCH)) + +CC += -m32 +AS += --32 +LD += -melf_i386 + CROSS_ASFLAGS=-m32 CROSS_CFLAGS=-m32 CROSS_LDFLAGS=-melf_i386 + endif endif
@@ -73,4 +80,4 @@
HOSTCC=$(HOST_CC)
-export CC CFLAGS LDFLAGS ASFLAGS LIBS +export CC AS CFLAGS LDFLAGS ASFLAGS LIBS