glib2/glib2.patch

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

     1 Index: configure
     2 --- configure.orig	2010-03-16 03:52:21.000000000 +0100
     3 +++ configure	2010-03-17 20:07:17.000000000 +0100
     4 @@ -25810,7 +25810,7 @@
     5  	      add_thread_lib="-l$thread_lib"
     6  	      IN=" in -l$thread_lib"
     7  	    fi
     8 -	    LIBS="$add_thread_lib $glib_save_LIBS"
     9 +	    LIBS="$add_thread_lib `echo x$glib_save_LIBS | sed -e 's;^x;;' -e 's;-lrt;;'`"
    11              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_get_priority_min$IN" >&5
    12  $as_echo_n "checking for sched_get_priority_min$IN... " >&6; }
    13 Index: glib-2.0.pc.in
    14 --- glib-2.0.pc.in.orig	2009-04-01 01:04:20.000000000 +0200
    15 +++ glib-2.0.pc.in	2010-03-17 20:07:17.000000000 +0100
    16 @@ -9,6 +9,7 @@
    18  Name: GLib
    19  Description: C Utility Library
    20 +Requires: libpcre
    21  Version: @VERSION@
    22  Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
    23  Libs.private: @ICONV_LIBS@
    24 Index: gmodule/gmodule-dl.c
    25 --- gmodule/gmodule-dl.c.orig	2009-04-01 01:04:20.000000000 +0200
    26 +++ gmodule/gmodule-dl.c	2010-03-17 20:07:17.000000000 +0100
    27 @@ -107,6 +107,7 @@
    28  static gpointer
    29  _g_module_self (void)
    30  {
    31 +#ifndef __FreeBSD__
    32    gpointer handle;
    34    /* to query symbols from the program itself, special link options
    35 @@ -118,6 +119,9 @@
    36      g_module_set_error (fetch_dlerror (TRUE));
    38    return handle;
    39 +#else
    40 +  return RTLD_DEFAULT;
    41 +#endif
    42  }
    44  static void
    45 Index: tests/errorcheck-mutex-test.c
    46 --- tests/errorcheck-mutex-test.c.orig	2009-04-01 01:04:20.000000000 +0200
    47 +++ tests/errorcheck-mutex-test.c	2010-03-17 20:07:17.000000000 +0100
    48 @@ -1,3 +1,5 @@
    49 +#ifdef G_THREADS_ENABLED
    50 +
    51  #undef G_DISABLE_ASSERT
    52  #undef G_LOG_DOMAIN
    53  #define G_ERRORCHECK_MUTEXES
    54 @@ -102,9 +104,12 @@
    55     timed_wait_on_otherwise_locked_mutex}
    56  };
    58 +#endif
    59 +
    60  int
    61  main (int argc, char* argv[])
    62  {
    63 +#ifdef G_THREADS_ENABLED
    64    int i;
    66    if (argc == 2)
    67 @@ -126,6 +131,7 @@
    68      {
    69        fprintf (stderr, "      %s\n", func_table[i].name);
    70      }
    71 +#endif
    73    return 0;
    74  }

mercurial