patches/mingw-libgnurx/2.5.1/build-static-library.patch
author Michael Hope <michael.hope@linaro.org>
Wed Oct 19 15:27:32 2011 +1300 (2011-10-19)
changeset 2739 f320e22f2cba
permissions -rw-r--r--
arch: add softfp support

Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 --- mingw-libgnurx-2.5.1.orig/configure	2009-11-03 08:19:15.000000000 +0100
     2 +++ mingw-libgnurx-2.5.1/configure	2009-11-03 08:31:37.000000000 +0100
     3 @@ -273,7 +273,7 @@
     4  PACKAGE_STRING='MinGW libgnurx 2.5.1'
     5  PACKAGE_BUGREPORT='https://sourceforge.net/tracker/?group_id=2435&atid=102435'
     6 
     7 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CC_QUALIFIED DLLVERSION ZIPCMD ZIPEXT MSVCLIB ac_ct_MSVCLIB GNURX_LIB install_dev LIBOBJS LTLIBOBJS'
     8 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CC_QUALIFIED AR DLLVERSION ZIPCMD ZIPEXT MSVCLIB ac_ct_MSVCLIB GNURX_LIB install_dev LIBOBJS LTLIBOBJS'
     9  ac_subst_files=''
    10 
    11  # Initialize some variables set by options.
    12 @@ -2190,21 +2190,54 @@
    13 
    14  fi
    15  rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    16 -ac_ext=c
    17 -ac_cpp='$CPP $CPPFLAGS'
    18 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    19 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    20 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
    21 
    22 -  ac_ext=c
    23 +
    24 +for ac_prog in ar; do
    25 +set dummy ${ac_tool_prefix}$ac_prog; ac_word=$2
    26 +echo "$as_me:$LINENO: checking for $ac_word" >&5
    27 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    28 +if test "${ac_cv_prog_AR+set}" = set; then
    29 +  echo $ECHO_N "(cached) $ECHO_C" >&6
    30 +else
    31 +  if test -n "$AR"; then
    32 +  ac_cv_prog_AR="$AR" # Let the user override the test.
    33 +else
    34 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    35 +for as_dir in $PATH
    36 +do
    37 +  IFS=$as_save_IFS
    38 +  test -z "$as_dir" && as_dir=.
    39 +  for ac_exec_ext in '' $ac_executable_extensions; do
    40 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    41 +    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
    42 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    43 +    break 2
    44 +  fi
    45 +done
    46 +done
    47 +
    48 +  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
    49 +fi
    50 +fi
    51 +AR=$ac_cv_prog_AR
    52 +if test -n "$AR"; then
    53 +  echo "$as_me:$LINENO: result: $AR" >&5
    54 +echo "${ECHO_T}$AR" >&6
    55 +else
    56 +  echo "$as_me:$LINENO: result: no" >&5
    57 +echo "${ECHO_T}no" >&6
    58 +fi
    59 +done
    60 +
    61 +ac_ext=c
    62  ac_cpp='$CPP $CPPFLAGS'
    63  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    64  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    65  ac_compiler_gnu=$ac_cv_c_compiler_gnu
    66 
    67 - popCFLAGS=$CFLAGS
    68 - echo 'int main(void){return 0;}' > conftest.$ac_ext
    69 - echo "$as_me:$LINENO: checking whether $CC accepts the -mthreads option" >&5
    70 +popCFLAGS=$CFLAGS
    71 +echo 'int main(void){return 0;}' > conftest.$ac_ext
    72 +echo "$as_me:$LINENO: checking whether $CC accepts the -mthreads option" >&5
    73  echo $ECHO_N "checking whether $CC accepts the -mthreads option... $ECHO_C" >&6
    74     CFLAGS="$popCFLAGS $CC_QUALIFIED -mthreads"
    75     if (eval $ac_compile) 2>&5; then
    76 @@ -3038,6 +3069,7 @@
    77  s,@EXEEXT@,$EXEEXT,;t t
    78  s,@OBJEXT@,$OBJEXT,;t t
    79  s,@CC_QUALIFIED@,$CC_QUALIFIED,;t t
    80 +s,@AR@,$AR,;t t
    81  s,@DLLVERSION@,$DLLVERSION,;t t
    82  s,@ZIPCMD@,$ZIPCMD,;t t
    83  s,@ZIPEXT@,$ZIPEXT,;t t
    84 --- mingw-libgnurx-2.5.1.orig/Makefile.in	2009-11-03 08:17:49.000000000 +0100
    85 +++ mingw-libgnurx-2.5.1/Makefile.in	2009-11-03 08:57:37.000000000 +0100
    86 @@ -39,6 +39,7 @@
    87  mandir = @mandir@
    88 
    89  CC = @CC_QUALIFIED@
    90 +AR = @AR@
    91  CFLAGS = @CFLAGS@ -I ${srcdir}
    92  LDFLAGS = @LDFLAGS@
    93 
    94 @@ -67,8 +68,8 @@
    95  libgnurx-$(DLLVERSION).dll libgnurx.dll.a: $(OBJECTS)
    96  	$(CC) $(CFLAGS) -shared -o libgnurx-$(DLLVERSION).dll $(LDFLAGS) $(OBJECTS)
    97 
    98 -libregex.a: libgnurx.dll.a
    99 -	cp -p libgnurx.dll.a $@
   100 +libregex.a: $(OBJECTS)
   101 +	$(AR) cru $@ $(OBJECTS)
   102 
   103  gnurx.lib: libgnurx-$(DLLVERSION).dll