mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
58
package/apr/0001-cross-compile.patch
Normal file
58
package/apr/0001-cross-compile.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
Fix cross-compilation
|
||||
|
||||
Patch was backported from Apache httpd:
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1327907
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1328390
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1328714
|
||||
|
||||
Patch submitted upstream:
|
||||
https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in
|
||||
--- apr-1.5.1.org/configure.in 2014-01-25 16:17:29.000000000 +0100
|
||||
+++ apr-1.5.1/configure.in 2014-10-05 11:20:40.080746760 +0200
|
||||
@@ -118,6 +118,16 @@
|
||||
echo "Configuring APR library"
|
||||
echo "Platform: $host"
|
||||
|
||||
+dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
|
||||
+dnl we got already CC_FOR_BUILD from environment.
|
||||
+if test "x${build_alias}" != "x${host_alias}"; then
|
||||
+ if test "x${CC_FOR_BUILD}" = "x"; then
|
||||
+ CC_FOR_BUILD=cc
|
||||
+ fi
|
||||
+fi
|
||||
+AC_SUBST(CC_FOR_BUILD)
|
||||
+AC_SUBST(CFLAGS_FOR_BUILD)
|
||||
+
|
||||
dnl Some initial steps for configuration. We setup the default directory
|
||||
dnl and which files are to be configured.
|
||||
|
||||
diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in
|
||||
--- apr-1.5.1.org/Makefile.in 2014-03-17 16:10:26.000000000 +0100
|
||||
+++ apr-1.5.1/Makefile.in 2014-10-05 11:22:53.031070519 +0200
|
||||
@@ -8,6 +8,8 @@
|
||||
# APR (Apache Portable Runtime) library Makefile.
|
||||
#
|
||||
CPP = @CPP@
|
||||
+CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
||||
|
||||
# get substituted into some targets
|
||||
APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
|
||||
@@ -134,8 +134,13 @@
|
||||
$(APR_MKDIR) tools
|
||||
$(LT_COMPILE)
|
||||
|
||||
+ifdef CC_FOR_BUILD
|
||||
+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS)
|
||||
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
|
||||
+else
|
||||
tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
|
||||
$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
|
||||
+endif
|
||||
|
||||
include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
|
||||
$(APR_MKDIR) include/private
|
||||
16
package/apr/Config.in
Normal file
16
package/apr/Config.in
Normal file
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_APR
|
||||
bool "apr"
|
||||
# apr really needs shared library support
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU # fork() in apr_proc_fork()
|
||||
help
|
||||
The mission of the Apache Portable Runtime (APR) project is to
|
||||
create and maintain software libraries that provide a
|
||||
predictable and consistent interface to underlying
|
||||
platform-specific implementations
|
||||
|
||||
http://apr.apache.org/
|
||||
|
||||
comment "apr needs a toolchain w/ dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS
|
||||
4
package/apr/apr.hash
Normal file
4
package/apr/apr.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From http://www.apache.org/dist/apr/apr-1.6.3.tar.bz2.sha256
|
||||
sha256 131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172 apr-1.6.3.tar.bz2
|
||||
# Locally calculated
|
||||
sha256 f854aeef66ecd55a126226e82b3f26793fc3b1c584647f6a0edc5639974c38ad LICENSE
|
||||
81
package/apr/apr.mk
Normal file
81
package/apr/apr.mk
Normal file
@@ -0,0 +1,81 @@
|
||||
################################################################################
|
||||
#
|
||||
# apr
|
||||
#
|
||||
################################################################################
|
||||
|
||||
APR_VERSION = 1.6.3
|
||||
APR_SOURCE = apr-$(APR_VERSION).tar.bz2
|
||||
APR_SITE = http://archive.apache.org/dist/apr
|
||||
APR_LICENSE = Apache-2.0
|
||||
APR_LICENSE_FILES = LICENSE
|
||||
APR_INSTALL_STAGING = YES
|
||||
# We have a patch touching configure.in and Makefile.in,
|
||||
# so we need to autoreconf:
|
||||
APR_AUTORECONF = YES
|
||||
|
||||
APR_CONF_ENV = \
|
||||
CC_FOR_BUILD="$(HOSTCC)" \
|
||||
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
||||
ac_cv_file__dev_zero=yes \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
apr_cv_process_shared_works=yes \
|
||||
apr_cv_mutex_robust_shared=no \
|
||||
apr_cv_tcp_nodelay_with_cork=yes \
|
||||
ac_cv_sizeof_struct_iovec=8 \
|
||||
ac_cv_sizeof_pid_t=4 \
|
||||
ac_cv_struct_rlimit=yes \
|
||||
ac_cv_o_nonblock_inherited=no \
|
||||
apr_cv_mutex_recursive=yes \
|
||||
apr_cv_epoll=yes \
|
||||
apr_cv_epoll_create1=yes \
|
||||
apr_cv_dup3=yes \
|
||||
apr_cv_sock_cloexec=yes \
|
||||
apr_cv_accept4=yes
|
||||
APR_CONFIG_SCRIPTS = apr-1-config
|
||||
|
||||
# Doesn't even try to guess when cross compiling
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
|
||||
endif
|
||||
|
||||
# Fix lfs detection when cross compiling
|
||||
APR_CONF_ENV += apr_cv_use_lfs64=yes
|
||||
|
||||
# Use non-portable atomics when available: 8 bytes atomics are used on
|
||||
# 64-bits architectures, 4 bytes atomics on 32-bits architectures. We
|
||||
# have to override ap_cv_atomic_builtins because the test used to
|
||||
# check for atomic builtins uses AC_TRY_RUN, which doesn't work when
|
||||
# cross-compiling.
|
||||
ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_8),y:y)
|
||||
APR_CONF_OPTS += --enable-nonportable-atomics
|
||||
APR_CONF_ENV += ap_cv_atomic_builtins=yes
|
||||
else ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_4),:y)
|
||||
APR_CONF_OPTS += --enable-nonportable-atomics
|
||||
APR_CONF_ENV += ap_cv_atomic_builtins=yes
|
||||
else
|
||||
APR_CONF_OPTS += --disable-nonportable-atomics
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
|
||||
APR_DEPENDENCIES += util-linux
|
||||
endif
|
||||
|
||||
define APR_CLEANUP_UNNEEDED_FILES
|
||||
$(RM) -rf $(TARGET_DIR)/usr/build-1/
|
||||
endef
|
||||
|
||||
APR_POST_INSTALL_TARGET_HOOKS += APR_CLEANUP_UNNEEDED_FILES
|
||||
|
||||
define APR_FIXUP_RULES_MK
|
||||
$(SED) 's%apr_builddir=%apr_builddir=$(STAGING_DIR)%' \
|
||||
$(STAGING_DIR)/usr/build-1/apr_rules.mk
|
||||
$(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
|
||||
$(STAGING_DIR)/usr/build-1/apr_rules.mk
|
||||
$(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
|
||||
$(STAGING_DIR)/usr/build-1/apr_rules.mk
|
||||
endef
|
||||
|
||||
APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user