7c04932603
The lmbench package generates a binary that is too large for the xtensa default placement of literals in a dedicated section. Use -mtext-section-literal to place literals in the text section. Fixes http://autobuild.buildroot.net/results/afe/afe9f4550e6ac9a41e4ba338773c1d51034273f7/. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
43 lines
1.2 KiB
Makefile
43 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# lmbench
|
|
#
|
|
################################################################################
|
|
|
|
LMBENCH_VERSION = 3.0-a9
|
|
LMBENCH_SOURCE = lmbench-$(LMBENCH_VERSION).tgz
|
|
LMBENCH_SITE = http://downloads.sourceforge.net/project/lmbench/development/lmbench-$(LMBENCH_VERSION)/
|
|
LMBENCH_LICENSE = lmbench license (based on GPLv2)
|
|
LMBENCH_LICENSE_FILES = COPYING COPYING-2
|
|
|
|
LMBENCH_CFLAGS = $(TARGET_CFLAGS)
|
|
LMBENCH_LDLIBS = $(TARGET_LDFLAGS)
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
|
LMBENCH_DEPENDENCIES += libtirpc
|
|
LMBENCH_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/
|
|
LMBENCH_LDFLAGS += -ltirpc
|
|
endif
|
|
|
|
ifeq ($(BR2_xtensa),y)
|
|
LMBENCH_CFLAGS += -mtext-section-literals
|
|
endif
|
|
|
|
define LMBENCH_CONFIGURE_CMDS
|
|
$(call CONFIG_UPDATE,$(@D))
|
|
sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile
|
|
sed -i '/cd .*doc/d' $(@D)/src/Makefile
|
|
sed -i '/include/d' $(@D)/src/Makefile
|
|
touch $@
|
|
endef
|
|
|
|
define LMBENCH_BUILD_CMDS
|
|
$(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDFLAGS="$(LMBENCH_LDFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src
|
|
endef
|
|
|
|
define LMBENCH_INSTALL_TARGET_CMDS
|
|
$(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/usr -C $(@D)/src install
|
|
endef
|
|
|
|
$(eval $(generic-package))
|