mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
bug 834: libusb: build fix: set big/little endian
The following patch fixes a compilation error in libusb (cannot detectect endian while cross compiling)
This commit is contained in:
@@ -11,6 +11,12 @@ LIBUSB_CAT:=zcat
|
|||||||
LIBUSB_BINARY:=libusb.la
|
LIBUSB_BINARY:=libusb.la
|
||||||
LIBUSB_TARGET_BINARY:=usr/lib/libusb.so
|
LIBUSB_TARGET_BINARY:=usr/lib/libusb.so
|
||||||
|
|
||||||
|
ifeq ($(BR2_ENDIAN),"BIG")
|
||||||
|
LIBUSB_BE:=yes
|
||||||
|
else
|
||||||
|
LIBUSB_BE:=no
|
||||||
|
endif
|
||||||
|
|
||||||
$(DL_DIR)/$(LIBUSB_SOURCE):
|
$(DL_DIR)/$(LIBUSB_SOURCE):
|
||||||
$(WGET) -P $(DL_DIR) $(LIBUSB_SITE)/$(LIBUSB_SOURCE)
|
$(WGET) -P $(DL_DIR) $(LIBUSB_SITE)/$(LIBUSB_SOURCE)
|
||||||
|
|
||||||
@@ -24,6 +30,7 @@ $(LIBUSB_DIR)/.configured: $(LIBUSB_DIR)/.unpacked
|
|||||||
$(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
|
$(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
ac_cv_header_regex_h=no \
|
ac_cv_header_regex_h=no \
|
||||||
|
ac_cv_c_bigendian=$(LIBUSB_BE) \
|
||||||
./configure \
|
./configure \
|
||||||
--target=$(GNU_TARGET_NAME) \
|
--target=$(GNU_TARGET_NAME) \
|
||||||
--host=$(GNU_TARGET_NAME) \
|
--host=$(GNU_TARGET_NAME) \
|
||||||
|
|||||||
Reference in New Issue
Block a user