86e9785572
libnspr currently passes --enable-thumb2 if the CPU has thumb instructions. This option will pass -mthumb to the compiler. However, if an external multilib toolchain is used that has a thumb-specific variant (e.g. Sourcery), it will try to use that one. But we only copy a single variant to the sysroot, so the build will fail with: .../arm-none-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory ... collect2: error: ld returned 1 exit status ../../config/rules.mk:303: recipe for target 'libnspr4.so' failed We can in fact just remove the thumb2 handling. With current libnspr, the thumb and thumb2 options just add -marm and -mthumb. But we already pass that in our toolchain wrapper so it's completely redundant. Note that when nothing is passed, the configure script still tries to autodetect whether thumb2 is available (but doesn't do it correctly, see the error above), but in the end it doesn't use the result for anything. In other words, even if it detects that thumb2 is available, it will _not_ pass -mthumb to the compiler. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
53 lines
1.6 KiB
Makefile
53 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# libnspr
|
|
#
|
|
################################################################################
|
|
|
|
LIBNSPR_VERSION = 4.11
|
|
LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz
|
|
LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src
|
|
LIBNSPR_SUBDIR = nspr
|
|
LIBNSPR_INSTALL_STAGING = YES
|
|
LIBNSPR_CONFIG_SCRIPTS = nspr-config
|
|
LIBNSPR_LICENSE = MPLv2.0
|
|
LIBNSPR_LICENSE_FILES = nspr/LICENSE
|
|
|
|
# Set the host CFLAGS and LDFLAGS so NSPR does not guess wrongly
|
|
LIBNSPR_CONF_ENV = \
|
|
HOST_CFLAGS="-g -O2" \
|
|
HOST_LDFLAGS="-lc"
|
|
# NSPR mixes up --build and --host
|
|
LIBNSPR_CONF_OPTS = --host=$(GNU_HOST_NAME)
|
|
LIBNSPR_CONF_OPTS += --$(if $(BR2_ARCH_IS_64),en,dis)able-64bit
|
|
|
|
# ./nspr/pr/include/md/_linux.h tests only __GLIBC__ version to detect
|
|
# c-library features, list musl features here for now (taken from
|
|
# Alpine Linux).
|
|
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
|
LIBNSPR_CFLAGS += \
|
|
-D_PR_POLL_AVAILABLE \
|
|
-D_PR_HAVE_OFF64_T \
|
|
-D_PR_INET6 \
|
|
-D_PR_HAVE_INET_NTOP \
|
|
-D_PR_HAVE_GETHOSTBYNAME2 \
|
|
-D_PR_HAVE_GETADDRINFO \
|
|
-D_PR_INET6_PROBE
|
|
endif
|
|
|
|
LIBNSPR_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) $(LIBNSPR_CFLAGS)"
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
LIBNSPR_MAKE_OPTS = SHARED_LIBRARY=
|
|
LIBNSPR_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) SHARED_LIBRARY= install
|
|
LIBNSPR_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) SHARED_LIBRARY= install
|
|
endif
|
|
|
|
ifeq ($(BR2_SHARED_LIBS),y)
|
|
LIBNSPR_MAKE_OPTS = LIBRARY=
|
|
LIBNSPR_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIBRARY= install
|
|
LIBNSPR_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIBRARY= install
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|