diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2014-08-12 14:26:13 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-08-13 23:28:05 +0200 |
| commit | c0ce7599526c4dce6d889fc4a5aa007f445e6d76 (patch) | |
| tree | 6dd1e4b095cf937f2a50466daf4a2a1a6796fb9a | |
| parent | efea141c6e6e44ca48f3837e5c3383ccfe9ba247 (diff) | |
| download | meta-openembedded-c0ce7599526c4dce6d889fc4a5aa007f445e6d76.tar.gz | |
syslog-ng: fix do_compi1e of qemuarm while DEBUG_BUILD
The thread local storage caused arm-gcc broken while compiling
syslog-ng with option '-g -O'.
...
dnscache.s: Assembler messages:
dnscache.s:100: Error: invalid operands (.text and *UND* sections) for `-'
...
Add option --enable-thread-tls in configure to explicitly disable
thread local storage for arm while DEBUG_BUILD enabled.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch | 50 | ||||
| -rw-r--r-- | meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 5 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch b/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch new file mode 100644 index 0000000000..cc8d11044a --- /dev/null +++ b/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | configure.ac: add option --enable-thread-tls to manage thread ssl support | ||
| 2 | |||
| 3 | Add option --enable-thread-tls to manage the including of thread | ||
| 4 | local storage, so we could explicitly disable it. | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 9 | --- | ||
| 10 | configure.ac | 17 +++++++++++------ | ||
| 11 | 1 file changed, 11 insertions(+), 6 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/configure.ac b/configure.ac | ||
| 14 | index 474e094..cedca54 100644 | ||
| 15 | --- a/configure.ac | ||
| 16 | +++ b/configure.ac | ||
| 17 | @@ -120,6 +120,9 @@ AC_ARG_ENABLE(memtrace, | ||
| 18 | AC_ARG_ENABLE(ssl, | ||
| 19 | [ --enable-ssl Enable SSL support.],,enable_ssl="auto") | ||
| 20 | |||
| 21 | +AC_ARG_ENABLE(thread-tls, | ||
| 22 | + [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") | ||
| 23 | + | ||
| 24 | AC_ARG_ENABLE(dynamic-linking, | ||
| 25 | [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") | ||
| 26 | |||
| 27 | @@ -381,12 +384,14 @@ dnl *************************************************************************** | ||
| 28 | dnl Is the __thread keyword available? | ||
| 29 | dnl *************************************************************************** | ||
| 30 | |||
| 31 | -AC_LINK_IFELSE([AC_LANG_PROGRAM( | ||
| 32 | -[[#include <pthread.h> | ||
| 33 | -__thread int a; | ||
| 34 | -]], | ||
| 35 | -[a=0;])], | ||
| 36 | -[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) | ||
| 37 | +if test "x$enable_thread_tls" != "xno"; then | ||
| 38 | + AC_LINK_IFELSE([AC_LANG_PROGRAM( | ||
| 39 | + [[#include <pthread.h> | ||
| 40 | + __thread int a; | ||
| 41 | + ]], | ||
| 42 | + [a=0;])], | ||
| 43 | + [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) | ||
| 44 | +fi | ||
| 45 | |||
| 46 | dnl *************************************************************************** | ||
| 47 | dnl How to do static linking? | ||
| 48 | -- | ||
| 49 | 1.9.1 | ||
| 50 | |||
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc index 57976b3a2a..22767778f6 100644 --- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc +++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc | |||
| @@ -18,6 +18,7 @@ SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source | |||
| 18 | file://syslog-ng.conf \ | 18 | file://syslog-ng.conf \ |
| 19 | file://initscript \ | 19 | file://initscript \ |
| 20 | file://volatiles.03_syslog-ng \ | 20 | file://volatiles.03_syslog-ng \ |
| 21 | file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \ | ||
| 21 | " | 22 | " |
| 22 | 23 | ||
| 23 | inherit autotools systemd pkgconfig update-rc.d update-alternatives | 24 | inherit autotools systemd pkgconfig update-rc.d update-alternatives |
| @@ -32,8 +33,12 @@ EXTRA_OECONF = " \ | |||
| 32 | --with-sysroot=${STAGING_DIR_HOST} \ | 33 | --with-sysroot=${STAGING_DIR_HOST} \ |
| 33 | --with-libmongo-client=no --disable-mongodb \ | 34 | --with-libmongo-client=no --disable-mongodb \ |
| 34 | --with-librabbitmq-client=no \ | 35 | --with-librabbitmq-client=no \ |
| 36 | ${CONFIG_TLS} \ | ||
| 35 | " | 37 | " |
| 36 | 38 | ||
| 39 | CONFIG_TLS = "--enable-thread-tls" | ||
| 40 | CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}" | ||
| 41 | |||
| 37 | PACKAGECONFIG ??= "openssl \ | 42 | PACKAGECONFIG ??= "openssl \ |
| 38 | ${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ | 43 | ${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ |
| 39 | ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | 44 | ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ |
