From bafacacaf7659a4933604662daba26a480b29a8d Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Thu, 23 Apr 2015 20:46:59 +0200 Subject: Allow disabling symbol versioning at configure time Due to missing symbol versioning support in uClibc calls to versioned functions that internally call different version of themselves results in infinite recursion. Introduce macro SYMBOL_VERSIONING and use it instead of plain SHARED to decide whether symbol versioning is needed. Control this macro definition with new configure option --disable-symbol-versioning. Signed-off-by: Max Filippov Signed-off-by: Mark Wielaard --- lib/eu-config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/eu-config.h') diff --git a/lib/eu-config.h b/lib/eu-config.h index 3afff26a..5bb21c14 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -163,7 +163,7 @@ asm (".section predict_data, \"aw\"; .previous\n" #define ELFUTILS_HEADER(name) -#ifdef SHARED +#ifdef SYMBOL_VERSIONING # define OLD_VERSION(name, version) \ asm (".globl _compat." #version "." #name "\n" \ "_compat." #version "." #name " = " #name "\n" \ @@ -181,8 +181,8 @@ asm (".section predict_data, \"aw\"; .previous\n" # define OLD_VERSION(name, version) /* Nothing for static linking. */ # define NEW_VERSION(name, version) /* Nothing for static linking. */ # define COMPAT_VERSION_NEWPROTO(name, version, prefix) \ - error "should use #ifdef SHARED" -# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SHARED" + error "should use #ifdef SYMBOL_VERSIONING" +# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING" #endif -- cgit v1.2.3 From 170f1bb0a8f49cd6c5e7b34aaa505928764866bb Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 31 May 2015 22:37:19 +0200 Subject: Fix sanitize-undefined config check. Don't ALLOW_UNALIGNED when checking. The -fsanitize=undefined check need to use AC_LINK_IFELSE to make sure libubsan is installed. When doing undefined checking we should disable ALLOW_UNALIGNED memory accesses to catch issues where we do unaligned accesses by accident. Signed-off-by: Mark Wielaard --- lib/eu-config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/eu-config.h') diff --git a/lib/eu-config.h b/lib/eu-config.h index 5bb21c14..400cdc6e 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -73,7 +73,8 @@ /* Define ALLOW_UNALIGNED if the architecture allows operations on unaligned memory locations. */ -#if defined __i386__ || defined __x86_64__ +#define SANITIZE_UNDEFINED 1 +#if (defined __i386__ || defined __x86_64__) && ! CHECK_UNDEFINED # define ALLOW_UNALIGNED 1 #else # define ALLOW_UNALIGNED 0 -- cgit v1.2.3