From patchwork Mon Oct 21 17:16:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Aaron" X-Patchwork-Id: 285143 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 750F12C009D for ; Mon, 21 Oct 2013 20:19:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CAE2F88F32; Mon, 21 Oct 2013 09:19:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5HbPp3DudEkm; Mon, 21 Oct 2013 09:19:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C890E89205; Mon, 21 Oct 2013 09:19:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B40D41BF9B9 for ; Mon, 21 Oct 2013 09:19:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B167C88B52 for ; Mon, 21 Oct 2013 09:19:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A7KKUPHaLUr4 for ; Mon, 21 Oct 2013 09:19:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe001.messaging.microsoft.com [216.32.180.184]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7C9B38AD93 for ; Mon, 21 Oct 2013 09:19:19 +0000 (UTC) Received: from mail119-co1-R.bigfish.com (10.243.78.254) by CO1EHSOBE015.bigfish.com (10.243.66.78) with Microsoft SMTP Server id 14.1.225.22; Mon, 21 Oct 2013 09:19:18 +0000 Received: from mail119-co1 (localhost [127.0.0.1]) by mail119-co1-R.bigfish.com (Postfix) with ESMTP id B2F09C00111 for ; Mon, 21 Oct 2013 09:19:18 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.57; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta2.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-SpamScore: -1 X-BigFish: VPS-1(zz936eIzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h1de097h8275bhz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1b0ah1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h1155h) Received: from mail119-co1 (localhost.localdomain [127.0.0.1]) by mail119-co1 (MessageSwitch) id 1382347156405412_12839; Mon, 21 Oct 2013 09:19:16 +0000 (UTC) Received: from CO1EHSMHS031.bigfish.com (unknown [10.243.78.242]) by mail119-co1.bigfish.com (Postfix) with ESMTP id 5F3B22C0040 for ; Mon, 21 Oct 2013 09:19:16 +0000 (UTC) Received: from nwd2mta2.analog.com (137.71.25.57) by CO1EHSMHS031.bigfish.com (10.243.66.41) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 21 Oct 2013 09:19:16 +0000 Received: from NWD2HUBCAS5.ad.analog.com (nwd2hubcas5.ad.analog.com [10.64.72.161]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id r9LBB8PR001373 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 21 Oct 2013 07:11:09 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS5.ad.analog.com (10.64.72.161) with Microsoft SMTP Server id 14.3.158.1; Mon, 21 Oct 2013 05:18:26 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id r9L9IQ8c007374; Mon, 21 Oct 2013 05:18:26 -0400 Received: from aaron-i7.analog.com (unknown [10.99.24.100]) by linux.site (Postfix) with ESMTP id 276463A32424; Sun, 20 Oct 2013 19:56:45 -0600 (MDT) From: Aaron Wu To: Date: Tue, 22 Oct 2013 01:16:03 +0800 Message-ID: <1382375763-4150-1-git-send-email-aaron.wu@analog.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: analog.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Subject: [Buildroot] [PATCH] add no-mmu support for libglib-2.36.3 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Aaron Wu add no-mmu support for libglib-2.36.3 --- package/libglib2/glib2.36.3_nommu.patch | 354 +++++++++++++++++++++++++++++++ 1 file changed, 354 insertions(+) create mode 100644 package/libglib2/glib2.36.3_nommu.patch diff --git a/package/libglib2/glib2.36.3_nommu.patch b/package/libglib2/glib2.36.3_nommu.patch new file mode 100644 index 0000000..192e8af --- /dev/null +++ b/package/libglib2/glib2.36.3_nommu.patch @@ -0,0 +1,354 @@ +diff -Nur glib-2.36.3/configure.ac glib-2.36.3_new/configure.ac +--- glib-2.36.3/configure.ac 2013-06-10 06:53:13.000000000 +0800 ++++ glib-2.36.3_new/configure.ac 2013-10-21 19:25:28.806513398 +0800 +@@ -580,7 +580,7 @@ + # Checks for library functions. + AC_FUNC_VPRINTF + AC_FUNC_ALLOCA +-AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2 issetugid) ++AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2 issetugid fork) + AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r) + + AC_CACHE_CHECK([for __libc_enable_secure], glib_cv_have_libc_enable_secure, +diff -Nur glib-2.36.3/gio/gtestdbus.c glib-2.36.3_new/gio/gtestdbus.c +--- glib-2.36.3/gio/gtestdbus.c 2013-06-03 07:20:49.000000000 +0800 ++++ glib-2.36.3_new/gio/gtestdbus.c 2013-10-21 21:23:04.350552212 +0800 +@@ -245,7 +245,11 @@ + g_assert_not_reached (); + } + ++#ifdef HAVE_FORK + switch (fork ()) ++#else ++ switch (vfork ()) ++#endif + { + case -1: + g_warning ("fork() failed: %m"); +diff -Nur glib-2.36.3/gio/tests/gdbus-non-socket.c glib-2.36.3_new/gio/tests/gdbus-non-socket.c +--- glib-2.36.3/gio/tests/gdbus-non-socket.c 2013-06-10 06:03:17.000000000 +0800 ++++ glib-2.36.3_new/gio/tests/gdbus-non-socket.c 2013-10-22 00:07:55.686606621 +0800 +@@ -151,7 +151,11 @@ + g_assert (G_IS_INPUT_STREAM (g_io_stream_get_input_stream (streams[1]))); + g_assert (G_IS_OUTPUT_STREAM (g_io_stream_get_output_stream (streams[1]))); + ++#ifdef HAVE_FORK + switch ((first_child = fork ())) ++#else ++ switch ((first_child = vfork ())) ++#endif + { + case -1: + g_assert_not_reached (); +@@ -271,7 +275,11 @@ + + g_object_unref (connection); + g_main_loop_unref (loop); ++#ifdef HAVE_FORK + exit (0); ++#else ++ _exit (0); ++#endif + } + + #else /* G_OS_UNIX */ +diff -Nur glib-2.36.3/gio/tests/socket.c glib-2.36.3_new/gio/tests/socket.c +--- glib-2.36.3/gio/tests/socket.c 2013-06-03 07:20:53.000000000 +0800 ++++ glib-2.36.3_new/gio/tests/socket.c 2013-10-21 23:54:59.222602354 +0800 +@@ -756,7 +756,11 @@ + status = socketpair (PF_UNIX, SOCK_STREAM, 0, sv); + g_assert_cmpint (status, ==, 0); + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + g_assert_cmpint (pid, >=, 0); + + /* Child: close its copy of the write end of the pipe, receive it +@@ -787,7 +791,11 @@ + len = write (fd, TEST_DATA, sizeof (TEST_DATA)); + while (len == -1 && errno == EINTR); + g_assert_cmpint (len, ==, sizeof (TEST_DATA)); ++#ifdef HAVE_FORK + exit (0); ++#else ++ _exit (0); ++#endif + } + else + { +diff -Nur glib-2.36.3/glib/gbacktrace.c glib-2.36.3_new/glib/gbacktrace.c +--- glib-2.36.3/glib/gbacktrace.c 2013-06-03 07:20:49.000000000 +0800 ++++ glib-2.36.3_new/glib/gbacktrace.c 2013-10-21 20:55:48.758543214 +0800 +@@ -242,7 +242,11 @@ + args[1] = (gchar*) prg_name; + args[2] = buf; + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + if (pid == 0) + { + stack_trace (args); +@@ -295,7 +299,11 @@ + _exit (0); + } + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + if (pid == 0) + { + close (0); dup (in_fd[0]); /* set the stdin to the in pipe */ +diff -Nur glib-2.36.3/glib/gspawn.c glib-2.36.3_new/glib/gspawn.c +--- glib-2.36.3/glib/gspawn.c 2013-06-10 06:03:18.000000000 +0800 ++++ glib-2.36.3_new/glib/gspawn.c 2013-10-21 19:39:13.410517935 +0800 +@@ -1332,7 +1332,11 @@ + if (standard_error && !make_pipe (stderr_pipe, error)) + goto cleanup_and_fail; + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + + if (pid < 0) + { +@@ -1382,7 +1386,11 @@ + */ + GPid grandchild_pid; + ++#ifdef HAVE_FORK + grandchild_pid = fork (); ++#else ++ grandchild_pid = vfork (); ++#endif + + if (grandchild_pid < 0) + { +diff -Nur glib-2.36.3/glib/gtestutils.c glib-2.36.3_new/glib/gtestutils.c +--- glib-2.36.3/glib/gtestutils.c 2013-06-10 06:03:18.000000000 +0800 ++++ glib-2.36.3_new/glib/gtestutils.c 2013-10-21 19:40:56.330518502 +0800 +@@ -2204,7 +2204,11 @@ + if (pipe (stdout_pipe) < 0 || pipe (stderr_pipe) < 0 || pipe (stdtst_pipe) < 0) + g_error ("failed to create pipes to fork test program: %s", g_strerror (errno)); + signal (SIGCHLD, SIG_DFL); ++#ifdef HAVE_FORK + test_trap_last_pid = fork (); ++#else ++ test_trap_last_pid = vfork (); ++#endif + if (test_trap_last_pid < 0) + g_error ("failed to fork test program: %s", g_strerror (errno)); + if (test_trap_last_pid == 0) /* child */ +diff -Nur glib-2.36.3/tests/child-test.c glib-2.36.3_new/tests/child-test.c +--- glib-2.36.3/tests/child-test.c 2013-06-10 06:03:18.000000000 +0800 ++++ glib-2.36.3_new/tests/child-test.c 2013-10-21 20:56:50.358543552 +0800 +@@ -77,7 +77,11 @@ + + return pid; + #else ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + if (pid < 0) + exit (1); + +diff -Nur glib-2.36.3/tests/timeloop-basic.c glib-2.36.3_new/tests/timeloop-basic.c +--- glib-2.36.3/tests/timeloop-basic.c 2013-06-03 07:20:49.000000000 +0800 ++++ glib-2.36.3_new/tests/timeloop-basic.c 2013-10-22 00:04:26.130605473 +0800 +@@ -26,7 +26,11 @@ + if (pipe(fds) < 0) + { + fprintf (stderr, "Cannot create pipe %s\n", strerror (errno)); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + } + +@@ -89,7 +93,11 @@ + val = 0; + write_all (out_fd, (char *)&val, sizeof (val)); + ++#ifdef HAVE_FORK + exit (0); ++#else ++ _exit (0); ++#endif + } + + int +@@ -100,7 +108,11 @@ + if (!read_all (source, (char *)&val, sizeof(val))) + { + fprintf (stderr,"Unexpected EOF\n"); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + + if (val) +@@ -128,7 +140,11 @@ + my_pipe (in_fds); + my_pipe (out_fds); + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + + if (pid > 0) /* Parent */ + { +@@ -151,7 +167,11 @@ + else /* Error */ + { + fprintf (stderr,"Cannot fork: %s\n", strerror (errno)); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + } + +diff -Nur glib-2.36.3/tests/timeloop.c glib-2.36.3_new/tests/timeloop.c +--- glib-2.36.3/tests/timeloop.c 2013-06-03 07:20:49.000000000 +0800 ++++ glib-2.36.3_new/tests/timeloop.c 2013-10-22 00:00:00.290604006 +0800 +@@ -23,7 +23,11 @@ + if (pipe(fds) < 0) + { + fprintf (stderr, "Cannot create pipe %s\n", g_strerror (errno)); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + + channels[0] = g_io_channel_unix_new (fds[0]); +@@ -94,7 +98,11 @@ + write_all (out_channel, (char *)&val, sizeof (val)); + g_timer_destroy (timer); + ++#ifdef HAVE_FORK + exit (0); ++#else ++ _exit (0); ++#endif + } + + static gboolean +@@ -108,7 +116,11 @@ + if (!read_all (source, (char *)&val, sizeof(val))) + { + fprintf (stderr, "Unexpected EOF\n"); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + + if (val) +@@ -143,7 +155,11 @@ + io_pipe (in_channels); + io_pipe (out_channels); + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + + if (pid > 0) /* Parent */ + { +@@ -165,7 +181,11 @@ + else /* Error */ + { + fprintf (stderr, "Cannot fork: %s\n", g_strerror (errno)); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + } + +diff -Nur glib-2.36.3/tests/timeloop-closure.c glib-2.36.3_new/tests/timeloop-closure.c +--- glib-2.36.3/tests/timeloop-closure.c 2013-06-10 06:03:18.000000000 +0800 ++++ glib-2.36.3_new/tests/timeloop-closure.c 2013-10-22 00:06:19.054606092 +0800 +@@ -24,7 +24,11 @@ + if (pipe(fds) < 0) + { + fprintf (stderr, "Cannot create pipe %s\n", g_strerror (errno)); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + + channels[0] = g_io_channel_unix_new (fds[0]); +@@ -95,7 +99,11 @@ + write_all (out_channel, (char *)&val, sizeof (val)); + g_timer_destroy (timer); + ++#ifdef HAVE_FORK + exit (0); ++#else ++ _exit (0); ++#endif + } + + static gboolean +@@ -109,7 +117,11 @@ + if (!read_all (source, (char *)&val, sizeof(val))) + { + fprintf (stderr, "Unexpected EOF\n"); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + + if (val) +@@ -145,7 +157,11 @@ + io_pipe (in_channels); + io_pipe (out_channels); + ++#ifdef HAVE_FORK + pid = fork (); ++#else ++ pid = vfork (); ++#endif + + if (pid > 0) /* Parent */ + { +@@ -169,7 +185,11 @@ + else /* Error */ + { + fprintf (stderr, "Cannot fork: %s\n", g_strerror (errno)); ++#ifdef HAVE_FORK + exit (1); ++#else ++ _exit (1); ++#endif + } + } +