mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-12 23:03:29 +08:00
busybox: fix cflags
Pass CFLAGS as env rather than opt to allow the build system to tweak them. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
e23ca1da6d
commit
d8a41bb536
@ -12,8 +12,9 @@ BUSYBOX_VERSION = $(call qstrip,$(BR2_BUSYBOX_VERSION))
|
||||
BUSYBOX_SITE = http://www.busybox.net/downloads
|
||||
endif
|
||||
BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
|
||||
BUSYBOX_CFLAGS = "$(TARGET_CFLAGS) -I$(LINUX_HEADERS_DIR)/include"
|
||||
BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config
|
||||
# Allows the build system to tweak CFLAGS
|
||||
BUSYBOX_MAKE_ENV = $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_HEADERS_DIR)/include"
|
||||
|
||||
ifndef BUSYBOX_CONFIG_FILE
|
||||
BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
|
||||
@ -120,18 +121,17 @@ define BUSYBOX_CONFIGURE_CMDS
|
||||
endef
|
||||
|
||||
define BUSYBOX_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
PREFIX="$(TARGET_DIR)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CFLAGS=$(BUSYBOX_CFLAGS) \
|
||||
-C $(@D)
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_FULLINSTALL),y)
|
||||
define BUSYBOX_INSTALL_BINARY
|
||||
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
PREFIX="$(TARGET_DIR)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CFLAGS=$(BUSYBOX_CFLAGS) \
|
||||
CONFIG_PREFIX="$(TARGET_DIR)" -C $(@D) install
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CONFIG_PREFIX="$(TARGET_DIR)" \
|
||||
-C $(@D) install
|
||||
endef
|
||||
else
|
||||
define BUSYBOX_INSTALL_BINARY
|
||||
@ -145,23 +145,23 @@ define BUSYBOX_INSTALL_TARGET_CMDS
|
||||
endef
|
||||
|
||||
define BUSYBOX_UNINSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
PREFIX="$(TARGET_DIR)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CFLAGS=$(BUSYBOX_CFLAGS) \
|
||||
CONFIG_PREFIX="$(TARGET_DIR)" -C $(@D) uninstall
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CONFIG_PREFIX="$(TARGET_DIR)" \
|
||||
-C $(@D) uninstall
|
||||
endef
|
||||
|
||||
define BUSYBOX_CLEAN_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ARCH=$(KERNEL_ARCH) \
|
||||
PREFIX="$(TARGET_DIR)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CFLAGS=$(BUSYBOX_CFLAGS) \
|
||||
CONFIG_PREFIX="$(TARGET_DIR)" -C $(@D) clean
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" CONFIG_PREFIX="$(TARGET_DIR)" \
|
||||
-C $(@D) clean
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,package,busybox))
|
||||
|
||||
busybox-menuconfig: $(BUSYBOX_DIR)/.stamp_extracted
|
||||
$(TARGET_MAKE_ENV) $(MAKE) ARCH=$(KERNEL_ARCH) \
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) ARCH=$(KERNEL_ARCH) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" -C $(BUSYBOX_DIR) menuconfig
|
||||
rm -f $(BUSYBOX_DIR)/.stamp_built
|
||||
rm -f $(BUSYBOX_DIR)/.stamp_target_installed
|
||||
|
Loading…
Reference in New Issue
Block a user