diff options
author | MyoungJune Park <mj2004.park@samsung.com> | 2016-07-20 09:58:26 +0900 |
---|---|---|
committer | MyoungJune Park <mj2004.park@samsung.com> | 2016-07-20 09:59:06 +0900 |
commit | 4f660d0fcd9c31f0588ff39869efe7b8f7d27c82 (patch) | |
tree | b4f0ecfea307f42d06ff903427a8dc62d58c6ae1 | |
parent | 11811ff14a253b6f4846d7ed13fa0abfc86453c6 (diff) | |
download | pcre-4f660d0fcd9c31f0588ff39869efe7b8f7d27c82.tar.gz pcre-4f660d0fcd9c31f0588ff39869efe7b8f7d27c82.tar.bz2 pcre-4f660d0fcd9c31f0588ff39869efe7b8f7d27c82.zip |
Revert "Bump to pcre 8.39"
This reverts commit 11811ff14a253b6f4846d7ed13fa0abfc86453c6.
Change-Id: Icef14acea2455a72a49735732c08355b4e644211
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
-rw-r--r-- | Makefile.am | 16 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | m4/visibility.m4 | 89 | ||||
-rw-r--r-- | packaging/pcre.spec | 17 |
4 files changed, 112 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am index c6e1a1d..9b7b0e6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -180,6 +180,8 @@ BUILT_SOURCES = pcre_chartables.c if WITH_PCRE8 lib_LTLIBRARIES += libpcre.la +libpcre_la_CFLAGS = $(CFLAG_VISIBILITY) + libpcre_la_SOURCES = \ pcre_byte_order.c \ pcre_compile.c \ @@ -213,6 +215,7 @@ endif # WITH_PCRE8 # Build the 16 bit library if it is enabled. if WITH_PCRE16 lib_LTLIBRARIES += libpcre16.la +libpcre16_la_CFLAGS = $(CFLAG_VISIBILITY) libpcre16_la_SOURCES = \ pcre16_byte_order.c \ pcre16_chartables.c \ @@ -268,10 +271,10 @@ EXTRA_DIST += \ sljit/sljitUtils.c if WITH_PCRE8 -libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS) +libpcre_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCRE_LDFLAGS) endif # WITH_PCRE8 if WITH_PCRE16 -libpcre16_la_LDFLAGS = $(EXTRA_LIBPCRE16_LDFLAGS) +libpcre16_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCRE16_LDFLAGS) endif # WITH_PCRE16 CLEANFILES += pcre_chartables.c @@ -293,10 +296,10 @@ endif # WITH_JIT ## A version of the main pcre library that has a posix re API. if WITH_PCRE8 lib_LTLIBRARIES += libpcreposix.la +libpcreposix_la_CFLAGS = $(CFLAG_VISIBILITY) libpcreposix_la_SOURCES = \ pcreposix.c -libpcreposix_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS) -libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS) +libpcreposix_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCREPOSIX_LDFLAGS) libpcreposix_la_LIBADD = libpcre.la endif # WITH_PCRE8 @@ -304,13 +307,13 @@ endif # WITH_PCRE8 if WITH_PCRE_CPP lib_LTLIBRARIES += libpcrecpp.la +libpcrecpp_la_CXXFLAGS = $(CFLAG_VISIBILITY) libpcrecpp_la_SOURCES = \ pcrecpp_internal.h \ pcrecpp.cc \ pcre_scanner.cc \ pcre_stringpiece.cc -libpcrecpp_la_CXXFLAGS = $(VISIBILITY_CXXFLAGS) $(AM_CXXFLAGS) -libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS) +libpcrecpp_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCRECPP_LDFLAGS) libpcrecpp_la_LIBADD = libpcre.la TESTS += pcrecpp_unittest @@ -354,6 +357,7 @@ if WITH_PCRE8 TESTS += RunGrepTest dist_noinst_SCRIPTS += RunGrepTest bin_PROGRAMS += pcregrep +pcregrep_CFLAGS = -fwhole-program pcregrep_SOURCES = pcregrep.c pcregrep_LDADD = $(LIBZ) $(LIBBZ2) pcregrep_LDADD += libpcre.la libpcreposix.la diff --git a/configure.ac b/configure.ac index 3ec52ef..9f38b43 100644 --- a/configure.ac +++ b/configure.ac @@ -45,9 +45,12 @@ AC_CONFIG_MACRO_DIR([m4]) remember_set_CFLAGS="$CFLAGS" remember_set_CXXFLAGS="$CXXFLAGS" -AC_PROG_CC -AC_PROG_CXX +AC_PROG_CC_STDC +AC_USE_SYSTEM_EXTENSIONS +AC_SYS_LARGEFILE AM_PROG_CC_C_O +AC_PROG_CXX +PCRE_VISIBILITY if test "x$remember_set_CFLAGS" = "x" then @@ -81,8 +84,7 @@ AC_LANG_POP AC_TYPE_INT64_T AC_PROG_INSTALL -AC_LIBTOOL_WIN32_DLL -LT_INIT +LT_INIT([win32-dll pic-only disable-static]) AC_PROG_LN_S PCRE_MAJOR="pcre_major" diff --git a/m4/visibility.m4 b/m4/visibility.m4 new file mode 100644 index 0000000..e2012c9 --- /dev/null +++ b/m4/visibility.m4 @@ -0,0 +1,89 @@ +# visibility.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl MacOS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +dnl Modified to fit with PCRE build environment by Cristian RodrÃguez. + +AC_DEFUN([PCRE_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + CXXFLAG_INLINES_HIDDEN= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_MSG_CHECKING([whether the -Werror option is usable]) + AC_CACHE_VAL([gl_cv_cc_vis_werror], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_vis_werror]) + dnl Now check whether visibility declarations are supported. + AC_MSG_CHECKING([for simple visibility declarations]) + AC_CACHE_VAL([gl_cv_cc_visibility], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_visibility]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + CXXFLAG_INLINES_HIDDEN="-fvisibility-inlines-hidden" + HAVE_VISIBILITY=1 + AC_DEFINE(PCRE_EXP_DECL, [extern __attribute__ ((visibility ("default")))], [to make a symbol visible]) + AC_DEFINE(PCRE_EXP_DEFN, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) + AC_DEFINE(PCRE_EXP_DATA_DEFN, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) + AC_DEFINE(PCREPOSIX_EXP_DECL, [extern __attribute__ ((visibility ("default")))], [to make a symbol visible]) + AC_DEFINE(PCREPOSIX_EXP_DEFN, [extern __attribute__ ((visibility ("default")))], [to make a symbol visible]) + AC_DEFINE(PCRECPP_EXP_DECL, [extern __attribute__ ((visibility ("default")))], [to make a symbol visible]) + AC_DEFINE(PCRECPP_EXP_DEFN, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([CXXFLAG_INLINES_HIDDEN]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) diff --git a/packaging/pcre.spec b/packaging/pcre.spec index 72e77ab..b522126 100644 --- a/packaging/pcre.spec +++ b/packaging/pcre.spec @@ -1,12 +1,6 @@ -%define run_tests 0 -%if %{run_tests} - # check is defined off at .rpmmacros file. - %define check %%check -%endif - %define keepstatic 1 Name: pcre -Version: 8.39 +Version: 8.31 Release: 0 License: BSD-3-Clause Summary: A library for Perl-compatible regular expressions @@ -115,12 +109,15 @@ autoreconf -fiv --enable-unicode-properties make %{?_smp_mflags} + %check -%if %{run_tests} - %__make check || exit 0 +export LANG=POSIX +%ifarch %arm +make test || echo make test failed +%else +make test %endif - %install %make_install mkdir -p %{buildroot}/%{_defaultdocdir} |