From 10f9c4bee78b3afa5cc44b62e9cd61289940dade Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 13:55:13 +0000 Subject: phoneserver: Add patch for FIC GTA01 support. --- .../gpephone/phoneserver/phoneserver-gta01.patch | 391 +++++++++++++++++++++ packages/gpephone/phoneserver_1.0.bb | 7 +- 2 files changed, 396 insertions(+), 2 deletions(-) create mode 100644 packages/gpephone/phoneserver/phoneserver-gta01.patch (limited to 'packages') diff --git a/packages/gpephone/phoneserver/phoneserver-gta01.patch b/packages/gpephone/phoneserver/phoneserver-gta01.patch new file mode 100644 index 0000000000..fc5968ef5a --- /dev/null +++ b/packages/gpephone/phoneserver/phoneserver-gta01.patch @@ -0,0 +1,391 @@ +diff -u -r phoneserver-1.0/config.h phoneserver-1.0-mine/config.h +--- phoneserver-1.0/config.h 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/config.h 2007-07-10 15:06:28.000000000 +0200 +@@ -21,8 +21,7 @@ + + /* serial port name */ + #ifndef SERIAL_PORT +-//#define SERIAL_PORT "/dev/pts/0" //ttyS1" +-#define SERIAL_PORT "/dev/ttyS1" //ttyS1" ++#define SERIAL_PORT "/dev/ttySAC0" /* NEO1973 */ + #endif /* */ + + /* serial port baudrate */ +@@ -30,6 +29,8 @@ + #define SERIAL_BAUDRATE B115200 + #endif /* */ + ++#define CRTSCTS 1 /* NEO needs RTS/CTS flow control */ ++ + /* buffer to hold AT command response */ + #ifndef ATCOMMAND_BUFFER_SIZE + #define ATCOMMAND_BUFFER_SIZE 10240 +diff -u -r phoneserver-1.0/Makefile.am phoneserver-1.0-mine/Makefile.am +--- phoneserver-1.0/Makefile.am 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/Makefile.am 2007-07-10 13:14:47.000000000 +0200 +@@ -3,7 +3,7 @@ + + INCLUDES = @DEPS_CFLAGS@ -DPREFIX=\"@prefix@\" -D_GNU_SOURCE -Wall \ + -DDBUS_API_SUBJECT_TO_CHANGE \ +- -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DCELLON_PLATFORM ++ -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DT39_PLATFORM -DNEO1973 + LDADD = @DEPS_LIBS@ + + +diff -u -r phoneserver-1.0/Makefile.in phoneserver-1.0-mine/Makefile.in +--- phoneserver-1.0/Makefile.in 2007-02-02 13:25:43.000000000 +0100 ++++ phoneserver-1.0-mine/Makefile.in 2007-07-10 13:07:16.000000000 +0200 +@@ -158,7 +158,7 @@ + target_alias = @target_alias@ + INCLUDES = @DEPS_CFLAGS@ -DPREFIX=\"@prefix@\" -D_GNU_SOURCE -Wall \ + -DDBUS_API_SUBJECT_TO_CHANGE \ +- -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DCELLON_PLATFORM ++ -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DT39_PLATFORM + + LDADD = @DEPS_LIBS@ + phoneserver_SOURCES = phoneserver.c phone-server-voc.c phone-server-sms.c phone-server-mul.c phone-server-pbk.c \ +diff -u -r phoneserver-1.0/phoneserver.c phoneserver-1.0-mine/phoneserver.c +--- phoneserver-1.0/phoneserver.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/phoneserver.c 2007-07-10 13:43:57.000000000 +0200 +@@ -324,22 +324,31 @@ + phonebook_update_entry_handler); + #endif + ++#ifdef NEO1973 ++ system("echo 1 > /sys/devices/platform/gta01-pm-gsm.0/power_on"); ++ sleep(1); ++#endif ++ + // tapi begins + // Initialize + result = tapi_initialize (); + + // Get file descripter +- if (result == TEL_ERR_NONE) +- { ++ if (result == TEL_ERR_NONE) { + result = tel_get_fd (sid, (UInt32 *) & g_fd); ++ } else { ++ /* without modem there is nothing we can do */ ++ exit(1); + } ++ + // Open session +- if (result == TEL_ERR_NONE) +- { ++ if (result == TEL_ERR_NONE) { + result = tel_open_session (&sid); ++ } else { ++ /* without fd we are as well useless */ ++ exit(1); + } + +- + if (result == TEL_ERR_NONE) + { + /* pbk section */ +@@ -357,6 +366,9 @@ + tel_evt_register (sid, TEL_EVENT_MTSMS, sms_incoming_cb, NULL); + tel_evt_register (sid, TEL_EVENT_STATUS_REPORT, sta_report_cb, NULL); + ++ } else { ++ /* without session we are also lost */ ++ exit(1); + } + // tapi ends + #if 1 +diff -u -r phoneserver-1.0/phone-server-voc.c phoneserver-1.0-mine/phone-server-voc.c +--- phoneserver-1.0/phone-server-voc.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/phone-server-voc.c 2007-07-10 16:38:12.000000000 +0200 +@@ -1028,6 +1028,7 @@ + g_print ("$$$$$$$$$$$$$$$$$$$notify VOC about the %s, and call_id = %d\n", + pmethod, call_id); + ++#if 0 + //0803 + + guint index; +@@ -1038,7 +1039,7 @@ + ("###The held call which is going to be hungup is equal to: %d, index=%d,cid=%d", + call_id, index, cid_dbus); + //0803 +- ++#endif + + if (!strcmp (pmethod, "accept")) + { +diff -u -r phoneserver-1.0/serial.c phoneserver-1.0-mine/serial.c +--- phoneserver-1.0/serial.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/serial.c 2007-07-10 15:07:14.000000000 +0200 +@@ -124,7 +124,7 @@ + + + /* Open a device with standard options. +- *Use value (-1) for "with_hw_handshake" if its specification is required from the user. ++ * Use value (-1) for "with_hw_handshake" if its specification is required from the user. + */ + int + serial_opendevice (const Int8 *file, Int32 with_odd_parity, Int32 with_async) +@@ -148,8 +148,7 @@ + + /* Set port settings for canonical input processing */ + tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL; +- if (with_odd_parity) +- { ++ if (with_odd_parity) { + tp.c_cflag |= (PARENB | PARODD); + tp.c_iflag = 0; + } +@@ -157,35 +156,36 @@ + tp.c_iflag = IGNPAR; + + #ifdef CRTSCTS ++ tp.c_cflag |= CRTSCTS; ++#else + tp.c_cflag &= ~CRTSCTS; +- +-#endif /* */ ++#endif + tp.c_oflag = 0; + tp.c_lflag = 0; + tp.c_cc[VMIN] = 1; + tp.c_cc[VTIME] = 0; ++ + retcode = tcflush (fd, TCIFLUSH); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: tcflush"); + serial_close (fd); + return -1; + } ++ + retcode = tcsetattr (fd, TCSANOW, &tp); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: tcsetattr"); + serial_close (fd); + return -1; + } ++ + serial_changespeed (fd, 115200); + + /* We need to turn off O_NONBLOCK now (we have CLOCAL set so it is safe). + *When we run some device script it really doesn't expect NONBLOCK! + */ + retcode = fcntl (fd, F_SETFL, 0); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: fnctl(F_SETFL)"); + serial_close (fd); + return -1; +@@ -195,8 +195,7 @@ + + #if !(__unices__) + retcode = fcntl (fd, F_SETOWN, getpid ()); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: fnctl(F_SETOWN)"); + serial_close (fd); + return -1; +@@ -223,12 +222,12 @@ + + # endif + #endif /* */ +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: fnctl(F_SETFL)"); + serial_close (fd); + return -1; + } ++ + return fd; + } + +@@ -240,15 +239,16 @@ + unsigned int flags; + + flags = TIOCM_DTR; ++ + if (dtr) + ioctl (fd, TIOCMBIS, &flags); +- + else + ioctl (fd, TIOCMBIC, &flags); ++ + flags = TIOCM_RTS; ++ + if (rts) + ioctl (fd, TIOCMBIS, &flags); +- + else + ioctl (fd, TIOCMBIC, &flags); + } +@@ -262,6 +262,7 @@ + FD_SET (fd, &readfds); + return select (fd + 1, &readfds, NULL, NULL, timeout); + } ++ + static int + serial_wselect (int fd, struct timeval *timeout) + { +@@ -361,12 +362,9 @@ + { + bs = n; + got = write (fd, buf + r, bs); +- if (got == 0) +- { +- g_print ("Serial write: oops, zero byte has written!\n"); +- } +- else if (got < 0) +- { ++ if (got == 0) { ++ g_print ("Serial write: oops, zero byte written!\n"); ++ } else if (got < 0) { + if (errno == EINTR) + continue; + if (errno != EAGAIN) +diff -u -r phoneserver-1.0/tapi.c phoneserver-1.0-mine/tapi.c +--- phoneserver-1.0/tapi.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/tapi.c 2007-07-10 16:51:22.000000000 +0200 +@@ -112,6 +112,7 @@ + /************************************************************************/ + /* Initialization Function Block */ + /************************************************************************/ ++tel_err_t tapi_Init_PowerOn (); + tel_err_t tapi_Init_SoftReset (); + tel_err_t tapi_Init_SetNoEcho (); + tel_err_t tapi_Init_SetCharset (); +@@ -287,6 +288,7 @@ + + ****************/ + static init_function init_func_table[] = { ++ tapi_Init_PowerOn, + tapi_Init_SoftReset, + tapi_Init_SetNoEcho, + tapi_Init_SetCharset, +@@ -477,6 +479,18 @@ + + + tel_err_t ++tapi_Init_PowerOn () ++{ ++ tel_err_t result; ++ Int8 *CommandStr; ++ ++ /* AT+CFUN=1 */ ++ CommandStr = AT_Builder_ExeCmd ((Int8 *) CMD_CFUN, (Int8 *) "=1", (Int8 *) NULL); ++ result = tapi_init_general (CommandStr); ++ return result; ++} ++ ++tel_err_t + tapi_Init_SoftReset () + { + tel_err_t result; +@@ -516,7 +530,7 @@ + //TODO: This phone does not support "HEX", we should set it to HEX + #ifdef T39_PLATFORM + CommandStr = +- AT_Builder_SetCmd ((Int8 *) CMD_CSCS, (Int8 *) "\"UTF-8\"", (Int8 *) NULL); ++ AT_Builder_SetCmd ((Int8 *) CMD_CSCS, (Int8 *) "\"8859-1\"", (Int8 *) NULL); + #endif + #ifdef CELLON_PLATFORM + CommandStr = +@@ -689,8 +703,8 @@ + (Int8 *) "0", (Int8 *) "1", (Int8 *) "0", (Int8 *) NULL); + #else + CommandStr = +- AT_Builder_SetCmd ((Int8 *) CMD_CNMI, (Int8 *) "3", (Int8 *) "1", +- (Int8 *) "0", (Int8 *) "0", (Int8 *) "0", (Int8 *) NULL); ++ AT_Builder_SetCmd ((Int8 *) CMD_CNMI, (Int8 *) "2", (Int8 *) "1", ++ (Int8 *) "0", (Int8 *) "1", (Int8 *) "0", (Int8 *) NULL); + #endif + result = tapi_init_general (CommandStr); + return result; +@@ -1737,7 +1751,7 @@ + (*evt)->evt_data.async_data.cb = tel_ctx.cur_async_evt.cb; + (*evt)->evt_data.async_data.user_data = tel_ctx.cur_async_evt.user_data; + #ifdef DEBUG +- //g_print("sms data is --> %s\n", data->user_data[0].text); ++ g_print("sms data is --> %s\n", data->user_data[0].text); + #endif + return TEL_ERR_NONE; + } +@@ -1979,14 +1993,14 @@ + sscanf (param_str, "%d", &index); + entry->index = index; + #ifdef DEBUG +- //g_print("index -> %d\n", index); ++ g_print("index -> %d\n", index); + #endif + /* number */ + param_str = (Int8 *) g_ptr_array_index (param, 1); + //exclude the quotation + memcpy (entry->number.number, param_str + 1, strlen (param_str) - 2); + #ifdef DEBUG +- //g_print("number -> %s\n", entry->number.number); ++ g_print("number -> %s\n", entry->number.number); + #endif + /* type */ + param_str = (Int8 *) g_ptr_array_index (param, 2); +@@ -1994,7 +2008,7 @@ + entry->number.npi = index & 0xF; + entry->number.ton = (index & 0x70) >> 4; + #ifdef DEBUG +- //g_print("type -> %s\n", param_str); ++ g_print("type -> %s\n", param_str); + #endif + /* text */ + param_str = (Int8 *) g_ptr_array_index (param, 3); +@@ -2015,7 +2029,7 @@ + char_unicode_decode (entry->text, entry_textbuffer, len); + #endif + #ifdef DEBUG +- //g_print("text -> %s\n", entry->text); ++ g_print("text -> %s\n", entry->text); + #endif + AT_Parser_Free (param); + /* add the entry into array */ +@@ -2524,11 +2538,11 @@ + tel_call_info_change_t *call_status = g_new0 (tel_call_info_change_t, 1); + at_command_buffer_t *cmd_buffer; + +- //g_print("AT_UNSO_PPURC_Handler called\n"); +-// cmd_buffer = tapi_get_cmd_buffer(in_buffer, CMD_PPURC, 0, NULL); ++ g_print("AT_UNSO_PPURC_Handler called\n"); ++ cmd_buffer = tapi_get_cmd_buffer(in_buffer, CMD_PPURC, 0, NULL); + #ifdef DEBUG +- //g_print("====cur parser pos is ---> %d\n", tel_ctx.cur_parser_pos); +- //g_print("====total parser item is ---> %d\n", tel_ctx.cur_resp.cmd->len); ++ g_print("====cur parser pos is ---> %d\n", tel_ctx.cur_parser_pos); ++ g_print("====total parser item is ---> %d\n", tel_ctx.cur_resp.cmd->len); + #endif + cmd_buffer = + tapi_get_cmd_buffer (in_buffer, CMD_PPURC, tel_ctx.cur_parser_pos - 1, +@@ -3749,8 +3763,10 @@ + break; + case TEL_HANGUPALL: + /* +CHUP */ ++ //CommandStr = ++ // AT_Builder_ExeCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); + CommandStr = +- AT_Builder_ExeCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); ++ AT_Builder_ExeCmd ((Int8 *) "H", (Int8 *) NULL, (Int8 *) NULL); + break; + case TEL_HANGUPACTIVE_ACCEPTOTHER: + /* +CHLD=1 */ +@@ -3859,7 +3875,8 @@ + break; + case TEL_HANGUPALL: + /* +CHUP */ +- AT_Builder_AppendCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); ++ //AT_Builder_AppendCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); ++ AT_Builder_AppendCmd ((Int8 *) "H", (Int8 *) NULL, (Int8 *) NULL); + break; + case TEL_HANGUPACTIVE_ACCEPTOTHER: + /* +CHLD=1 */ diff --git a/packages/gpephone/phoneserver_1.0.bb b/packages/gpephone/phoneserver_1.0.bb index 522d31cee1..d85bbf1699 100644 --- a/packages/gpephone/phoneserver_1.0.bb +++ b/packages/gpephone/phoneserver_1.0.bb @@ -2,12 +2,15 @@ LICENSE = "LiPS" DESCRIPTION = "Phone services server" SECTION = "gpe" PRIORITY = "optional" -PR = "r1" +PR = "r2" + +PACKAGE_ARCH = "${MACHINE}" DEPENDS = "dbus-glib glib-2.0 libmsgenabler libabenabler" GPE_TARBALL_SUFFIX= "bz2" inherit gpephone autotools -SRC_URI += "file://changeport.patch;patch=1;pnum=0" +SRC_URI_append_x86 = " file://changeport.patch;patch=1;pnum=0" +SRC_URI_append_fic-gta01 = " file://phoneserver-gta01.patch;patch=1" -- cgit v1.2.3 From e396177148415788c33f161e160d494b40ab1efa Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 24 Jul 2007 13:55:35 +0000 Subject: task-base: also install bluez-utils-compat in task-base-bluetooth --- packages/tasks/task-base.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/tasks/task-base.bb b/packages/tasks/task-base.bb index 368e9374d2..84c3610b8f 100644 --- a/packages/tasks/task-base.bb +++ b/packages/tasks/task-base.bb @@ -1,5 +1,5 @@ DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" -PR = "r40" +PR = "r41" DEPENDS = "task-boot" PROVIDES = "${PACKAGES}" @@ -223,9 +223,13 @@ task-base-pcmcia26 = "\ ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-hostap-cs', '',d)} \ ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-spectrum-cs', '',d)}" +# Provide bluez-utils-compat utils for the time being, the binaries in that package will vanish soon from upstream releases, so beware! + RDEPENDS_task-base-bluetooth = "\ blueprobe \ - bluez-utils" + bluez-utils \ + bluez-utils-compat \ + " RRECOMMENDS_task-base-bluetooth = "\ kernel-module-bluetooth \ -- cgit v1.2.3 From 4b69a66b9d14248635ad21b6c24b1e5b449caa86 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 24 Jul 2007 14:10:35 +0000 Subject: disapproval of revision 'd7758e2637918ff4035244d64fb7227f6cf833ad' --- .../gpephone/phoneserver/phoneserver-gta01.patch | 391 --------------------- packages/gpephone/phoneserver_1.0.bb | 7 +- 2 files changed, 2 insertions(+), 396 deletions(-) delete mode 100644 packages/gpephone/phoneserver/phoneserver-gta01.patch (limited to 'packages') diff --git a/packages/gpephone/phoneserver/phoneserver-gta01.patch b/packages/gpephone/phoneserver/phoneserver-gta01.patch deleted file mode 100644 index fc5968ef5a..0000000000 --- a/packages/gpephone/phoneserver/phoneserver-gta01.patch +++ /dev/null @@ -1,391 +0,0 @@ -diff -u -r phoneserver-1.0/config.h phoneserver-1.0-mine/config.h ---- phoneserver-1.0/config.h 2007-02-02 13:20:13.000000000 +0100 -+++ phoneserver-1.0-mine/config.h 2007-07-10 15:06:28.000000000 +0200 -@@ -21,8 +21,7 @@ - - /* serial port name */ - #ifndef SERIAL_PORT --//#define SERIAL_PORT "/dev/pts/0" //ttyS1" --#define SERIAL_PORT "/dev/ttyS1" //ttyS1" -+#define SERIAL_PORT "/dev/ttySAC0" /* NEO1973 */ - #endif /* */ - - /* serial port baudrate */ -@@ -30,6 +29,8 @@ - #define SERIAL_BAUDRATE B115200 - #endif /* */ - -+#define CRTSCTS 1 /* NEO needs RTS/CTS flow control */ -+ - /* buffer to hold AT command response */ - #ifndef ATCOMMAND_BUFFER_SIZE - #define ATCOMMAND_BUFFER_SIZE 10240 -diff -u -r phoneserver-1.0/Makefile.am phoneserver-1.0-mine/Makefile.am ---- phoneserver-1.0/Makefile.am 2007-02-02 13:20:13.000000000 +0100 -+++ phoneserver-1.0-mine/Makefile.am 2007-07-10 13:14:47.000000000 +0200 -@@ -3,7 +3,7 @@ - - INCLUDES = @DEPS_CFLAGS@ -DPREFIX=\"@prefix@\" -D_GNU_SOURCE -Wall \ - -DDBUS_API_SUBJECT_TO_CHANGE \ -- -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DCELLON_PLATFORM -+ -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DT39_PLATFORM -DNEO1973 - LDADD = @DEPS_LIBS@ - - -diff -u -r phoneserver-1.0/Makefile.in phoneserver-1.0-mine/Makefile.in ---- phoneserver-1.0/Makefile.in 2007-02-02 13:25:43.000000000 +0100 -+++ phoneserver-1.0-mine/Makefile.in 2007-07-10 13:07:16.000000000 +0200 -@@ -158,7 +158,7 @@ - target_alias = @target_alias@ - INCLUDES = @DEPS_CFLAGS@ -DPREFIX=\"@prefix@\" -D_GNU_SOURCE -Wall \ - -DDBUS_API_SUBJECT_TO_CHANGE \ -- -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DCELLON_PLATFORM -+ -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DT39_PLATFORM - - LDADD = @DEPS_LIBS@ - phoneserver_SOURCES = phoneserver.c phone-server-voc.c phone-server-sms.c phone-server-mul.c phone-server-pbk.c \ -diff -u -r phoneserver-1.0/phoneserver.c phoneserver-1.0-mine/phoneserver.c ---- phoneserver-1.0/phoneserver.c 2007-02-02 13:20:13.000000000 +0100 -+++ phoneserver-1.0-mine/phoneserver.c 2007-07-10 13:43:57.000000000 +0200 -@@ -324,22 +324,31 @@ - phonebook_update_entry_handler); - #endif - -+#ifdef NEO1973 -+ system("echo 1 > /sys/devices/platform/gta01-pm-gsm.0/power_on"); -+ sleep(1); -+#endif -+ - // tapi begins - // Initialize - result = tapi_initialize (); - - // Get file descripter -- if (result == TEL_ERR_NONE) -- { -+ if (result == TEL_ERR_NONE) { - result = tel_get_fd (sid, (UInt32 *) & g_fd); -+ } else { -+ /* without modem there is nothing we can do */ -+ exit(1); - } -+ - // Open session -- if (result == TEL_ERR_NONE) -- { -+ if (result == TEL_ERR_NONE) { - result = tel_open_session (&sid); -+ } else { -+ /* without fd we are as well useless */ -+ exit(1); - } - -- - if (result == TEL_ERR_NONE) - { - /* pbk section */ -@@ -357,6 +366,9 @@ - tel_evt_register (sid, TEL_EVENT_MTSMS, sms_incoming_cb, NULL); - tel_evt_register (sid, TEL_EVENT_STATUS_REPORT, sta_report_cb, NULL); - -+ } else { -+ /* without session we are also lost */ -+ exit(1); - } - // tapi ends - #if 1 -diff -u -r phoneserver-1.0/phone-server-voc.c phoneserver-1.0-mine/phone-server-voc.c ---- phoneserver-1.0/phone-server-voc.c 2007-02-02 13:20:13.000000000 +0100 -+++ phoneserver-1.0-mine/phone-server-voc.c 2007-07-10 16:38:12.000000000 +0200 -@@ -1028,6 +1028,7 @@ - g_print ("$$$$$$$$$$$$$$$$$$$notify VOC about the %s, and call_id = %d\n", - pmethod, call_id); - -+#if 0 - //0803 - - guint index; -@@ -1038,7 +1039,7 @@ - ("###The held call which is going to be hungup is equal to: %d, index=%d,cid=%d", - call_id, index, cid_dbus); - //0803 -- -+#endif - - if (!strcmp (pmethod, "accept")) - { -diff -u -r phoneserver-1.0/serial.c phoneserver-1.0-mine/serial.c ---- phoneserver-1.0/serial.c 2007-02-02 13:20:13.000000000 +0100 -+++ phoneserver-1.0-mine/serial.c 2007-07-10 15:07:14.000000000 +0200 -@@ -124,7 +124,7 @@ - - - /* Open a device with standard options. -- *Use value (-1) for "with_hw_handshake" if its specification is required from the user. -+ * Use value (-1) for "with_hw_handshake" if its specification is required from the user. - */ - int - serial_opendevice (const Int8 *file, Int32 with_odd_parity, Int32 with_async) -@@ -148,8 +148,7 @@ - - /* Set port settings for canonical input processing */ - tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL; -- if (with_odd_parity) -- { -+ if (with_odd_parity) { - tp.c_cflag |= (PARENB | PARODD); - tp.c_iflag = 0; - } -@@ -157,35 +156,36 @@ - tp.c_iflag = IGNPAR; - - #ifdef CRTSCTS -+ tp.c_cflag |= CRTSCTS; -+#else - tp.c_cflag &= ~CRTSCTS; -- --#endif /* */ -+#endif - tp.c_oflag = 0; - tp.c_lflag = 0; - tp.c_cc[VMIN] = 1; - tp.c_cc[VTIME] = 0; -+ - retcode = tcflush (fd, TCIFLUSH); -- if (retcode == -1) -- { -+ if (retcode == -1) { - perror ("Gnokii serial_opendevice: tcflush"); - serial_close (fd); - return -1; - } -+ - retcode = tcsetattr (fd, TCSANOW, &tp); -- if (retcode == -1) -- { -+ if (retcode == -1) { - perror ("Gnokii serial_opendevice: tcsetattr"); - serial_close (fd); - return -1; - } -+ - serial_changespeed (fd, 115200); - - /* We need to turn off O_NONBLOCK now (we have CLOCAL set so it is safe). - *When we run some device script it really doesn't expect NONBLOCK! - */ - retcode = fcntl (fd, F_SETFL, 0); -- if (retcode == -1) -- { -+ if (retcode == -1) { - perror ("Gnokii serial_opendevice: fnctl(F_SETFL)"); - serial_close (fd); - return -1; -@@ -195,8 +195,7 @@ - - #if !(__unices__) - retcode = fcntl (fd, F_SETOWN, getpid ()); -- if (retcode == -1) -- { -+ if (retcode == -1) { - perror ("Gnokii serial_opendevice: fnctl(F_SETOWN)"); - serial_close (fd); - return -1; -@@ -223,12 +222,12 @@ - - # endif - #endif /* */ -- if (retcode == -1) -- { -+ if (retcode == -1) { - perror ("Gnokii serial_opendevice: fnctl(F_SETFL)"); - serial_close (fd); - return -1; - } -+ - return fd; - } - -@@ -240,15 +239,16 @@ - unsigned int flags; - - flags = TIOCM_DTR; -+ - if (dtr) - ioctl (fd, TIOCMBIS, &flags); -- - else - ioctl (fd, TIOCMBIC, &flags); -+ - flags = TIOCM_RTS; -+ - if (rts) - ioctl (fd, TIOCMBIS, &flags); -- - else - ioctl (fd, TIOCMBIC, &flags); - } -@@ -262,6 +262,7 @@ - FD_SET (fd, &readfds); - return select (fd + 1, &readfds, NULL, NULL, timeout); - } -+ - static int - serial_wselect (int fd, struct timeval *timeout) - { -@@ -361,12 +362,9 @@ - { - bs = n; - got = write (fd, buf + r, bs); -- if (got == 0) -- { -- g_print ("Serial write: oops, zero byte has written!\n"); -- } -- else if (got < 0) -- { -+ if (got == 0) { -+ g_print ("Serial write: oops, zero byte written!\n"); -+ } else if (got < 0) { - if (errno == EINTR) - continue; - if (errno != EAGAIN) -diff -u -r phoneserver-1.0/tapi.c phoneserver-1.0-mine/tapi.c ---- phoneserver-1.0/tapi.c 2007-02-02 13:20:13.000000000 +0100 -+++ phoneserver-1.0-mine/tapi.c 2007-07-10 16:51:22.000000000 +0200 -@@ -112,6 +112,7 @@ - /************************************************************************/ - /* Initialization Function Block */ - /************************************************************************/ -+tel_err_t tapi_Init_PowerOn (); - tel_err_t tapi_Init_SoftReset (); - tel_err_t tapi_Init_SetNoEcho (); - tel_err_t tapi_Init_SetCharset (); -@@ -287,6 +288,7 @@ - - ****************/ - static init_function init_func_table[] = { -+ tapi_Init_PowerOn, - tapi_Init_SoftReset, - tapi_Init_SetNoEcho, - tapi_Init_SetCharset, -@@ -477,6 +479,18 @@ - - - tel_err_t -+tapi_Init_PowerOn () -+{ -+ tel_err_t result; -+ Int8 *CommandStr; -+ -+ /* AT+CFUN=1 */ -+ CommandStr = AT_Builder_ExeCmd ((Int8 *) CMD_CFUN, (Int8 *) "=1", (Int8 *) NULL); -+ result = tapi_init_general (CommandStr); -+ return result; -+} -+ -+tel_err_t - tapi_Init_SoftReset () - { - tel_err_t result; -@@ -516,7 +530,7 @@ - //TODO: This phone does not support "HEX", we should set it to HEX - #ifdef T39_PLATFORM - CommandStr = -- AT_Builder_SetCmd ((Int8 *) CMD_CSCS, (Int8 *) "\"UTF-8\"", (Int8 *) NULL); -+ AT_Builder_SetCmd ((Int8 *) CMD_CSCS, (Int8 *) "\"8859-1\"", (Int8 *) NULL); - #endif - #ifdef CELLON_PLATFORM - CommandStr = -@@ -689,8 +703,8 @@ - (Int8 *) "0", (Int8 *) "1", (Int8 *) "0", (Int8 *) NULL); - #else - CommandStr = -- AT_Builder_SetCmd ((Int8 *) CMD_CNMI, (Int8 *) "3", (Int8 *) "1", -- (Int8 *) "0", (Int8 *) "0", (Int8 *) "0", (Int8 *) NULL); -+ AT_Builder_SetCmd ((Int8 *) CMD_CNMI, (Int8 *) "2", (Int8 *) "1", -+ (Int8 *) "0", (Int8 *) "1", (Int8 *) "0", (Int8 *) NULL); - #endif - result = tapi_init_general (CommandStr); - return result; -@@ -1737,7 +1751,7 @@ - (*evt)->evt_data.async_data.cb = tel_ctx.cur_async_evt.cb; - (*evt)->evt_data.async_data.user_data = tel_ctx.cur_async_evt.user_data; - #ifdef DEBUG -- //g_print("sms data is --> %s\n", data->user_data[0].text); -+ g_print("sms data is --> %s\n", data->user_data[0].text); - #endif - return TEL_ERR_NONE; - } -@@ -1979,14 +1993,14 @@ - sscanf (param_str, "%d", &index); - entry->index = index; - #ifdef DEBUG -- //g_print("index -> %d\n", index); -+ g_print("index -> %d\n", index); - #endif - /* number */ - param_str = (Int8 *) g_ptr_array_index (param, 1); - //exclude the quotation - memcpy (entry->number.number, param_str + 1, strlen (param_str) - 2); - #ifdef DEBUG -- //g_print("number -> %s\n", entry->number.number); -+ g_print("number -> %s\n", entry->number.number); - #endif - /* type */ - param_str = (Int8 *) g_ptr_array_index (param, 2); -@@ -1994,7 +2008,7 @@ - entry->number.npi = index & 0xF; - entry->number.ton = (index & 0x70) >> 4; - #ifdef DEBUG -- //g_print("type -> %s\n", param_str); -+ g_print("type -> %s\n", param_str); - #endif - /* text */ - param_str = (Int8 *) g_ptr_array_index (param, 3); -@@ -2015,7 +2029,7 @@ - char_unicode_decode (entry->text, entry_textbuffer, len); - #endif - #ifdef DEBUG -- //g_print("text -> %s\n", entry->text); -+ g_print("text -> %s\n", entry->text); - #endif - AT_Parser_Free (param); - /* add the entry into array */ -@@ -2524,11 +2538,11 @@ - tel_call_info_change_t *call_status = g_new0 (tel_call_info_change_t, 1); - at_command_buffer_t *cmd_buffer; - -- //g_print("AT_UNSO_PPURC_Handler called\n"); --// cmd_buffer = tapi_get_cmd_buffer(in_buffer, CMD_PPURC, 0, NULL); -+ g_print("AT_UNSO_PPURC_Handler called\n"); -+ cmd_buffer = tapi_get_cmd_buffer(in_buffer, CMD_PPURC, 0, NULL); - #ifdef DEBUG -- //g_print("====cur parser pos is ---> %d\n", tel_ctx.cur_parser_pos); -- //g_print("====total parser item is ---> %d\n", tel_ctx.cur_resp.cmd->len); -+ g_print("====cur parser pos is ---> %d\n", tel_ctx.cur_parser_pos); -+ g_print("====total parser item is ---> %d\n", tel_ctx.cur_resp.cmd->len); - #endif - cmd_buffer = - tapi_get_cmd_buffer (in_buffer, CMD_PPURC, tel_ctx.cur_parser_pos - 1, -@@ -3749,8 +3763,10 @@ - break; - case TEL_HANGUPALL: - /* +CHUP */ -+ //CommandStr = -+ // AT_Builder_ExeCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); - CommandStr = -- AT_Builder_ExeCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); -+ AT_Builder_ExeCmd ((Int8 *) "H", (Int8 *) NULL, (Int8 *) NULL); - break; - case TEL_HANGUPACTIVE_ACCEPTOTHER: - /* +CHLD=1 */ -@@ -3859,7 +3875,8 @@ - break; - case TEL_HANGUPALL: - /* +CHUP */ -- AT_Builder_AppendCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); -+ //AT_Builder_AppendCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); -+ AT_Builder_AppendCmd ((Int8 *) "H", (Int8 *) NULL, (Int8 *) NULL); - break; - case TEL_HANGUPACTIVE_ACCEPTOTHER: - /* +CHLD=1 */ diff --git a/packages/gpephone/phoneserver_1.0.bb b/packages/gpephone/phoneserver_1.0.bb index d85bbf1699..522d31cee1 100644 --- a/packages/gpephone/phoneserver_1.0.bb +++ b/packages/gpephone/phoneserver_1.0.bb @@ -2,15 +2,12 @@ LICENSE = "LiPS" DESCRIPTION = "Phone services server" SECTION = "gpe" PRIORITY = "optional" -PR = "r2" - -PACKAGE_ARCH = "${MACHINE}" +PR = "r1" DEPENDS = "dbus-glib glib-2.0 libmsgenabler libabenabler" GPE_TARBALL_SUFFIX= "bz2" inherit gpephone autotools -SRC_URI_append_x86 = " file://changeport.patch;patch=1;pnum=0" -SRC_URI_append_fic-gta01 = " file://phoneserver-gta01.patch;patch=1" +SRC_URI += "file://changeport.patch;patch=1;pnum=0" -- cgit v1.2.3 From 45580d9964623161469e09e2e46150672d2dc7a9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 24 Jul 2007 14:24:59 +0000 Subject: ruby: fix packaging --- packages/ruby/ruby_1.8.5.bb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages') diff --git a/packages/ruby/ruby_1.8.5.bb b/packages/ruby/ruby_1.8.5.bb index d06e9e0943..6260614772 100644 --- a/packages/ruby/ruby_1.8.5.bb +++ b/packages/ruby/ruby_1.8.5.bb @@ -1,2 +1,8 @@ require ruby.inc DEPENDS = "ruby-native zlib openssl" + +PR = "r1" + +FILES_${PN}-dbg += "${libdir}/ruby/1.8/*/.debug \ + ${libdir}/ruby/1.8/*/*/.debug" + -- cgit v1.2.3 From 13c300738c6a70493554efcda0a6705d44155152 Mon Sep 17 00:00:00 2001 From: Philip Balister Date: Tue, 24 Jul 2007 17:25:33 +0000 Subject: pkgconfig : Add support for pkgconfig-0.22. DEFAULT_PREF = -1 pending further testing. pkconfig-0.22.bb does not build. Native version builds and corrects at least one issue with older pkgconfig. --- packages/pkgconfig/pkgconfig-0.22/.mtn2git_empty | 0 .../pkgconfig/pkgconfig-0.22/glibconfig-sysdefs.h | 6 +++++ packages/pkgconfig/pkgconfig-native_0.22.bb | 7 +++++ packages/pkgconfig/pkgconfig_0.22.bb | 30 ++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 packages/pkgconfig/pkgconfig-0.22/.mtn2git_empty create mode 100644 packages/pkgconfig/pkgconfig-0.22/glibconfig-sysdefs.h create mode 100644 packages/pkgconfig/pkgconfig-native_0.22.bb create mode 100644 packages/pkgconfig/pkgconfig_0.22.bb (limited to 'packages') diff --git a/packages/pkgconfig/pkgconfig-0.22/.mtn2git_empty b/packages/pkgconfig/pkgconfig-0.22/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/pkgconfig/pkgconfig-0.22/glibconfig-sysdefs.h b/packages/pkgconfig/pkgconfig-0.22/glibconfig-sysdefs.h new file mode 100644 index 0000000000..1329e7f21c --- /dev/null +++ b/packages/pkgconfig/pkgconfig-0.22/glibconfig-sysdefs.h @@ -0,0 +1,6 @@ +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLNVAL =32 diff --git a/packages/pkgconfig/pkgconfig-native_0.22.bb b/packages/pkgconfig/pkgconfig-native_0.22.bb new file mode 100644 index 0000000000..507a74b7d9 --- /dev/null +++ b/packages/pkgconfig/pkgconfig-native_0.22.bb @@ -0,0 +1,7 @@ +SECTION = "console/utils" +require pkgconfig_${PV}.bb +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}" + +S = "${WORKDIR}/pkg-config-${PV}/" +inherit native +DEPENDS = "" diff --git a/packages/pkgconfig/pkgconfig_0.22.bb b/packages/pkgconfig/pkgconfig_0.22.bb new file mode 100644 index 0000000000..f634a87940 --- /dev/null +++ b/packages/pkgconfig/pkgconfig_0.22.bb @@ -0,0 +1,30 @@ +SECTION = "console/utils" +DESCRIPTION = "pkg-config is a system for managing library \ +compile/link flags that works with automake and autoconf. \ +It replaces the ubiquitous *-config scripts you may have \ +seen with a single tool." +HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/" +LICENSE = "GPL" +PR = "r0" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \ + file://glibconfig-sysdefs.h" + +S = "${WORKDIR}/pkg-config-${PV}/" + +inherit autotools + +acpaths = "-I ." +do_configure () { + install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h glib-1.2.8/ + gnu-configize + libtoolize --force + oe_runconf +} + +do_stage_prepend() { + install -d -m 0755 ${STAGING_DATADIR}/pkgconfig + +} -- cgit v1.2.3 From 1f5fe77cd071d92cf39f73702a880834863ba654 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 24 Jul 2007 18:43:57 +0000 Subject: openmoko-rssreader: depend on webkit --- packages/openmoko-apps/openmoko-rssreader_svn.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/openmoko-apps/openmoko-rssreader_svn.bb b/packages/openmoko-apps/openmoko-rssreader_svn.bb index 6e58b17c5b..ec52817b81 100644 --- a/packages/openmoko-apps/openmoko-rssreader_svn.bb +++ b/packages/openmoko-apps/openmoko-rssreader_svn.bb @@ -1,6 +1,6 @@ DESCRIPTION = "The OpenMoko RSS Reader" SECTION = "openmoko/applications" -DEPENDS += "libmrss check" +DEPENDS += "libmrss check webkit" PV = "0.0.1+svn${SRCDATE}" PR = "r1" -- cgit v1.2.3 From 9b3ae25558fd1a9cc6abbf5580f99fdb64537c4c Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 18:49:32 +0000 Subject: cms92init: Add patch to work around broken install tools. --- packages/gpephone/cms92init-0.1/.mtn2git_empty | 0 packages/gpephone/cms92init-0.1/oe-install.patch | 9 +++++++++ packages/gpephone/cms92init_0.1.bb | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 packages/gpephone/cms92init-0.1/.mtn2git_empty create mode 100644 packages/gpephone/cms92init-0.1/oe-install.patch (limited to 'packages') diff --git a/packages/gpephone/cms92init-0.1/.mtn2git_empty b/packages/gpephone/cms92init-0.1/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/gpephone/cms92init-0.1/oe-install.patch b/packages/gpephone/cms92init-0.1/oe-install.patch new file mode 100644 index 0000000000..23e321c6bd --- /dev/null +++ b/packages/gpephone/cms92init-0.1/oe-install.patch @@ -0,0 +1,9 @@ +--- cms92init-simple/Makefile~ 2007-05-24 12:14:31.000000000 +0200 ++++ cms92init-simple/Makefile 2007-05-24 12:14:31.000000000 +0200 +@@ -12,5 +12,5 @@ + + install: + install -d $(DESTDIR)/$(PREFIX)/bin +- install -m755 cms92init $(DESTDIR)/$(PREFIX)/bin ++ install -m 755 cms92init $(DESTDIR)/$(PREFIX)/bin + diff --git a/packages/gpephone/cms92init_0.1.bb b/packages/gpephone/cms92init_0.1.bb index ab0388a45d..4b943f4a6d 100644 --- a/packages/gpephone/cms92init_0.1.bb +++ b/packages/gpephone/cms92init_0.1.bb @@ -7,7 +7,8 @@ PR = "r0" inherit gpephone -SRC_URI = "${GPEPHONE_MIRROR}/GPRS/GPRS-${PV}.tar.bz2" +SRC_URI = "${GPEPHONE_MIRROR}/GPRS/GPRS-${PV}.tar.bz2 \ + file://oe-install.patch;patch=1" S = ${WORKDIR}/GPRS/cms92init-simple -- cgit v1.2.3 From d1289f508b32e4f2c2b3186260a2ee27d788eaa7 Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 18:50:08 +0000 Subject: libgpephone: add 0.4 --- packages/gpephone/libgpephone_0.4.bb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/gpephone/libgpephone_0.4.bb (limited to 'packages') diff --git a/packages/gpephone/libgpephone_0.4.bb b/packages/gpephone/libgpephone_0.4.bb new file mode 100644 index 0000000000..690b3eded6 --- /dev/null +++ b/packages/gpephone/libgpephone_0.4.bb @@ -0,0 +1,13 @@ +LICENSE = "LGPL" +DESCRIPTION = "Base library for GPE phone environment." +SECTION = "gpe/libs" +PRIORITY = "optional" +DEPENDS = "gtk+ gtk-doc dbus-glib" +PR = "r0" + +GPE_TARBALL_SUFFIX = "bz2" +inherit gpephone pkgconfig autotools + +do_stage () { + autotools_stage_all +} -- cgit v1.2.3 From 2b8d537504f1a6b0b5f3477dee1418aa9126d71a Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 19:07:29 +0000 Subject: gpe-phonepanel: add 0.9 --- packages/gpephone/gpe-phonepanel_0.9.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/gpephone/gpe-phonepanel_0.9.bb (limited to 'packages') diff --git a/packages/gpephone/gpe-phonepanel_0.9.bb b/packages/gpephone/gpe-phonepanel_0.9.bb new file mode 100644 index 0000000000..f9e2f04867 --- /dev/null +++ b/packages/gpephone/gpe-phonepanel_0.9.bb @@ -0,0 +1,12 @@ +LICENSE = "GPL" +DESCRIPTION = "A cellphone status panel to be used with gpe-applauncher." +SECTION = "gpe" +PRIORITY = "optional" +PR = "r0" + +DEPENDS = "gtk+ libgpephone dbus-glib libsettings" + +GPE_TARBALL_SUFFIX= "bz2" +inherit gpephone autotools + +FILES_${PN} += "${datadir}/themes" -- cgit v1.2.3 From 6a2076daa6c8fbcbeb79e217ca7d064bc44c7103 Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 19:10:23 +0000 Subject: gpe-applauncher: add 0.8 --- packages/gpephone/gpe-applauncher_0.8.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/gpephone/gpe-applauncher_0.8.bb (limited to 'packages') diff --git a/packages/gpephone/gpe-applauncher_0.8.bb b/packages/gpephone/gpe-applauncher_0.8.bb new file mode 100644 index 0000000000..641511ad5b --- /dev/null +++ b/packages/gpephone/gpe-applauncher_0.8.bb @@ -0,0 +1,12 @@ +LICENSE = "GPL" +DESCRIPTION = "A cellphone application launcher." +SECTION = "gpe" +PRIORITY = "optional" +PR = "r0" + +DEPENDS = "gtk+ libgpewidget libgpephone libgpelaunch dbus-glib libsettings" + +GPE_TARBALL_SUFFIX= "bz2" +inherit gpephone autotools + +FILES_${PN} += '${datadir}/themes' -- cgit v1.2.3 From 0973fe7ef889c9a40b262d95cd041e59fbcc5c3f Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 19:11:50 +0000 Subject: ptim-manager: Make install more flexible agains gtk versions. --- packages/gpephone/ptim-manager_svn.bb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages') diff --git a/packages/gpephone/ptim-manager_svn.bb b/packages/gpephone/ptim-manager_svn.bb index b1113636e9..8c86d4cfeb 100644 --- a/packages/gpephone/ptim-manager_svn.bb +++ b/packages/gpephone/ptim-manager_svn.bb @@ -4,6 +4,7 @@ PRIORITY = "optional" LICENSE = "LiPS" DEPENDS = "gtk+ ptim-headers libiac" PV = "0.1+svn-${SRCDATE}" +PR = "r1" DEFAULT_PREFERENCE = "-1" @@ -18,6 +19,14 @@ FILES_${PN} += "${libdir}/gtk-2.0/*/immodules/*.so ${libdir}/gtk-2.0/*/immodules FILES_${PN}-dbg += "${libdir}/gtk-2.0/*/immodules/.debug/*.so" FILES_${PN}-dev += "${libdir}/gtk-2.0/*/immodules/*.la" + +do_install_append () { + # That's evil... + install -m 644 ${S}/conf/imconfig ${D}/${libdir}/gtk-2.0/*/immodules/ptim +} + + + do_stage () { autotools_stage_all } \ No newline at end of file -- cgit v1.2.3 From f5c6a7fdebeffa1fd8addc54d77f1a7d774e1358 Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 24 Jul 2007 19:12:25 +0000 Subject: ptim-helper: Add missing files to package. --- packages/gpephone/ptim-helper_svn.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/gpephone/ptim-helper_svn.bb b/packages/gpephone/ptim-helper_svn.bb index 4aa308ccbf..3461de6225 100644 --- a/packages/gpephone/ptim-helper_svn.bb +++ b/packages/gpephone/ptim-helper_svn.bb @@ -14,7 +14,7 @@ SRC_URI = "svn://projects.linuxtogo.org/svn/gpephone/trunk/source/ptim;module=im S = "${WORKDIR}/imhelper" -FILES_${PN} += " ${libdir}/gtk-2.0/*/immodules/ptim/helper/*.so ${libdir}/gtk-2.0/*/immodules/ptim/pixmaps" +FILES_${PN} += " ${libdir}/gtk-2.0/*/immodules/ptim/helper/*.so ${libdir}/gtk-2.0/*/immodules/ptim/pixmaps/*" FILES_${PN}-dbg += "${libdir}/gtk-2.0/*/immodules/ptim/helper/.debug/*.so" FILES_${PN}-dev += "${libdir}/gtk-2.0/*/immodules/ptim/helper/*.la" -- cgit v1.2.3 From 7a8044caa66ef4afafecd61dc8fedc8972c7daa9 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Tue, 24 Jul 2007 20:32:51 +0000 Subject: -updating ecj to 3.3 -its the first step to intgrate cacao-cldc in oe --- packages/ecj/ecj-native_3.3.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/ecj/ecj-native_3.3.bb (limited to 'packages') diff --git a/packages/ecj/ecj-native_3.3.bb b/packages/ecj/ecj-native_3.3.bb new file mode 100644 index 0000000000..ff2eb5f49e --- /dev/null +++ b/packages/ecj/ecj-native_3.3.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "JDT Core Batch Compiler" +HOMEPAGE = "http://www.eclipse.org/" +PRIORITY = "optional" +SECTION = "devel" +LICENSE = "EPL" +PR = "r0" + +inherit native + +SRC_URI = "http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.3-200706251500/ecj.jar \ + file://ecj.sh" + +do_stage() { + install -d ${STAGING_BINDIR_NATIVE} + install -m 755 ${S}/../ecj.jar ${STAGING_BINDIR_NATIVE} + install -m 755 ${S}/../ecj.sh ${STAGING_BINDIR_NATIVE}/ecj +} -- cgit v1.2.3 From f304c61e41c4b36551b9c92eb9f417bf29816427 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 Jul 2007 08:49:02 +0000 Subject: mtd-utils: Updates after lzo patches merged upstream (from poky) --- packages/mtd/mtd-utils/lzo_1x.patch | 26 ++++++++++++++++++++++++++ packages/mtd/mtd-utils_1.0.0+git.bb | 7 +++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 packages/mtd/mtd-utils/lzo_1x.patch (limited to 'packages') diff --git a/packages/mtd/mtd-utils/lzo_1x.patch b/packages/mtd/mtd-utils/lzo_1x.patch new file mode 100644 index 0000000000..b882d9f504 --- /dev/null +++ b/packages/mtd/mtd-utils/lzo_1x.patch @@ -0,0 +1,26 @@ +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -60,7 +60,7 @@ $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc3 + $(BUILDDIR)/compr_zlib.o \ + $(BUILDDIR)/compr_lzo.o \ + $(BUILDDIR)/compr.o +- $(CC) $(LDFLAGS) -o $@ $^ -lz -llzo2 ++ $(CC) $(LDFLAGS) -o $@ $^ -lz -llzo + + $(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o + $(CC) $(LDFLAGS) -o $@ $^ +Index: git/compr_lzo.c +=================================================================== +--- git.orig/compr_lzo.c ++++ git/compr_lzo.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + #include "compr.h" + + extern int page_size; diff --git a/packages/mtd/mtd-utils_1.0.0+git.bb b/packages/mtd/mtd-utils_1.0.0+git.bb index 62a2c0630b..cfbd38c714 100644 --- a/packages/mtd/mtd-utils_1.0.0+git.bb +++ b/packages/mtd/mtd-utils_1.0.0+git.bb @@ -3,13 +3,12 @@ SECTION = "base" DEPENDS = "zlib lzo" HOMEPAGE = "http://www.linux-mtd.infradead.org/" LICENSE = "GPLv2" -PR = "r2" +PR = "r4" SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=master \ - file://add_lzo.patch;patch=1 \ - file://favour_lzo.patch;patch=1 \ file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \ - file://fix-ignoreerrors-git.patch;patch=1" + file://fix-ignoreerrors-git.patch;patch=1 \ + file://lzo_1x.patch;patch=1" S = "${WORKDIR}/git/" -- cgit v1.2.3 From 13c7e0fe360929acfa735a3fd2311fc7c3e525fb Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 09:38:17 +0000 Subject: gcc: 4.2.0 has a bug, so replace it with 4.2.1 * one minor uclibc patch needs to get refreshed, but we can nick that from buildroot in a few days --- packages/gcc/gcc-4.0.2/libstdc++-configure.patch | 10 + packages/gcc/gcc-4.2.0/.mtn2git_empty | 0 packages/gcc/gcc-4.2.0/100-uclibc-conf.patch | 200 -- packages/gcc/gcc-4.2.0/110-arm-eabi.patch | 27 - packages/gcc/gcc-4.2.0/200-uclibc-locale.patch | 2790 -------------------- packages/gcc/gcc-4.2.0/300-libstdc++-pic.patch | 46 - .../gcc/gcc-4.2.0/301-missing-execinfo_h.patch | 11 - packages/gcc/gcc-4.2.0/302-c99-snprintf.patch | 11 - .../gcc/gcc-4.2.0/303-c99-complex-ugly-hack.patch | 12 - packages/gcc/gcc-4.2.0/304-index_macro.patch | 24 - .../gcc/gcc-4.2.0/602-sdk-libstdc++-includes.patch | 20 - packages/gcc/gcc-4.2.0/740-sh-pr24836.patch | 25 - packages/gcc/gcc-4.2.0/800-arm-bigendian.patch | 67 - .../gcc/gcc-4.2.0/801-arm-bigendian-eabi.patch | 14 - packages/gcc/gcc-4.2.0/README | 4 - packages/gcc/gcc-4.2.0/arm-nolibfloat.patch | 24 - packages/gcc/gcc-4.2.0/arm-softfloat.patch | 16 - packages/gcc/gcc-4.2.0/arm-thumb-cache.patch | 29 - packages/gcc/gcc-4.2.0/arm-thumb.patch | 64 - packages/gcc/gcc-4.2.0/cache-amnesia.patch | 13 - .../gcc-4.2.0/fix-ICE-in-arm_unwind_emit_set.diff | 18 - packages/gcc/gcc-4.2.0/gcc41-configure.in.patch | 22 - packages/gcc/gcc-4.2.0/ldflags.patch | 22 - .../gcc/gcc-4.2.0/sdk-libstdc++-includes.patch | 22 - .../gcc/gcc-4.2.0/sh3-installfix-fixheaders.patch | 11 - packages/gcc/gcc-4.2.0/unbreak-armv4t.patch | 12 - .../gcc/gcc-4.2.0/zecke-no-host-includes.patch | 31 - packages/gcc/gcc-4.2.0/zecke-xgcc-cpp.patch | 12 - packages/gcc/gcc-4.2.1/.mtn2git_empty | 0 packages/gcc/gcc-4.2.1/100-uclibc-conf.patch | 200 ++ packages/gcc/gcc-4.2.1/110-arm-eabi.patch | 27 + packages/gcc/gcc-4.2.1/200-uclibc-locale.patch | 2790 ++++++++++++++++++++ packages/gcc/gcc-4.2.1/300-libstdc++-pic.patch | 46 + .../gcc/gcc-4.2.1/301-missing-execinfo_h.patch | 11 + packages/gcc/gcc-4.2.1/302-c99-snprintf.patch | 11 + .../gcc/gcc-4.2.1/303-c99-complex-ugly-hack.patch | 12 + packages/gcc/gcc-4.2.1/304-index_macro.patch | 24 + .../gcc/gcc-4.2.1/602-sdk-libstdc++-includes.patch | 20 + packages/gcc/gcc-4.2.1/740-sh-pr24836.patch | 25 + packages/gcc/gcc-4.2.1/800-arm-bigendian.patch | 67 + .../gcc/gcc-4.2.1/801-arm-bigendian-eabi.patch | 14 + packages/gcc/gcc-4.2.1/README | 4 + packages/gcc/gcc-4.2.1/arm-nolibfloat.patch | 24 + packages/gcc/gcc-4.2.1/arm-softfloat.patch | 16 + packages/gcc/gcc-4.2.1/arm-thumb-cache.patch | 29 + packages/gcc/gcc-4.2.1/arm-thumb.patch | 64 + packages/gcc/gcc-4.2.1/cache-amnesia.patch | 13 + .../gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff | 18 + packages/gcc/gcc-4.2.1/gcc41-configure.in.patch | 22 + packages/gcc/gcc-4.2.1/ldflags.patch | 22 + .../gcc/gcc-4.2.1/sdk-libstdc++-includes.patch | 22 + .../gcc/gcc-4.2.1/sh3-installfix-fixheaders.patch | 11 + packages/gcc/gcc-4.2.1/unbreak-armv4t.patch | 12 + .../gcc/gcc-4.2.1/zecke-no-host-includes.patch | 31 + packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch | 12 + packages/gcc/gcc-cross-sdk_4.2.0.bb | 40 - packages/gcc/gcc-cross_4.2.0.bb | 20 - packages/gcc/gcc-cross_4.2.1.bb | 20 + packages/gcc/gcc_4.2.0.bb | 52 - packages/gcc/gcc_4.2.1.bb | 52 + 60 files changed, 3629 insertions(+), 3659 deletions(-) create mode 100644 packages/gcc/gcc-4.0.2/libstdc++-configure.patch delete mode 100644 packages/gcc/gcc-4.2.0/.mtn2git_empty delete mode 100644 packages/gcc/gcc-4.2.0/100-uclibc-conf.patch delete mode 100644 packages/gcc/gcc-4.2.0/110-arm-eabi.patch delete mode 100644 packages/gcc/gcc-4.2.0/200-uclibc-locale.patch delete mode 100644 packages/gcc/gcc-4.2.0/300-libstdc++-pic.patch delete mode 100644 packages/gcc/gcc-4.2.0/301-missing-execinfo_h.patch delete mode 100644 packages/gcc/gcc-4.2.0/302-c99-snprintf.patch delete mode 100644 packages/gcc/gcc-4.2.0/303-c99-complex-ugly-hack.patch delete mode 100644 packages/gcc/gcc-4.2.0/304-index_macro.patch delete mode 100644 packages/gcc/gcc-4.2.0/602-sdk-libstdc++-includes.patch delete mode 100644 packages/gcc/gcc-4.2.0/740-sh-pr24836.patch delete mode 100644 packages/gcc/gcc-4.2.0/800-arm-bigendian.patch delete mode 100644 packages/gcc/gcc-4.2.0/801-arm-bigendian-eabi.patch delete mode 100644 packages/gcc/gcc-4.2.0/README delete mode 100644 packages/gcc/gcc-4.2.0/arm-nolibfloat.patch delete mode 100644 packages/gcc/gcc-4.2.0/arm-softfloat.patch delete mode 100644 packages/gcc/gcc-4.2.0/arm-thumb-cache.patch delete mode 100644 packages/gcc/gcc-4.2.0/arm-thumb.patch delete mode 100644 packages/gcc/gcc-4.2.0/cache-amnesia.patch delete mode 100644 packages/gcc/gcc-4.2.0/fix-ICE-in-arm_unwind_emit_set.diff delete mode 100644 packages/gcc/gcc-4.2.0/gcc41-configure.in.patch delete mode 100644 packages/gcc/gcc-4.2.0/ldflags.patch delete mode 100644 packages/gcc/gcc-4.2.0/sdk-libstdc++-includes.patch delete mode 100644 packages/gcc/gcc-4.2.0/sh3-installfix-fixheaders.patch delete mode 100644 packages/gcc/gcc-4.2.0/unbreak-armv4t.patch delete mode 100644 packages/gcc/gcc-4.2.0/zecke-no-host-includes.patch delete mode 100644 packages/gcc/gcc-4.2.0/zecke-xgcc-cpp.patch create mode 100644 packages/gcc/gcc-4.2.1/.mtn2git_empty create mode 100644 packages/gcc/gcc-4.2.1/100-uclibc-conf.patch create mode 100644 packages/gcc/gcc-4.2.1/110-arm-eabi.patch create mode 100644 packages/gcc/gcc-4.2.1/200-uclibc-locale.patch create mode 100644 packages/gcc/gcc-4.2.1/300-libstdc++-pic.patch create mode 100644 packages/gcc/gcc-4.2.1/301-missing-execinfo_h.patch create mode 100644 packages/gcc/gcc-4.2.1/302-c99-snprintf.patch create mode 100644 packages/gcc/gcc-4.2.1/303-c99-complex-ugly-hack.patch create mode 100644 packages/gcc/gcc-4.2.1/304-index_macro.patch create mode 100644 packages/gcc/gcc-4.2.1/602-sdk-libstdc++-includes.patch create mode 100644 packages/gcc/gcc-4.2.1/740-sh-pr24836.patch create mode 100644 packages/gcc/gcc-4.2.1/800-arm-bigendian.patch create mode 100644 packages/gcc/gcc-4.2.1/801-arm-bigendian-eabi.patch create mode 100644 packages/gcc/gcc-4.2.1/README create mode 100644 packages/gcc/gcc-4.2.1/arm-nolibfloat.patch create mode 100644 packages/gcc/gcc-4.2.1/arm-softfloat.patch create mode 100644 packages/gcc/gcc-4.2.1/arm-thumb-cache.patch create mode 100644 packages/gcc/gcc-4.2.1/arm-thumb.patch create mode 100644 packages/gcc/gcc-4.2.1/cache-amnesia.patch create mode 100644 packages/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff create mode 100644 packages/gcc/gcc-4.2.1/gcc41-configure.in.patch create mode 100644 packages/gcc/gcc-4.2.1/ldflags.patch create mode 100644 packages/gcc/gcc-4.2.1/sdk-libstdc++-includes.patch create mode 100644 packages/gcc/gcc-4.2.1/sh3-installfix-fixheaders.patch create mode 100644 packages/gcc/gcc-4.2.1/unbreak-armv4t.patch create mode 100644 packages/gcc/gcc-4.2.1/zecke-no-host-includes.patch create mode 100644 packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch delete mode 100644 packages/gcc/gcc-cross-sdk_4.2.0.bb delete mode 100644 packages/gcc/gcc-cross_4.2.0.bb create mode 100644 packages/gcc/gcc-cross_4.2.1.bb delete mode 100644 packages/gcc/gcc_4.2.0.bb create mode 100644 packages/gcc/gcc_4.2.1.bb (limited to 'packages') diff --git a/packages/gcc/gcc-4.0.2/libstdc++-configure.patch b/packages/gcc/gcc-4.0.2/libstdc++-configure.patch new file mode 100644 index 0000000000..8dc613104d --- /dev/null +++ b/packages/gcc/gcc-4.0.2/libstdc++-configure.patch @@ -0,0 +1,10 @@ +--- /tmp/configure 2007-06-02 09:26:29.000000000 +0200 ++++ gcc-4.0.2/libstdc++-v3/configure 2007-06-02 09:26:40.135215000 +0200 +@@ -101472,7 +101472,6 @@ + _ACEOF + + fi +-done + + fi + diff --git a/packages/gcc/gcc-4.2.0/.mtn2git_empty b/packages/gcc/gcc-4.2.0/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/gcc/gcc-4.2.0/100-uclibc-conf.patch b/packages/gcc/gcc-4.2.0/100-uclibc-conf.patch deleted file mode 100644 index 4243ff7b91..0000000000 --- a/packages/gcc/gcc-4.2.0/100-uclibc-conf.patch +++ /dev/null @@ -1,200 +0,0 @@ ---- gcc/libgomp/configure -+++ gcc/libgomp/configure -@@ -3771,7 +3771,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/gcc/config/cris/linux.h -+++ gcc/gcc/config/cris/linux.h -@@ -74,7 +74,11 @@ - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - - #undef CRIS_SUBTARGET_VERSION --#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" -+#if UCLIBC_DEFAULT -+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" -+#else -+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" -+#endif - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - ---- gcc/libstdc++-v3/configure -+++ gcc/libstdc++-v3/configure -@@ -4276,7 +4276,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/zlib/configure -+++ gcc/zlib/configure -@@ -3422,7 +3422,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libobjc/configure -+++ gcc/libobjc/configure -@@ -3309,7 +3309,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libgfortran/configure -+++ gcc/libgfortran/configure -@@ -3695,7 +3695,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libmudflap/configure -+++ gcc/libmudflap/configure -@@ -5378,7 +5378,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/boehm-gc/configure -+++ gcc/boehm-gc/configure -@@ -4316,7 +4316,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libffi/configure -+++ gcc/libffi/configure -@@ -3453,7 +3453,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libssp/configure -+++ gcc/libssp/configure -@@ -4409,7 +4409,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no ---- gcc/libjava/classpath/configure -+++ gcc/libjava/classpath/configure -@@ -4665,7 +4665,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libjava/configure -+++ gcc/libjava/configure -@@ -5212,7 +5212,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libtool.m4 -+++ gcc/libtool.m4 -@@ -739,7 +739,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/ltconfig -+++ gcc/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/packages/gcc/gcc-4.2.0/110-arm-eabi.patch b/packages/gcc/gcc-4.2.0/110-arm-eabi.patch deleted file mode 100644 index acebe5308f..0000000000 --- a/packages/gcc/gcc-4.2.0/110-arm-eabi.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 -+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 -@@ -674,7 +674,7 @@ - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" - tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" - case ${target} in -- arm*-*-linux-gnueabi) -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) - tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" - tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" - # The BPABI long long divmod functions return a 128-bit value in - -diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h ---- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 -+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 -@@ -53,7 +53,11 @@ - /* Use ld-linux.so.3 so that it will be possible to run "classic" - GNU/Linux binaries on an EABI system. */ - #undef LINUX_TARGET_INTERPRETER -+#ifdef USE_UCLIBC -+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" -+#else - #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" -+#endif - - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ diff --git a/packages/gcc/gcc-4.2.0/200-uclibc-locale.patch b/packages/gcc/gcc-4.2.0/200-uclibc-locale.patch deleted file mode 100644 index c933d1c446..0000000000 --- a/packages/gcc/gcc-4.2.0/200-uclibc-locale.patch +++ /dev/null @@ -1,2790 +0,0 @@ ---- gcc/libstdc++-v3/acinclude.m4 -+++ gcc/libstdc++-v3/acinclude.m4 -@@ -1369,7 +1369,7 @@ - AC_MSG_CHECKING([for C locale to use]) - GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], - [use MODEL for target locale package], -- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) -+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) - - # If they didn't use this option switch, or if they specified --enable - # with no specific model, we'll have to look for one. If they -@@ -1385,6 +1385,9 @@ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - AC_EGREP_CPP([_GLIBCXX_ok], [ - #include -@@ -1528,6 +1531,40 @@ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ AC_MSG_RESULT(uclibc) -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ AC_SUBST(glibcxx_MOFILES) -+ AC_SUBST(glibcxx_POFILES) -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the ---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -0,0 +1,63 @@ -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- -+ -+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// Written by Jakub Jelinek -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning clean this up -+#endif -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; -+extern "C" __typeof(strcoll_l) __strcoll_l; -+extern "C" __typeof(strftime_l) __strftime_l; -+extern "C" __typeof(strtod_l) __strtod_l; -+extern "C" __typeof(strtof_l) __strtof_l; -+extern "C" __typeof(strtold_l) __strtold_l; -+extern "C" __typeof(strxfrm_l) __strxfrm_l; -+extern "C" __typeof(newlocale) __newlocale; -+extern "C" __typeof(freelocale) __freelocale; -+extern "C" __typeof(duplocale) __duplocale; -+extern "C" __typeof(uselocale) __uselocale; -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+extern "C" __typeof(iswctype_l) __iswctype_l; -+extern "C" __typeof(towlower_l) __towlower_l; -+extern "C" __typeof(towupper_l) __towupper_l; -+extern "C" __typeof(wcscoll_l) __wcscoll_l; -+extern "C" __typeof(wcsftime_l) __wcsftime_l; -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; -+extern "C" __typeof(wctype_l) __wctype_l; -+#endif -+ -+#endif // GLIBC 2.3 and later ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -0,0 +1,160 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#include // For errno -+#include -+#include -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) -+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) -+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) -+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) -+#define __strtof_l(S, E, L) strtof((S), (E)) -+#define __strtod_l(S, E, L) strtod((S), (E)) -+#define __strtold_l(S, E, L) strtold((S), (E)) -+#warning should dummy __newlocale check for C|POSIX ? -+#define __newlocale(a, b, c) NULL -+#define __freelocale(a) ((void)0) -+#define __duplocale(a) __c_locale() -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ void -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, -+ __c_locale __old) -+ { -+ __cloc = __newlocale(1 << LC_ALL, __s, __old); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ if (!__cloc) -+ { -+ // This named locale is not supported by the underlying OS. -+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " -+ "name not valid")); -+ } -+#endif -+ } -+ -+ void -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) -+ { -+ if (_S_get_c_locale() != __cloc) -+ __freelocale(__cloc); -+ } -+ -+ __c_locale -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc) -+ { return __duplocale(__cloc); } -+} // namespace std -+ -+namespace __gnu_cxx -+{ -+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = -+ { -+ "LC_CTYPE", -+ "LC_NUMERIC", -+ "LC_TIME", -+ "LC_COLLATE", -+ "LC_MONETARY", -+ "LC_MESSAGES", -+#if _GLIBCXX_NUM_CATEGORIES != 0 -+ "LC_PAPER", -+ "LC_NAME", -+ "LC_ADDRESS", -+ "LC_TELEPHONE", -+ "LC_MEASUREMENT", -+ "LC_IDENTIFICATION" -+#endif -+ }; -+} -+ -+namespace std -+{ -+ const char* const* const locale::_S_categories = __gnu_cxx::category_names; -+} // namespace std ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -0,0 +1,117 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifndef _C_LOCALE_H -+#define _C_LOCALE_H 1 -+ -+#pragma GCC system_header -+ -+#include // get std::strlen -+#include // get std::snprintf or std::sprintf -+#include -+#include // For codecvt -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this -+#endif -+#ifdef __UCLIBC_HAS_LOCALE__ -+#include // For codecvt using iconv, iconv_t -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#include // For messages -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning what is _GLIBCXX_C_LOCALE_GNU for -+#endif -+#define _GLIBCXX_C_LOCALE_GNU 1 -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix categories -+#endif -+// #define _GLIBCXX_NUM_CATEGORIES 6 -+#define _GLIBCXX_NUM_CATEGORIES 0 -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+namespace __gnu_cxx -+{ -+ extern "C" __typeof(uselocale) __uselocale; -+} -+#endif -+ -+namespace std -+{ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ typedef __locale_t __c_locale; -+#else -+ typedef int* __c_locale; -+#endif -+ -+ // Convert numeric value of type _Tv to string and return length of -+ // string. If snprintf is available use it, otherwise fall back to -+ // the unsafe sprintf which, in general, can be dangerous and should -+ // be avoided. -+ template -+ int -+ __convert_from_v(char* __out, -+ const int __size __attribute__ ((__unused__)), -+ const char* __fmt, -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ _Tv __v, const __c_locale& __cloc, int __prec) -+ { -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc); -+#else -+ _Tv __v, const __c_locale&, int __prec) -+ { -+# ifdef __UCLIBC_HAS_LOCALE__ -+ char* __old = std::setlocale(LC_ALL, NULL); -+ char* __sav = new char[std::strlen(__old) + 1]; -+ std::strcpy(__sav, __old); -+ std::setlocale(LC_ALL, "C"); -+# endif -+#endif -+ -+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ __gnu_cxx::__uselocale(__old); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ std::setlocale(LC_ALL, __sav); -+ delete [] __sav; -+#endif -+ return __ret; -+ } -+} -+ -+#endif ---- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -@@ -0,0 +1,306 @@ -+// std::codecvt implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+namespace std -+{ -+ // Specializations. -+#ifdef _GLIBCXX_USE_WCHAR_T -+ codecvt_base::result -+ codecvt:: -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // wcsnrtombs is *very* fast but stops if encounters NUL characters: -+ // in case we fall back to wcrtomb and then continue, in a loop. -+ // NB: wcsnrtombs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', -+ __from_end - __from_next); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ const size_t __conv = wcsnrtombs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // wcrtomb. -+ for (; __from < __from_next; ++__from) -+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ extern_type __buf[MB_LEN_MAX]; -+ __tmp_state = __state; -+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); -+ if (__conv > static_cast(__to_end - __to_next)) -+ __ret = partial; -+ else -+ { -+ memcpy(__to_next, __buf, __conv); -+ __state = __tmp_state; -+ __to_next += __conv; -+ ++__from_next; -+ } -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ codecvt_base::result -+ codecvt:: -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we store a L'\0' and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from_next, '\0', -+ __from_end -+ - __from_next)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ size_t __conv = mbsnrtowcs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (;; ++__to_next, __from += __conv) -+ { -+ __conv = mbrtowc(__to_next, __from, __from_end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __from_next = __from; -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ // It is unclear what to return in this case (see DR 382). -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ if (__to_next < __to_end) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from_next; -+ *__to_next++ = L'\0'; -+ } -+ else -+ __ret = partial; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_encoding() const throw() -+ { -+ // XXX This implementation assumes that the encoding is -+ // stateless and is either single-byte or variable-width. -+ int __ret = 0; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ if (MB_CUR_MAX == 1) -+ __ret = 1; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_max_length() const throw() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ // XXX Probably wrong for stateful encodings. -+ int __ret = MB_CUR_MAX; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_length(state_type& __state, const extern_type* __from, -+ const extern_type* __end, size_t __max) const -+ { -+ int __ret = 0; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we advance past it and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ -+ // A dummy internal buffer is needed in order for mbsnrtocws to consider -+ // its fourth parameter (it wouldn't with NULL as first parameter). -+ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) -+ * __max)); -+ while (__from < __end && __max) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from, '\0', -+ __end -+ - __from)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __end; -+ -+ const extern_type* __tmp_from = __from; -+ size_t __conv = mbsnrtowcs(__to, &__from, -+ __from_chunk_end - __from, -+ __max, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (__from = __tmp_from;; __from += __conv) -+ { -+ __conv = mbrtowc(NULL, __from, __end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __state = __tmp_state; -+ __ret += __from - __tmp_from; -+ break; -+ } -+ if (!__from) -+ __from = __from_chunk_end; -+ -+ __ret += __from - __tmp_from; -+ __max -= __conv; -+ -+ if (__from < __end && __max) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from; -+ ++__ret; -+ --__max; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc -@@ -0,0 +1,80 @@ -+// std::collate implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+#endif -+ -+namespace std -+{ -+ // These are basically extensions to char_traits, and perhaps should -+ // be put there instead of here. -+ template<> -+ int -+ collate::_M_compare(const char* __one, const char* __two) const -+ { -+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(char* __to, const char* __from, -+ size_t __n) const -+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ int -+ collate::_M_compare(const wchar_t* __one, -+ const wchar_t* __two) const -+ { -+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(wchar_t* __to, const wchar_t* __from, -+ size_t __n) const -+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -0,0 +1,300 @@ -+// std::ctype implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __wctype_l(S, L) wctype((S)) -+#define __towupper_l(C, L) towupper((C)) -+#define __towlower_l(C, L) towlower((C)) -+#define __iswctype_l(C, M, L) iswctype((C), (M)) -+#endif -+ -+namespace std -+{ -+ // NB: The other ctype specializations are in src/locale.cc and -+ // various /config/os/* files. -+ template<> -+ ctype_byname::ctype_byname(const char* __s, size_t __refs) -+ : ctype(0, false, __refs) -+ { -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_ctype); -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; -+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; -+ this->_M_table = this->_M_c_locale_ctype->__ctype_b; -+#endif -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ ctype::__wmask_type -+ ctype::_M_convert_to_wmask(const mask __m) const -+ { -+ __wmask_type __ret; -+ switch (__m) -+ { -+ case space: -+ __ret = __wctype_l("space", _M_c_locale_ctype); -+ break; -+ case print: -+ __ret = __wctype_l("print", _M_c_locale_ctype); -+ break; -+ case cntrl: -+ __ret = __wctype_l("cntrl", _M_c_locale_ctype); -+ break; -+ case upper: -+ __ret = __wctype_l("upper", _M_c_locale_ctype); -+ break; -+ case lower: -+ __ret = __wctype_l("lower", _M_c_locale_ctype); -+ break; -+ case alpha: -+ __ret = __wctype_l("alpha", _M_c_locale_ctype); -+ break; -+ case digit: -+ __ret = __wctype_l("digit", _M_c_locale_ctype); -+ break; -+ case punct: -+ __ret = __wctype_l("punct", _M_c_locale_ctype); -+ break; -+ case xdigit: -+ __ret = __wctype_l("xdigit", _M_c_locale_ctype); -+ break; -+ case alnum: -+ __ret = __wctype_l("alnum", _M_c_locale_ctype); -+ break; -+ case graph: -+ __ret = __wctype_l("graph", _M_c_locale_ctype); -+ break; -+ default: -+ __ret = __wmask_type(); -+ } -+ return __ret; -+ } -+ -+ wchar_t -+ ctype::do_toupper(wchar_t __c) const -+ { return __towupper_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ wchar_t -+ ctype::do_tolower(wchar_t __c) const -+ { return __towlower_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ bool -+ ctype:: -+ do_is(mask __m, wchar_t __c) const -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ bool __ret = false; -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur] -+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ return __ret; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const -+ { -+ for (; __lo < __hi; ++__vec, ++__lo) -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ mask __m = 0; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ __m |= _M_bit[__bitcur]; -+ *__vec = __m; -+ } -+ return __hi; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi && !this->do_is(__m, *__lo)) -+ ++__lo; -+ return __lo; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const -+ { -+ while (__lo < __hi && this->do_is(__m, *__lo) != 0) -+ ++__lo; -+ return __lo; -+ } -+ -+ wchar_t -+ ctype:: -+ do_widen(char __c) const -+ { return _M_widen[static_cast(__c)]; } -+ -+ const char* -+ ctype:: -+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const -+ { -+ while (__lo < __hi) -+ { -+ *__dest = _M_widen[static_cast(*__lo)]; -+ ++__lo; -+ ++__dest; -+ } -+ return __hi; -+ } -+ -+ char -+ ctype:: -+ do_narrow(wchar_t __wc, char __dfault) const -+ { -+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) -+ return _M_narrow[__wc]; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ const int __c = wctob(__wc); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, -+ char* __dest) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ if (_M_narrow_ok) -+ while (__lo < __hi) -+ { -+ if (*__lo >= 0 && *__lo < 128) -+ *__dest = _M_narrow[*__lo]; -+ else -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ ++__lo; -+ ++__dest; -+ } -+ else -+ while (__lo < __hi) -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ ++__lo; -+ ++__dest; -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __hi; -+ } -+ -+ void -+ ctype::_M_initialize_ctype() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ wint_t __i; -+ for (__i = 0; __i < 128; ++__i) -+ { -+ const int __c = wctob(__i); -+ if (__c == EOF) -+ break; -+ else -+ _M_narrow[__i] = static_cast(__c); -+ } -+ if (__i == 128) -+ _M_narrow_ok = true; -+ else -+ _M_narrow_ok = false; -+ for (size_t __j = 0; -+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) -+ _M_widen[__j] = btowc(__j); -+ -+ for (size_t __k = 0; __k <= 11; ++__k) -+ { -+ _M_bit[__k] = static_cast(_ISbit(__k)); -+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ } -+#endif // _GLIBCXX_USE_WCHAR_T -+} ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc -@@ -0,0 +1,100 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix gettext stuff -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__dcgettext(const char *domainname, -+ const char *msgid, int category); -+#undef gettext -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#else -+#undef gettext -+#define gettext(msgid) (msgid) -+#endif -+ -+namespace std -+{ -+ // Specializations. -+ template<> -+ string -+ messages::do_get(catalog, int, int, const string& __dfault) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ const char* __msg = const_cast(gettext(__dfault.c_str())); -+ __uselocale(__old); -+ return string(__msg); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ const char* __msg = gettext(__dfault.c_str()); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return string(__msg); -+#else -+ const char* __msg = gettext(__dfault.c_str()); -+ return string(__msg); -+#endif -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ wstring -+ messages::do_get(catalog, int, int, const wstring& __dfault) const -+ { -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ __uselocale(__old); -+ return _M_convert_from_char(__msg); -+# elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return _M_convert_from_char(__msg); -+# else -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ return _M_convert_from_char(__msg); -+# endif -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -0,0 +1,118 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix prototypes for *textdomain funcs -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__textdomain(const char *domainname); -+extern "C" char *__bindtextdomain(const char *domainname, -+ const char *dirname); -+#else -+#undef __textdomain -+#undef __bindtextdomain -+#define __textdomain(D) ((void)0) -+#define __bindtextdomain(D,P) ((void)0) -+#endif -+ -+ // Non-virtual member functions. -+ template -+ messages<_CharT>::messages(size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), -+ _M_name_messages(_S_get_c_name()) -+ { } -+ -+ template -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -+ _M_name_messages(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_messages = __tmp; -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::open(const basic_string& __s, const locale& __loc, -+ const char* __dir) const -+ { -+ __bindtextdomain(__s.c_str(), __dir); -+ return this->do_open(__s, __loc); -+ } -+ -+ // Virtual member functions. -+ template -+ messages<_CharT>::~messages() -+ { -+ if (_M_name_messages != _S_get_c_name()) -+ delete [] _M_name_messages; -+ _S_destroy_c_locale(_M_c_locale_messages); -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::do_open(const basic_string& __s, -+ const locale&) const -+ { -+ // No error checking is done, assume the catalog exists and can -+ // be used. -+ __textdomain(__s.c_str()); -+ return 0; -+ } -+ -+ template -+ void -+ messages<_CharT>::do_close(catalog) const -+ { } -+ -+ // messages_byname -+ template -+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) -+ : messages<_CharT>(__refs) -+ { -+ if (this->_M_name_messages != locale::facet::_S_get_c_name()) -+ delete [] this->_M_name_messages; -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ this->_M_name_messages = __tmp; -+ -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_messages); -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s); -+ } -+ } ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -0,0 +1,692 @@ -+// std::moneypunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning optimize this for uclibc -+#warning tailor for stub locale support -+#endif -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ // Construct and return valid pattern consisting of some combination of: -+ // space none symbol sign value -+ money_base::pattern -+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) -+ { -+ pattern __ret; -+ -+ // This insanely complicated routine attempts to construct a valid -+ // pattern for use with monyepunct. A couple of invariants: -+ -+ // if (__precedes) symbol -> value -+ // else value -> symbol -+ -+ // if (__space) space -+ // else none -+ -+ // none == never first -+ // space never first or last -+ -+ // Any elegant implementations of this are welcome. -+ switch (__posn) -+ { -+ case 0: -+ case 1: -+ // 1 The sign precedes the value and symbol. -+ __ret.field[0] = sign; -+ if (__space) -+ { -+ // Pattern starts with sign. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[3] = symbol; -+ } -+ __ret.field[2] = space; -+ } -+ else -+ { -+ // Pattern starts with sign and ends with none. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[3] = none; -+ } -+ break; -+ case 2: -+ // 2 The sign follows the value and symbol. -+ if (__space) -+ { -+ // Pattern either ends with sign. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[1] = space; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ // Pattern ends with sign then none. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[1] = symbol; -+ } -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ break; -+ case 3: -+ // 3 The sign immediately precedes the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = sign; -+ __ret.field[1] = symbol; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = sign; -+ __ret.field[3] = symbol; -+ } -+ else -+ { -+ __ret.field[1] = sign; -+ __ret.field[2] = symbol; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ case 4: -+ // 4 The sign immediately follows the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = sign; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = symbol; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ default: -+ ; -+ } -+ return __ret; -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == true -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == false -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len; -+ __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -0,0 +1,160 @@ -+// std::numpunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, -+ __cloc)); -+ -+ // Check for NULL, which implies no grouping. -+ if (_M_data->_M_thousands_sep == '\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = "true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = "false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = -+ static_cast(__num_base::_S_atoms_out[__i]); -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = -+ static_cast(__num_base::_S_atoms_in[__j]); -+ } -+ else -+ { -+ // Named locale. -+ // NB: In the GNU model wchar_t is always 32 bit wide. -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+ -+ if (_M_data->_M_thousands_sep == L'\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = L"true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = L"false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ #endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -0,0 +1,406 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __timepunct:: -+ _M_put(char* __s, size_t __maxlen, const char* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = strftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = '\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = "%m/%d/%y"; -+ _M_data->_M_date_era_format = "%m/%d/%y"; -+ _M_data->_M_time_format = "%H:%M:%S"; -+ _M_data->_M_time_era_format = "%H:%M:%S"; -+ _M_data->_M_date_time_format = ""; -+ _M_data->_M_date_time_era_format = ""; -+ _M_data->_M_am = "AM"; -+ _M_data->_M_pm = "PM"; -+ _M_data->_M_am_pm_format = ""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = "Sunday"; -+ _M_data->_M_day2 = "Monday"; -+ _M_data->_M_day3 = "Tuesday"; -+ _M_data->_M_day4 = "Wednesday"; -+ _M_data->_M_day5 = "Thursday"; -+ _M_data->_M_day6 = "Friday"; -+ _M_data->_M_day7 = "Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = "Sun"; -+ _M_data->_M_aday2 = "Mon"; -+ _M_data->_M_aday3 = "Tue"; -+ _M_data->_M_aday4 = "Wed"; -+ _M_data->_M_aday5 = "Thu"; -+ _M_data->_M_aday6 = "Fri"; -+ _M_data->_M_aday7 = "Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = "January"; -+ _M_data->_M_month02 = "February"; -+ _M_data->_M_month03 = "March"; -+ _M_data->_M_month04 = "April"; -+ _M_data->_M_month05 = "May"; -+ _M_data->_M_month06 = "June"; -+ _M_data->_M_month07 = "July"; -+ _M_data->_M_month08 = "August"; -+ _M_data->_M_month09 = "September"; -+ _M_data->_M_month10 = "October"; -+ _M_data->_M_month11 = "November"; -+ _M_data->_M_month12 = "December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = "Jan"; -+ _M_data->_M_amonth02 = "Feb"; -+ _M_data->_M_amonth03 = "Mar"; -+ _M_data->_M_amonth04 = "Apr"; -+ _M_data->_M_amonth05 = "May"; -+ _M_data->_M_amonth06 = "Jun"; -+ _M_data->_M_amonth07 = "Jul"; -+ _M_data->_M_amonth08 = "Aug"; -+ _M_data->_M_amonth09 = "Sep"; -+ _M_data->_M_amonth10 = "Oct"; -+ _M_data->_M_amonth11 = "Nov"; -+ _M_data->_M_amonth12 = "Dec"; -+ } -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); -+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); -+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); -+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, -+ __cloc); -+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); -+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); -+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); -+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); -+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); -+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); -+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); -+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); -+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); -+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); -+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); -+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); -+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); -+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); -+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); -+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); -+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); -+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); -+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); -+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); -+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); -+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); -+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); -+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); -+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); -+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); -+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); -+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); -+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); -+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); -+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); -+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); -+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); -+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); -+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); -+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); -+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ __timepunct:: -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); -+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = L'\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+#warning wide time stuff -+// if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = L"%m/%d/%y"; -+ _M_data->_M_date_era_format = L"%m/%d/%y"; -+ _M_data->_M_time_format = L"%H:%M:%S"; -+ _M_data->_M_time_era_format = L"%H:%M:%S"; -+ _M_data->_M_date_time_format = L""; -+ _M_data->_M_date_time_era_format = L""; -+ _M_data->_M_am = L"AM"; -+ _M_data->_M_pm = L"PM"; -+ _M_data->_M_am_pm_format = L""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = L"Sunday"; -+ _M_data->_M_day2 = L"Monday"; -+ _M_data->_M_day3 = L"Tuesday"; -+ _M_data->_M_day4 = L"Wednesday"; -+ _M_data->_M_day5 = L"Thursday"; -+ _M_data->_M_day6 = L"Friday"; -+ _M_data->_M_day7 = L"Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = L"Sun"; -+ _M_data->_M_aday2 = L"Mon"; -+ _M_data->_M_aday3 = L"Tue"; -+ _M_data->_M_aday4 = L"Wed"; -+ _M_data->_M_aday5 = L"Thu"; -+ _M_data->_M_aday6 = L"Fri"; -+ _M_data->_M_aday7 = L"Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = L"January"; -+ _M_data->_M_month02 = L"February"; -+ _M_data->_M_month03 = L"March"; -+ _M_data->_M_month04 = L"April"; -+ _M_data->_M_month05 = L"May"; -+ _M_data->_M_month06 = L"June"; -+ _M_data->_M_month07 = L"July"; -+ _M_data->_M_month08 = L"August"; -+ _M_data->_M_month09 = L"September"; -+ _M_data->_M_month10 = L"October"; -+ _M_data->_M_month11 = L"November"; -+ _M_data->_M_month12 = L"December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = L"Jan"; -+ _M_data->_M_amonth02 = L"Feb"; -+ _M_data->_M_amonth03 = L"Mar"; -+ _M_data->_M_amonth04 = L"Apr"; -+ _M_data->_M_amonth05 = L"May"; -+ _M_data->_M_amonth06 = L"Jun"; -+ _M_data->_M_amonth07 = L"Jul"; -+ _M_data->_M_amonth08 = L"Aug"; -+ _M_data->_M_amonth09 = L"Sep"; -+ _M_data->_M_amonth10 = L"Oct"; -+ _M_data->_M_amonth11 = L"Nov"; -+ _M_data->_M_amonth12 = L"Dec"; -+ } -+#if 0 -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ union { char *__s; wchar_t *__w; } __u; -+ -+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); -+ _M_data->_M_date_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); -+ _M_data->_M_date_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); -+ _M_data->_M_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); -+ _M_data->_M_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); -+ _M_data->_M_am = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); -+ _M_data->_M_pm = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); -+ _M_data->_M_am_pm_format = __u.__w; -+ -+ // Day names, starting with "C"'s Sunday. -+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); -+ _M_data->_M_day1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); -+ _M_data->_M_day2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); -+ _M_data->_M_day3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); -+ _M_data->_M_day4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); -+ _M_data->_M_day5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); -+ _M_data->_M_day6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); -+ _M_data->_M_day7 = __u.__w; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); -+ _M_data->_M_aday1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); -+ _M_data->_M_aday2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); -+ _M_data->_M_aday3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); -+ _M_data->_M_aday4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); -+ _M_data->_M_aday5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); -+ _M_data->_M_aday6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); -+ _M_data->_M_aday7 = __u.__w; -+ -+ // Month names, starting with "C"'s January. -+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); -+ _M_data->_M_month01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); -+ _M_data->_M_month02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); -+ _M_data->_M_month03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); -+ _M_data->_M_month04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); -+ _M_data->_M_month05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); -+ _M_data->_M_month06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); -+ _M_data->_M_month07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); -+ _M_data->_M_month08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); -+ _M_data->_M_month09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); -+ _M_data->_M_month10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); -+ _M_data->_M_month11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); -+ _M_data->_M_month12 = __u.__w; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); -+ _M_data->_M_amonth01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); -+ _M_data->_M_amonth02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); -+ _M_data->_M_amonth03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); -+ _M_data->_M_amonth04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); -+ _M_data->_M_amonth05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); -+ _M_data->_M_amonth06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); -+ _M_data->_M_amonth07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); -+ _M_data->_M_amonth08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); -+ _M_data->_M_amonth09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); -+ _M_data->_M_amonth10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); -+ _M_data->_M_amonth11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); -+ _M_data->_M_amonth12 = __u.__w; -+ } -+#endif // 0 -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.h -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h -@@ -0,0 +1,68 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions -+// -+ -+// Written by Benjamin Kosnik -+ -+ template -+ __timepunct<_CharT>::__timepunct(size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_timepunct = __tmp; -+ _M_initialize_timepunct(__cloc); -+ } -+ -+ template -+ __timepunct<_CharT>::~__timepunct() -+ { -+ if (_M_name_timepunct != _S_get_c_name()) -+ delete [] _M_name_timepunct; -+ delete _M_data; -+ _S_destroy_c_locale(_M_c_locale_timepunct); -+ } ---- gcc/libstdc++-v3/configure -+++ gcc/libstdc++-v3/configure -@@ -5764,7 +5764,7 @@ - enableval="$enable_clocale" - - case "$enableval" in -- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; -+ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; - *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 - echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} - { (exit 1); exit 1; }; } ;; -@@ -5789,6 +5789,9 @@ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ linux-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -@@ -6019,6 +6022,76 @@ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ echo "$as_me:$LINENO: result: uclibc" >&5 -+echo "${ECHO_T}uclibc" >&6 -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ # Extract the first word of "msgfmt", so it can be a program name with args. -+set dummy msgfmt; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$check_msgfmt"; then -+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_check_msgfmt="yes" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" -+fi -+fi -+check_msgfmt=$ac_cv_prog_check_msgfmt -+if test -n "$check_msgfmt"; then -+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 -+echo "${ECHO_T}$check_msgfmt" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ -+ -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the ---- gcc/libstdc++-v3/include/c_compatibility/wchar.h -+++ gcc/libstdc++-v3/include/c_compatibility/wchar.h -@@ -101,7 +101,9 @@ - using std::wmemcpy; - using std::wmemmove; - using std::wmemset; -+#if _GLIBCXX_HAVE_WCSFTIME - using std::wcsftime; -+#endif - - #if _GLIBCXX_USE_C99 - using std::wcstold; ---- gcc/libstdc++-v3/include/c_std/std_cwchar.h -+++ gcc/libstdc++-v3/include/c_std/std_cwchar.h -@@ -182,7 +182,9 @@ - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; -+#if _GLIBCXX_HAVE_WCSFTIME - using ::wcsftime; -+#endif - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; diff --git a/packages/gcc/gcc-4.2.0/300-libstdc++-pic.patch b/packages/gcc/gcc-4.2.0/300-libstdc++-pic.patch deleted file mode 100644 index 89d03a85e5..0000000000 --- a/packages/gcc/gcc-4.2.0/300-libstdc++-pic.patch +++ /dev/null @@ -1,46 +0,0 @@ -# DP: Build and install libstdc++_pic.a library. - ---- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 -+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500 -@@ -214,6 +214,10 @@ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ - - -+install-exec-local: -+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) -+ - # Added bits to build debug library. - if GLIBCXX_BUILD_DEBUG - all-local: build_debug ---- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500 -+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500 -@@ -627,7 +627,7 @@ - - install-data-am: install-data-local - --install-exec-am: install-toolexeclibLTLIBRARIES -+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local - - install-info: install-info-am - -@@ -660,6 +660,7 @@ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-local install-exec \ -+ install-exec-local \ - install-exec-am install-info install-info-am install-man \ - install-strip install-toolexeclibLTLIBRARIES installcheck \ - installcheck-am installdirs maintainer-clean \ -@@ -745,6 +746,11 @@ - install_debug: - (cd ${debugdir} && $(MAKE) \ - toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) -+ -+install-exec-local: -+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: diff --git a/packages/gcc/gcc-4.2.0/301-missing-execinfo_h.patch b/packages/gcc/gcc-4.2.0/301-missing-execinfo_h.patch deleted file mode 100644 index 0e2092f3fb..0000000000 --- a/packages/gcc/gcc-4.2.0/301-missing-execinfo_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 -+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 -@@ -500,7 +500,7 @@ - #ifdef __linux__ - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif diff --git a/packages/gcc/gcc-4.2.0/302-c99-snprintf.patch b/packages/gcc/gcc-4.2.0/302-c99-snprintf.patch deleted file mode 100644 index dfb22d681b..0000000000 --- a/packages/gcc/gcc-4.2.0/302-c99-snprintf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 -+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 -@@ -142,7 +142,7 @@ - using ::vsprintf; - } - --#if _GLIBCXX_USE_C99 -+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) - - #undef snprintf - #undef vfscanf diff --git a/packages/gcc/gcc-4.2.0/303-c99-complex-ugly-hack.patch b/packages/gcc/gcc-4.2.0/303-c99-complex-ugly-hack.patch deleted file mode 100644 index 2ccc80d9bb..0000000000 --- a/packages/gcc/gcc-4.2.0/303-c99-complex-ugly-hack.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 -+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 -@@ -7194,6 +7194,9 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include -+#ifdef __UCLIBC__ -+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs -+#endif - int - main () - { diff --git a/packages/gcc/gcc-4.2.0/304-index_macro.patch b/packages/gcc/gcc-4.2.0/304-index_macro.patch deleted file mode 100644 index d8e476555d..0000000000 --- a/packages/gcc/gcc-4.2.0/304-index_macro.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100 -+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100 -@@ -59,6 +59,9 @@ - #include - #include - -+/* cope w/ index defined as macro, SuSv3 proposal */ -+#undef index -+ - # ifdef __GC - # define __GC_CONST const - # else ---- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100 -+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100 -@@ -53,6 +53,9 @@ - #include // For uninitialized_copy_n - #include // For power - -+/* cope w/ index defined as macro, SuSv3 proposal */ -+#undef index -+ - _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - - using std::size_t; diff --git a/packages/gcc/gcc-4.2.0/602-sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.0/602-sdk-libstdc++-includes.patch deleted file mode 100644 index 23fce7544d..0000000000 --- a/packages/gcc/gcc-4.2.0/602-sdk-libstdc++-includes.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600 -+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500 -@@ -21,5 +21,5 @@ - $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once - - # -I/-D flags to pass when compiling. --AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include - ---- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600 -+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500 -@@ -35,7 +35,7 @@ - - libmath_la_SOURCES = stubs.c - --AM_CPPFLAGS = $(CANADIAN_INCLUDES) -+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include - - # Only compiling "C" sources in this directory. - LIBTOOL = @LIBTOOL@ --tag CC diff --git a/packages/gcc/gcc-4.2.0/740-sh-pr24836.patch b/packages/gcc/gcc-4.2.0/740-sh-pr24836.patch deleted file mode 100644 index 7992282cff..0000000000 --- a/packages/gcc/gcc-4.2.0/740-sh-pr24836.patch +++ /dev/null @@ -1,25 +0,0 @@ -http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 - ---- gcc/gcc/configure.ac (revision 106699) -+++ gcc/gcc/configure.ac (working copy) -@@ -2446,7 +2446,7 @@ - tls_first_minor=14 - tls_as_opt="-m64 -Aesame --fatal-warnings" - ;; -- sh-*-* | sh[34]-*-*) -+ sh-*-* | sh[34]*-*-*) - conftest_s=' - .section ".tdata","awT",@progbits - foo: .long 25 ---- gcc/gcc/configure -+++ gcc/gcc/configure -@@ -14846,7 +14846,7 @@ - tls_first_minor=14 - tls_as_opt="-m64 -Aesame --fatal-warnings" - ;; -- sh-*-* | sh[34]-*-*) -+ sh-*-* | sh[34]*-*-*) - conftest_s=' - .section ".tdata","awT",@progbits - foo: .long 25 diff --git a/packages/gcc/gcc-4.2.0/800-arm-bigendian.patch b/packages/gcc/gcc-4.2.0/800-arm-bigendian.patch deleted file mode 100644 index 07c6093379..0000000000 --- a/packages/gcc/gcc-4.2.0/800-arm-bigendian.patch +++ /dev/null @@ -1,67 +0,0 @@ -By Lennert Buytenhek -Adds support for arm*b-linux* big-endian ARM targets - -See http://gcc.gnu.org/PR16350 - ---- gcc-4.2.0/gcc/config/arm/linux-elf.h -+++ gcc-4.2.0/gcc/config/arm/linux-elf.h -@@ -28,19 +28,33 @@ - #undef TARGET_VERSION - #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); - -+/* -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* -+ * (big endian) configurations. -+ */ -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END -+#define TARGET_ENDIAN_OPTION "mbig-endian" -+#define TARGET_LINKER_EMULATION "armelfb_linux" -+#else -+#define TARGET_ENDIAN_DEFAULT 0 -+#define TARGET_ENDIAN_OPTION "mlittle-endian" -+#define TARGET_LINKER_EMULATION "armelf_linux" -+#endif -+ - #undef TARGET_DEFAULT_FLOAT_ABI - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD - - #undef TARGET_DEFAULT --#define TARGET_DEFAULT (0) -+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) - - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 - --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" - - #undef MULTILIB_DEFAULTS - #define MULTILIB_DEFAULTS \ -- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } - - /* Now we define the strings used to build the spec file. */ - #undef LIB_SPEC -@@ -61,7 +75,7 @@ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - -X \ -- %{mbig-endian:-EB}" \ -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ - SUBTARGET_EXTRA_LINK_SPEC - - #undef LINK_SPEC ---- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200 -+++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200 -@@ -696,6 +696,11 @@ - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" - tmake_file="${tmake_file} t-linux arm/t-arm" - case ${target} in -+ arm*b-*) -+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" -+ ;; -+ esac -+ case ${target} in - arm*-*-linux-*eabi) - tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" - tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" diff --git a/packages/gcc/gcc-4.2.0/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.2.0/801-arm-bigendian-eabi.patch deleted file mode 100644 index 54490fc24f..0000000000 --- a/packages/gcc/gcc-4.2.0/801-arm-bigendian-eabi.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h -=================================================================== ---- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100 -+++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100 -@@ -48,7 +48,8 @@ - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - #undef SUBTARGET_EXTRA_LINK_SPEC --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" -+#define SUBTARGET_EXTRA_LINK_SPEC \ -+ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} " - - /* Use ld-linux.so.3 so that it will be possible to run "classic" - GNU/Linux binaries on an EABI system. */ diff --git a/packages/gcc/gcc-4.2.0/README b/packages/gcc/gcc-4.2.0/README deleted file mode 100644 index b85840dc20..0000000000 --- a/packages/gcc/gcc-4.2.0/README +++ /dev/null @@ -1,4 +0,0 @@ -The numbered patches come from -http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/ -Other patches are locally added to fix things (mostly inherited and reapplied -from gcc 3.4.4 where applicable) diff --git a/packages/gcc/gcc-4.2.0/arm-nolibfloat.patch b/packages/gcc/gcc-4.2.0/arm-nolibfloat.patch deleted file mode 100644 index c4897c0330..0000000000 --- a/packages/gcc/gcc-4.2.0/arm-nolibfloat.patch +++ /dev/null @@ -1,24 +0,0 @@ -# Dimitry Andric , 2004-05-01 -# -# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed -# anymore. (The required functions are now in libgcc.) -# -# Fixes errors like -# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat -# collect2: ld returned 1 exit status -# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 -# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat - -Index: gcc-4.0.2/gcc/config/arm/linux-elf.h -=================================================================== ---- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000 -+++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000 -@@ -56,7 +56,7 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" -+#define LIBGCC_SPEC "-lgcc" - - /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add - the GNU/Linux magical crtbegin.o file (see crtstuff.c) which diff --git a/packages/gcc/gcc-4.2.0/arm-softfloat.patch b/packages/gcc/gcc-4.2.0/arm-softfloat.patch deleted file mode 100644 index c86c83ed15..0000000000 --- a/packages/gcc/gcc-4.2.0/arm-softfloat.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: gcc-4.0.2/gcc/config/arm/t-linux -=================================================================== ---- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000 -+++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000 -@@ -4,7 +4,10 @@ - LIBGCC2_DEBUG_CFLAGS = -g0 - - LIB1ASMSRC = arm/lib1funcs.asm --LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx -+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ -+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -+ _fixsfsi _fixunssfsi _floatdidf _floatdisf - - # MULTILIB_OPTIONS = mhard-float/msoft-float - # MULTILIB_DIRNAMES = hard-float soft-float diff --git a/packages/gcc/gcc-4.2.0/arm-thumb-cache.patch b/packages/gcc/gcc-4.2.0/arm-thumb-cache.patch deleted file mode 100644 index fa63846c8c..0000000000 --- a/packages/gcc/gcc-4.2.0/arm-thumb-cache.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200 -+++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200 -@@ -44,6 +44,7 @@ - - /* Clear the instruction cache from `beg' to `end'. This makes an - inline system call to SYS_cacheflush. */ -+#if !defined(__thumb__) - #define CLEAR_INSN_CACHE(BEG, END) \ - { \ - register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ -@@ -53,3 +54,18 @@ - : "=r" (_beg) \ - : "0" (_beg), "r" (_end), "r" (_flg)); \ - } -+#else -+#define CLEAR_INSN_CACHE(BEG, END) \ -+{ \ -+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ -+ register unsigned long _end __asm ("a2") = (unsigned long) (END); \ -+ register unsigned long _flg __asm ("a3") = 0; \ -+ register unsigned long _swi __asm ("a4") = 0xf0002; \ -+ __asm __volatile ("push {r7}\n" \ -+ " mov r7,a4\n" \ -+ " swi 0 @ sys_cacheflush\n" \ -+ " pop {r7}\n" \ -+ : "=r" (_beg) \ -+ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \ -+} -+#endif diff --git a/packages/gcc/gcc-4.2.0/arm-thumb.patch b/packages/gcc/gcc-4.2.0/arm-thumb.patch deleted file mode 100644 index 69e2f68cf2..0000000000 --- a/packages/gcc/gcc-4.2.0/arm-thumb.patch +++ /dev/null @@ -1,64 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc -+++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm -@@ -995,10 +995,24 @@ - .code 32 - FUNC_START div0 - -+#if ! defined __thumb__ - stmfd sp!, {r1, lr} - mov r0, #SIGFPE - bl SYM(raise) __PLT__ - RETLDM r1 -+#else -+ push {r1, lr} -+ mov r0, #SIGFPE -+ bl SYM(raise) __PLT__ -+#if __ARM_ARCH__ > 4 -+ pop {r1, pc} -+#else -+ @ on 4T that won't work -+ pop {r1} -+ pop {r3} -+ bx r3 -+#endif -+#endif - - FUNC_END div0 - -@@ -1141,11 +1155,12 @@ - code here switches to the correct mode before executing the function. */ - - .text -- .align 0 -+ .align 1 - .force_thumb - - .macro call_via register - THUMB_FUNC_START _call_via_\register -+ .hidden SYM (_call_via_\register) - - bx \register - nop -@@ -1242,6 +1257,7 @@ - .code 16 - - THUMB_FUNC_START _interwork_call_via_\register -+ .hidden SYM (_interwork_call_via_\register) - - bx pc - nop ---- gcc-4.1.1/gcc/config/arm/t-linux~gcc -+++ gcc-4.1.1/gcc/config/arm/t-linux -@@ -7,6 +7,7 @@ - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ - _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ - _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -+ _call_via_rX \ - _fixsfsi _fixunssfsi _floatdidf _floatdisf - - # MULTILIB_OPTIONS = mhard-float/msoft-float diff --git a/packages/gcc/gcc-4.2.0/cache-amnesia.patch b/packages/gcc/gcc-4.2.0/cache-amnesia.patch deleted file mode 100644 index ef7cd111c5..0000000000 --- a/packages/gcc/gcc-4.2.0/cache-amnesia.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/gcc/configure b/gcc/configure -index 44620ab..6e1830c 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -12272,7 +12272,7 @@ else - esac - saved_CFLAGS="${CFLAGS}" - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ -- ${realsrcdir}/configure \ -+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias - CFLAGS="${saved_CFLAGS}" diff --git a/packages/gcc/gcc-4.2.0/fix-ICE-in-arm_unwind_emit_set.diff b/packages/gcc/gcc-4.2.0/fix-ICE-in-arm_unwind_emit_set.diff deleted file mode 100644 index 568e15abff..0000000000 --- a/packages/gcc/gcc-4.2.0/fix-ICE-in-arm_unwind_emit_set.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055 -+++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056 -@@ -15415,6 +15415,15 @@ - /* Move from sp to reg. */ - asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); - } -+ else if (GET_CODE (e1) == PLUS -+ && GET_CODE (XEXP (e1, 0)) == REG -+ && REGNO (XEXP (e1, 0)) == SP_REGNUM -+ && GET_CODE (XEXP (e1, 1)) == CONST_INT) -+ { -+ /* Set reg to offset from sp. */ -+ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", -+ REGNO (e0), (int)INTVAL(XEXP (e1, 1))); -+ } - else - abort (); - break; diff --git a/packages/gcc/gcc-4.2.0/gcc41-configure.in.patch b/packages/gcc/gcc-4.2.0/gcc41-configure.in.patch deleted file mode 100644 index 3d33bcb978..0000000000 --- a/packages/gcc/gcc-4.2.0/gcc41-configure.in.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700 -+++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700 -@@ -1907,7 +1907,7 @@ - *) gxx_include_dir=${with_gxx_include_dir} ;; - esac - --FLAGS_FOR_TARGET= -+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" - case " $target_configdirs " in - *" newlib "*) - case " $target_configargs " in ---- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700 -+++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700 -@@ -2669,7 +2669,7 @@ - *) gxx_include_dir=${with_gxx_include_dir} ;; - esac - --FLAGS_FOR_TARGET= -+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" - case " $target_configdirs " in - *" newlib "*) - case " $target_configargs " in diff --git a/packages/gcc/gcc-4.2.0/ldflags.patch b/packages/gcc/gcc-4.2.0/ldflags.patch deleted file mode 100644 index 9576f60778..0000000000 --- a/packages/gcc/gcc-4.2.0/ldflags.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100 -+++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100 -@@ -334,7 +334,7 @@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) - LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates --LDFLAGS_FOR_TARGET = -+LDFLAGS_FOR_TARGET = @LDFLAGS@ - PICFLAG_FOR_TARGET = - - # ------------------------------------ ---- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100 -+++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100 -@@ -337,7 +337,7 @@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) - LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates --LDFLAGS_FOR_TARGET = -+LDFLAGS_FOR_TARGET = @LDFLAGS@ - PICFLAG_FOR_TARGET = - - # ------------------------------------ diff --git a/packages/gcc/gcc-4.2.0/sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.0/sdk-libstdc++-includes.patch deleted file mode 100644 index 4377c2143b..0000000000 --- a/packages/gcc/gcc-4.2.0/sdk-libstdc++-includes.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100 -+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100 -@@ -32,7 +32,7 @@ - - libmath_la_SOURCES = stubs.c - --AM_CPPFLAGS = $(CANADIAN_INCLUDES) -+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include - - # Only compiling "C" sources in this directory. - LIBTOOL = @LIBTOOL@ --tag CC ---- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100 -+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100 -@@ -18,7 +18,7 @@ - $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once - - # -I/-D flags to pass when compiling. --AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include - - - diff --git a/packages/gcc/gcc-4.2.0/sh3-installfix-fixheaders.patch b/packages/gcc/gcc-4.2.0/sh3-installfix-fixheaders.patch deleted file mode 100644 index a06cd2e075..0000000000 --- a/packages/gcc/gcc-4.2.0/sh3-installfix-fixheaders.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000 -+++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000 -@@ -3772,8 +3772,6 @@ - $(INSTALL_SCRIPT) $(mkinstalldirs) \ - $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ - $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ -- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \ -- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ - else :; fi - echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \ - > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf diff --git a/packages/gcc/gcc-4.2.0/unbreak-armv4t.patch b/packages/gcc/gcc-4.2.0/unbreak-armv4t.patch deleted file mode 100644 index b3399abfdb..0000000000 --- a/packages/gcc/gcc-4.2.0/unbreak-armv4t.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h ---- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700 -+++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700 -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - #undef SUBTARGET_EXTRA_LINK_SPEC - #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" diff --git a/packages/gcc/gcc-4.2.0/zecke-no-host-includes.patch b/packages/gcc/gcc-4.2.0/zecke-no-host-includes.patch deleted file mode 100644 index 6afb10d6ef..0000000000 --- a/packages/gcc/gcc-4.2.0/zecke-no-host-includes.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: gcc-4.0.2/gcc/c-incpath.c -=================================================================== ---- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100 -+++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200 -@@ -350,6 +350,26 @@ - p->construct = 0; - p->user_supplied_p = user_supplied_p; - -+#ifdef CROSS_COMPILE -+ /* A common error when cross compiling is including -+ host headers. This code below will try to fail fast -+ for cross compiling. Currently we consider /usr/include, -+ /opt/include and /sw/include as harmful. */ -+ { -+ /* printf("Adding Path: %s\n", p->name ); */ -+ if( strstr(p->name, "/usr/include" ) == p->name ) { -+ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name); -+ abort(); -+ } else if( strstr(p->name, "/sw/include") == p->name ) { -+ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name); -+ abort(); -+ } else if( strstr(p->name, "/opt/include") == p->name ) { -+ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name); -+ abort(); -+ } -+ } -+#endif -+ - add_cpp_dir_path (p, chain); - } - diff --git a/packages/gcc/gcc-4.2.0/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.0/zecke-xgcc-cpp.patch deleted file mode 100644 index 42ec190600..0000000000 --- a/packages/gcc/gcc-4.2.0/zecke-xgcc-cpp.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: gcc-4.1.1/Makefile.in -=================================================================== ---- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200 -+++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200 -@@ -194,6 +194,7 @@ - AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ - CC="$(CC_FOR_TARGET)"; export CC; \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ -+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \ - CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ - CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ diff --git a/packages/gcc/gcc-4.2.1/.mtn2git_empty b/packages/gcc/gcc-4.2.1/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/gcc/gcc-4.2.1/100-uclibc-conf.patch b/packages/gcc/gcc-4.2.1/100-uclibc-conf.patch new file mode 100644 index 0000000000..4243ff7b91 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/100-uclibc-conf.patch @@ -0,0 +1,200 @@ +--- gcc/libgomp/configure ++++ gcc/libgomp/configure +@@ -3771,7 +3771,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/gcc/config/cris/linux.h ++++ gcc/gcc/config/cris/linux.h +@@ -74,7 +74,11 @@ + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + + #undef CRIS_SUBTARGET_VERSION +-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" ++#if UCLIBC_DEFAULT ++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" ++#else ++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" ++#endif + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +--- gcc/libstdc++-v3/configure ++++ gcc/libstdc++-v3/configure +@@ -4276,7 +4276,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/zlib/configure ++++ gcc/zlib/configure +@@ -3422,7 +3422,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libobjc/configure ++++ gcc/libobjc/configure +@@ -3309,7 +3309,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libgfortran/configure ++++ gcc/libgfortran/configure +@@ -3695,7 +3695,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libmudflap/configure ++++ gcc/libmudflap/configure +@@ -5378,7 +5378,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/boehm-gc/configure ++++ gcc/boehm-gc/configure +@@ -4316,7 +4316,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libffi/configure ++++ gcc/libffi/configure +@@ -3453,7 +3453,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libssp/configure ++++ gcc/libssp/configure +@@ -4409,7 +4409,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +--- gcc/libjava/classpath/ltconfig ++++ gcc/libjava/classpath/ltconfig +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no +--- gcc/libjava/classpath/configure ++++ gcc/libjava/classpath/configure +@@ -4665,7 +4665,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libjava/configure ++++ gcc/libjava/configure +@@ -5212,7 +5212,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libtool.m4 ++++ gcc/libtool.m4 +@@ -739,7 +739,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/ltconfig ++++ gcc/ltconfig +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/packages/gcc/gcc-4.2.1/110-arm-eabi.patch b/packages/gcc/gcc-4.2.1/110-arm-eabi.patch new file mode 100644 index 0000000000..acebe5308f --- /dev/null +++ b/packages/gcc/gcc-4.2.1/110-arm-eabi.patch @@ -0,0 +1,27 @@ +--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 ++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 +@@ -674,7 +674,7 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" + case ${target} in +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" + # The BPABI long long divmod functions return a 128-bit value in + +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 +@@ -53,7 +53,11 @@ + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ + #undef LINUX_TARGET_INTERPRETER ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" ++#endif + + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ diff --git a/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch b/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch new file mode 100644 index 0000000000..c933d1c446 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch @@ -0,0 +1,2790 @@ +--- gcc/libstdc++-v3/acinclude.m4 ++++ gcc/libstdc++-v3/acinclude.m4 +@@ -1369,7 +1369,7 @@ + AC_MSG_CHECKING([for C locale to use]) + GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + [use MODEL for target locale package], +- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) + + # If they didn't use this option switch, or if they specified --enable + # with no specific model, we'll have to look for one. If they +@@ -1385,6 +1385,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ *-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include +@@ -1528,6 +1531,40 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h ++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +@@ -0,0 +1,63 @@ ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ++ ++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// Written by Jakub Jelinek ++ ++#include ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning clean this up ++#endif ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; ++extern "C" __typeof(strcoll_l) __strcoll_l; ++extern "C" __typeof(strftime_l) __strftime_l; ++extern "C" __typeof(strtod_l) __strtod_l; ++extern "C" __typeof(strtof_l) __strtof_l; ++extern "C" __typeof(strtold_l) __strtold_l; ++extern "C" __typeof(strxfrm_l) __strxfrm_l; ++extern "C" __typeof(newlocale) __newlocale; ++extern "C" __typeof(freelocale) __freelocale; ++extern "C" __typeof(duplocale) __duplocale; ++extern "C" __typeof(uselocale) __uselocale; ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++extern "C" __typeof(iswctype_l) __iswctype_l; ++extern "C" __typeof(towlower_l) __towlower_l; ++extern "C" __typeof(towupper_l) __towupper_l; ++extern "C" __typeof(wcscoll_l) __wcscoll_l; ++extern "C" __typeof(wcsftime_l) __wcsftime_l; ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; ++extern "C" __typeof(wctype_l) __wctype_l; ++#endif ++ ++#endif // GLIBC 2.3 and later +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc +@@ -0,0 +1,160 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik ++ ++#include // For errno ++#include ++#include ++#include ++#include ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) ++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) ++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) ++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) ++#define __strtof_l(S, E, L) strtof((S), (E)) ++#define __strtod_l(S, E, L) strtod((S), (E)) ++#define __strtold_l(S, E, L) strtold((S), (E)) ++#warning should dummy __newlocale check for C|POSIX ? ++#define __newlocale(a, b, c) NULL ++#define __freelocale(a) ((void)0) ++#define __duplocale(a) __c_locale() ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ float __f = __strtof_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __f; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ double __d = __strtod_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __d; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ long double __ld = __strtold_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __ld; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ void ++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, ++ __c_locale __old) ++ { ++ __cloc = __newlocale(1 << LC_ALL, __s, __old); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ if (!__cloc) ++ { ++ // This named locale is not supported by the underlying OS. ++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " ++ "name not valid")); ++ } ++#endif ++ } ++ ++ void ++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) ++ { ++ if (_S_get_c_locale() != __cloc) ++ __freelocale(__cloc); ++ } ++ ++ __c_locale ++ locale::facet::_S_clone_c_locale(__c_locale& __cloc) ++ { return __duplocale(__cloc); } ++} // namespace std ++ ++namespace __gnu_cxx ++{ ++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = ++ { ++ "LC_CTYPE", ++ "LC_NUMERIC", ++ "LC_TIME", ++ "LC_COLLATE", ++ "LC_MONETARY", ++ "LC_MESSAGES", ++#if _GLIBCXX_NUM_CATEGORIES != 0 ++ "LC_PAPER", ++ "LC_NAME", ++ "LC_ADDRESS", ++ "LC_TELEPHONE", ++ "LC_MEASUREMENT", ++ "LC_IDENTIFICATION" ++#endif ++ }; ++} ++ ++namespace std ++{ ++ const char* const* const locale::_S_categories = __gnu_cxx::category_names; ++} // namespace std +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h +@@ -0,0 +1,117 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik ++ ++#ifndef _C_LOCALE_H ++#define _C_LOCALE_H 1 ++ ++#pragma GCC system_header ++ ++#include // get std::strlen ++#include // get std::snprintf or std::sprintf ++#include ++#include // For codecvt ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC_HAS_LOCALE__ ++#include // For codecvt using iconv, iconv_t ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#include // For messages ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning what is _GLIBCXX_C_LOCALE_GNU for ++#endif ++#define _GLIBCXX_C_LOCALE_GNU 1 ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix categories ++#endif ++// #define _GLIBCXX_NUM_CATEGORIES 6 ++#define _GLIBCXX_NUM_CATEGORIES 0 ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++namespace __gnu_cxx ++{ ++ extern "C" __typeof(uselocale) __uselocale; ++} ++#endif ++ ++namespace std ++{ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ typedef __locale_t __c_locale; ++#else ++ typedef int* __c_locale; ++#endif ++ ++ // Convert numeric value of type _Tv to string and return length of ++ // string. If snprintf is available use it, otherwise fall back to ++ // the unsafe sprintf which, in general, can be dangerous and should ++ // be avoided. ++ template ++ int ++ __convert_from_v(char* __out, ++ const int __size __attribute__ ((__unused__)), ++ const char* __fmt, ++#ifdef __UCLIBC_HAS_XCLOCALE__ ++ _Tv __v, const __c_locale& __cloc, int __prec) ++ { ++ __c_locale __old = __gnu_cxx::__uselocale(__cloc); ++#else ++ _Tv __v, const __c_locale&, int __prec) ++ { ++# ifdef __UCLIBC_HAS_LOCALE__ ++ char* __old = std::setlocale(LC_ALL, NULL); ++ char* __sav = new char[std::strlen(__old) + 1]; ++ std::strcpy(__sav, __old); ++ std::setlocale(LC_ALL, "C"); ++# endif ++#endif ++ ++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); ++ ++#ifdef __UCLIBC_HAS_XCLOCALE__ ++ __gnu_cxx::__uselocale(__old); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ std::setlocale(LC_ALL, __sav); ++ delete [] __sav; ++#endif ++ return __ret; ++ } ++} ++ ++#endif +--- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc +@@ -0,0 +1,306 @@ ++// std::codecvt implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++namespace std ++{ ++ // Specializations. ++#ifdef _GLIBCXX_USE_WCHAR_T ++ codecvt_base::result ++ codecvt:: ++ do_out(state_type& __state, const intern_type* __from, ++ const intern_type* __from_end, const intern_type*& __from_next, ++ extern_type* __to, extern_type* __to_end, ++ extern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // wcsnrtombs is *very* fast but stops if encounters NUL characters: ++ // in case we fall back to wcrtomb and then continue, in a loop. ++ // NB: wcsnrtombs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', ++ __from_end - __from_next); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ const size_t __conv = wcsnrtombs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // wcrtomb. ++ for (; __from < __from_next; ++__from) ++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ extern_type __buf[MB_LEN_MAX]; ++ __tmp_state = __state; ++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); ++ if (__conv > static_cast(__to_end - __to_next)) ++ __ret = partial; ++ else ++ { ++ memcpy(__to_next, __buf, __conv); ++ __state = __tmp_state; ++ __to_next += __conv; ++ ++__from_next; ++ } ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ codecvt_base::result ++ codecvt:: ++ do_in(state_type& __state, const extern_type* __from, ++ const extern_type* __from_end, const extern_type*& __from_next, ++ intern_type* __to, intern_type* __to_end, ++ intern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we store a L'\0' and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast(memchr(__from_next, '\0', ++ __from_end ++ - __from_next)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ size_t __conv = mbsnrtowcs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (;; ++__to_next, __from += __conv) ++ { ++ __conv = mbrtowc(__to_next, __from, __from_end - __from, ++ &__tmp_state); ++ if (__conv == static_cast(-1) ++ || __conv == static_cast(-2)) ++ break; ++ } ++ __from_next = __from; ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ // It is unclear what to return in this case (see DR 382). ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ if (__to_next < __to_end) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from_next; ++ *__to_next++ = L'\0'; ++ } ++ else ++ __ret = partial; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ int ++ codecvt:: ++ do_encoding() const throw() ++ { ++ // XXX This implementation assumes that the encoding is ++ // stateless and is either single-byte or variable-width. ++ int __ret = 0; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ if (MB_CUR_MAX == 1) ++ __ret = 1; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt:: ++ do_max_length() const throw() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ // XXX Probably wrong for stateful encodings. ++ int __ret = MB_CUR_MAX; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt:: ++ do_length(state_type& __state, const extern_type* __from, ++ const extern_type* __end, size_t __max) const ++ { ++ int __ret = 0; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we advance past it and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ ++ // A dummy internal buffer is needed in order for mbsnrtocws to consider ++ // its fourth parameter (it wouldn't with NULL as first parameter). ++ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) ++ * __max)); ++ while (__from < __end && __max) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast(memchr(__from, '\0', ++ __end ++ - __from)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __end; ++ ++ const extern_type* __tmp_from = __from; ++ size_t __conv = mbsnrtowcs(__to, &__from, ++ __from_chunk_end - __from, ++ __max, &__state); ++ if (__conv == static_cast(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (__from = __tmp_from;; __from += __conv) ++ { ++ __conv = mbrtowc(NULL, __from, __end - __from, ++ &__tmp_state); ++ if (__conv == static_cast(-1) ++ || __conv == static_cast(-2)) ++ break; ++ } ++ __state = __tmp_state; ++ __ret += __from - __tmp_from; ++ break; ++ } ++ if (!__from) ++ __from = __from_chunk_end; ++ ++ __ret += __from - __tmp_from; ++ __max -= __conv; ++ ++ if (__from < __end && __max) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from; ++ ++__ret; ++ --__max; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++#endif ++} +--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc +@@ -0,0 +1,80 @@ ++// std::collate implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) ++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) ++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) ++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) ++#endif ++ ++namespace std ++{ ++ // These are basically extensions to char_traits, and perhaps should ++ // be put there instead of here. ++ template<> ++ int ++ collate::_M_compare(const char* __one, const char* __two) const ++ { ++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate::_M_transform(char* __to, const char* __from, ++ size_t __n) const ++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ int ++ collate::_M_compare(const wchar_t* __one, ++ const wchar_t* __two) const ++ { ++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate::_M_transform(wchar_t* __to, const wchar_t* __from, ++ size_t __n) const ++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++#endif ++} +--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc +@@ -0,0 +1,300 @@ ++// std::ctype implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. ++// ++ ++// Written by Benjamin Kosnik ++ ++#define _LIBC ++#include ++#undef _LIBC ++#include ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __wctype_l(S, L) wctype((S)) ++#define __towupper_l(C, L) towupper((C)) ++#define __towlower_l(C, L) towlower((C)) ++#define __iswctype_l(C, M, L) iswctype((C), (M)) ++#endif ++ ++namespace std ++{ ++ // NB: The other ctype specializations are in src/locale.cc and ++ // various /config/os/* files. ++ template<> ++ ctype_byname::ctype_byname(const char* __s, size_t __refs) ++ : ctype(0, false, __refs) ++ { ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_ctype); ++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; ++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; ++ this->_M_table = this->_M_c_locale_ctype->__ctype_b; ++#endif ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ ctype::__wmask_type ++ ctype::_M_convert_to_wmask(const mask __m) const ++ { ++ __wmask_type __ret; ++ switch (__m) ++ { ++ case space: ++ __ret = __wctype_l("space", _M_c_locale_ctype); ++ break; ++ case print: ++ __ret = __wctype_l("print", _M_c_locale_ctype); ++ break; ++ case cntrl: ++ __ret = __wctype_l("cntrl", _M_c_locale_ctype); ++ break; ++ case upper: ++ __ret = __wctype_l("upper", _M_c_locale_ctype); ++ break; ++ case lower: ++ __ret = __wctype_l("lower", _M_c_locale_ctype); ++ break; ++ case alpha: ++ __ret = __wctype_l("alpha", _M_c_locale_ctype); ++ break; ++ case digit: ++ __ret = __wctype_l("digit", _M_c_locale_ctype); ++ break; ++ case punct: ++ __ret = __wctype_l("punct", _M_c_locale_ctype); ++ break; ++ case xdigit: ++ __ret = __wctype_l("xdigit", _M_c_locale_ctype); ++ break; ++ case alnum: ++ __ret = __wctype_l("alnum", _M_c_locale_ctype); ++ break; ++ case graph: ++ __ret = __wctype_l("graph", _M_c_locale_ctype); ++ break; ++ default: ++ __ret = __wmask_type(); ++ } ++ return __ret; ++ } ++ ++ wchar_t ++ ctype::do_toupper(wchar_t __c) const ++ { return __towupper_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ wchar_t ++ ctype::do_tolower(wchar_t __c) const ++ { return __towlower_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ bool ++ ctype:: ++ do_is(mask __m, wchar_t __c) const ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ bool __ret = false; ++ const size_t __bitmasksize = 11; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__m & _M_bit[__bitcur] ++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ { ++ __ret = true; ++ break; ++ } ++ return __ret; ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ++ { ++ for (; __lo < __hi; ++__vec, ++__lo) ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ mask __m = 0; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ __m |= _M_bit[__bitcur]; ++ *__vec = __m; ++ } ++ return __hi; ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi && !this->do_is(__m, *__lo)) ++ ++__lo; ++ return __lo; ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const ++ { ++ while (__lo < __hi && this->do_is(__m, *__lo) != 0) ++ ++__lo; ++ return __lo; ++ } ++ ++ wchar_t ++ ctype:: ++ do_widen(char __c) const ++ { return _M_widen[static_cast(__c)]; } ++ ++ const char* ++ ctype:: ++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const ++ { ++ while (__lo < __hi) ++ { ++ *__dest = _M_widen[static_cast(*__lo)]; ++ ++__lo; ++ ++__dest; ++ } ++ return __hi; ++ } ++ ++ char ++ ctype:: ++ do_narrow(wchar_t __wc, char __dfault) const ++ { ++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) ++ return _M_narrow[__wc]; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ const int __c = wctob(__wc); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return (__c == EOF ? __dfault : static_cast(__c)); ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, ++ char* __dest) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ if (_M_narrow_ok) ++ while (__lo < __hi) ++ { ++ if (*__lo >= 0 && *__lo < 128) ++ *__dest = _M_narrow[*__lo]; ++ else ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast(__c)); ++ } ++ ++__lo; ++ ++__dest; ++ } ++ else ++ while (__lo < __hi) ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast(__c)); ++ ++__lo; ++ ++__dest; ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __hi; ++ } ++ ++ void ++ ctype::_M_initialize_ctype() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ wint_t __i; ++ for (__i = 0; __i < 128; ++__i) ++ { ++ const int __c = wctob(__i); ++ if (__c == EOF) ++ break; ++ else ++ _M_narrow[__i] = static_cast(__c); ++ } ++ if (__i == 128) ++ _M_narrow_ok = true; ++ else ++ _M_narrow_ok = false; ++ for (size_t __j = 0; ++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) ++ _M_widen[__j] = btowc(__j); ++ ++ for (size_t __k = 0; __k <= 11; ++__k) ++ { ++ _M_bit[__k] = static_cast(_ISbit(__k)); ++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++#endif // _GLIBCXX_USE_WCHAR_T ++} +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc +@@ -0,0 +1,100 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix gettext stuff ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__dcgettext(const char *domainname, ++ const char *msgid, int category); ++#undef gettext ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) ++#else ++#undef gettext ++#define gettext(msgid) (msgid) ++#endif ++ ++namespace std ++{ ++ // Specializations. ++ template<> ++ string ++ messages::do_get(catalog, int, int, const string& __dfault) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ const char* __msg = const_cast(gettext(__dfault.c_str())); ++ __uselocale(__old); ++ return string(__msg); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ const char* __msg = gettext(__dfault.c_str()); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return string(__msg); ++#else ++ const char* __msg = gettext(__dfault.c_str()); ++ return string(__msg); ++#endif ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ wstring ++ messages::do_get(catalog, int, int, const wstring& __dfault) const ++ { ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ __uselocale(__old); ++ return _M_convert_from_char(__msg); ++# elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return _M_convert_from_char(__msg); ++# else ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ return _M_convert_from_char(__msg); ++# endif ++ } ++#endif ++} +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h +@@ -0,0 +1,118 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix prototypes for *textdomain funcs ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__textdomain(const char *domainname); ++extern "C" char *__bindtextdomain(const char *domainname, ++ const char *dirname); ++#else ++#undef __textdomain ++#undef __bindtextdomain ++#define __textdomain(D) ((void)0) ++#define __bindtextdomain(D,P) ((void)0) ++#endif ++ ++ // Non-virtual member functions. ++ template ++ messages<_CharT>::messages(size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ++ _M_name_messages(_S_get_c_name()) ++ { } ++ ++ template ++ messages<_CharT>::messages(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), ++ _M_name_messages(__s) ++ { ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ _M_name_messages = __tmp; ++ } ++ ++ template ++ typename messages<_CharT>::catalog ++ messages<_CharT>::open(const basic_string& __s, const locale& __loc, ++ const char* __dir) const ++ { ++ __bindtextdomain(__s.c_str(), __dir); ++ return this->do_open(__s, __loc); ++ } ++ ++ // Virtual member functions. ++ template ++ messages<_CharT>::~messages() ++ { ++ if (_M_name_messages != _S_get_c_name()) ++ delete [] _M_name_messages; ++ _S_destroy_c_locale(_M_c_locale_messages); ++ } ++ ++ template ++ typename messages<_CharT>::catalog ++ messages<_CharT>::do_open(const basic_string& __s, ++ const locale&) const ++ { ++ // No error checking is done, assume the catalog exists and can ++ // be used. ++ __textdomain(__s.c_str()); ++ return 0; ++ } ++ ++ template ++ void ++ messages<_CharT>::do_close(catalog) const ++ { } ++ ++ // messages_byname ++ template ++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) ++ : messages<_CharT>(__refs) ++ { ++ if (this->_M_name_messages != locale::facet::_S_get_c_name()) ++ delete [] this->_M_name_messages; ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ this->_M_name_messages = __tmp; ++ ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_messages); ++ this->_S_create_c_locale(this->_M_c_locale_messages, __s); ++ } ++ } +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc +@@ -0,0 +1,692 @@ ++// std::moneypunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#define _LIBC ++#include ++#undef _LIBC ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning optimize this for uclibc ++#warning tailor for stub locale support ++#endif ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ // Construct and return valid pattern consisting of some combination of: ++ // space none symbol sign value ++ money_base::pattern ++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) ++ { ++ pattern __ret; ++ ++ // This insanely complicated routine attempts to construct a valid ++ // pattern for use with monyepunct. A couple of invariants: ++ ++ // if (__precedes) symbol -> value ++ // else value -> symbol ++ ++ // if (__space) space ++ // else none ++ ++ // none == never first ++ // space never first or last ++ ++ // Any elegant implementations of this are welcome. ++ switch (__posn) ++ { ++ case 0: ++ case 1: ++ // 1 The sign precedes the value and symbol. ++ __ret.field[0] = sign; ++ if (__space) ++ { ++ // Pattern starts with sign. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[3] = symbol; ++ } ++ __ret.field[2] = space; ++ } ++ else ++ { ++ // Pattern starts with sign and ends with none. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[3] = none; ++ } ++ break; ++ case 2: ++ // 2 The sign follows the value and symbol. ++ if (__space) ++ { ++ // Pattern either ends with sign. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[1] = space; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ // Pattern ends with sign then none. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[1] = symbol; ++ } ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ break; ++ case 3: ++ // 3 The sign immediately precedes the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = sign; ++ __ret.field[1] = symbol; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = sign; ++ __ret.field[3] = symbol; ++ } ++ else ++ { ++ __ret.field[1] = sign; ++ __ret.field[2] = symbol; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ case 4: ++ // 4 The sign immediately follows the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = sign; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = symbol; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ default: ++ ; ++ } ++ return __ret; ++ } ++ ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == true ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == false ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { delete _M_data; } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = ++ static_cast(money_base::_S_atoms[__i]); ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = ++ static_cast(money_base::_S_atoms[__i]); ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len; ++ __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++#endif ++} +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc +@@ -0,0 +1,160 @@ ++// std::numpunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#define _LIBC ++#include ++#undef _LIBC ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ numpunct::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ++ __cloc)); ++ ++ // Check for NULL, which implies no grouping. ++ if (_M_data->_M_thousands_sep == '\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = "true"; ++ _M_data->_M_truename_size = 4; ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = "false"; ++ _M_data->_M_falsename_size = 5; ++ } ++ ++ template<> ++ numpunct::~numpunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ numpunct::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = ++ static_cast(__num_base::_S_atoms_out[__i]); ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = ++ static_cast(__num_base::_S_atoms_in[__j]); ++ } ++ else ++ { ++ // Named locale. ++ // NB: In the GNU model wchar_t is always 32 bit wide. ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++ ++ if (_M_data->_M_thousands_sep == L'\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = L"true"; ++ _M_data->_M_truename_size = 4; ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = L"false"; ++ _M_data->_M_falsename_size = 5; ++ } ++ ++ template<> ++ numpunct::~numpunct() ++ { delete _M_data; } ++ #endif ++} +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc +@@ -0,0 +1,406 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __timepunct:: ++ _M_put(char* __s, size_t __maxlen, const char* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = strftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = '\0'; ++ } ++ ++ template<> ++ void ++ __timepunct::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = "%m/%d/%y"; ++ _M_data->_M_date_era_format = "%m/%d/%y"; ++ _M_data->_M_time_format = "%H:%M:%S"; ++ _M_data->_M_time_era_format = "%H:%M:%S"; ++ _M_data->_M_date_time_format = ""; ++ _M_data->_M_date_time_era_format = ""; ++ _M_data->_M_am = "AM"; ++ _M_data->_M_pm = "PM"; ++ _M_data->_M_am_pm_format = ""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = "Sunday"; ++ _M_data->_M_day2 = "Monday"; ++ _M_data->_M_day3 = "Tuesday"; ++ _M_data->_M_day4 = "Wednesday"; ++ _M_data->_M_day5 = "Thursday"; ++ _M_data->_M_day6 = "Friday"; ++ _M_data->_M_day7 = "Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = "Sun"; ++ _M_data->_M_aday2 = "Mon"; ++ _M_data->_M_aday3 = "Tue"; ++ _M_data->_M_aday4 = "Wed"; ++ _M_data->_M_aday5 = "Thu"; ++ _M_data->_M_aday6 = "Fri"; ++ _M_data->_M_aday7 = "Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = "January"; ++ _M_data->_M_month02 = "February"; ++ _M_data->_M_month03 = "March"; ++ _M_data->_M_month04 = "April"; ++ _M_data->_M_month05 = "May"; ++ _M_data->_M_month06 = "June"; ++ _M_data->_M_month07 = "July"; ++ _M_data->_M_month08 = "August"; ++ _M_data->_M_month09 = "September"; ++ _M_data->_M_month10 = "October"; ++ _M_data->_M_month11 = "November"; ++ _M_data->_M_month12 = "December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = "Jan"; ++ _M_data->_M_amonth02 = "Feb"; ++ _M_data->_M_amonth03 = "Mar"; ++ _M_data->_M_amonth04 = "Apr"; ++ _M_data->_M_amonth05 = "May"; ++ _M_data->_M_amonth06 = "Jun"; ++ _M_data->_M_amonth07 = "Jul"; ++ _M_data->_M_amonth08 = "Aug"; ++ _M_data->_M_amonth09 = "Sep"; ++ _M_data->_M_amonth10 = "Oct"; ++ _M_data->_M_amonth11 = "Nov"; ++ _M_data->_M_amonth12 = "Dec"; ++ } ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); ++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); ++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); ++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, ++ __cloc); ++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); ++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); ++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); ++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); ++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); ++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); ++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); ++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); ++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); ++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); ++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); ++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); ++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); ++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); ++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); ++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); ++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); ++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); ++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); ++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); ++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); ++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); ++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); ++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); ++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); ++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); ++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); ++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); ++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); ++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); ++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); ++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); ++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); ++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); ++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); ++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); ++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ __timepunct:: ++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); ++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = L'\0'; ++ } ++ ++ template<> ++ void ++ __timepunct::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache; ++ ++#warning wide time stuff ++// if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = L"%m/%d/%y"; ++ _M_data->_M_date_era_format = L"%m/%d/%y"; ++ _M_data->_M_time_format = L"%H:%M:%S"; ++ _M_data->_M_time_era_format = L"%H:%M:%S"; ++ _M_data->_M_date_time_format = L""; ++ _M_data->_M_date_time_era_format = L""; ++ _M_data->_M_am = L"AM"; ++ _M_data->_M_pm = L"PM"; ++ _M_data->_M_am_pm_format = L""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = L"Sunday"; ++ _M_data->_M_day2 = L"Monday"; ++ _M_data->_M_day3 = L"Tuesday"; ++ _M_data->_M_day4 = L"Wednesday"; ++ _M_data->_M_day5 = L"Thursday"; ++ _M_data->_M_day6 = L"Friday"; ++ _M_data->_M_day7 = L"Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = L"Sun"; ++ _M_data->_M_aday2 = L"Mon"; ++ _M_data->_M_aday3 = L"Tue"; ++ _M_data->_M_aday4 = L"Wed"; ++ _M_data->_M_aday5 = L"Thu"; ++ _M_data->_M_aday6 = L"Fri"; ++ _M_data->_M_aday7 = L"Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = L"January"; ++ _M_data->_M_month02 = L"February"; ++ _M_data->_M_month03 = L"March"; ++ _M_data->_M_month04 = L"April"; ++ _M_data->_M_month05 = L"May"; ++ _M_data->_M_month06 = L"June"; ++ _M_data->_M_month07 = L"July"; ++ _M_data->_M_month08 = L"August"; ++ _M_data->_M_month09 = L"September"; ++ _M_data->_M_month10 = L"October"; ++ _M_data->_M_month11 = L"November"; ++ _M_data->_M_month12 = L"December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = L"Jan"; ++ _M_data->_M_amonth02 = L"Feb"; ++ _M_data->_M_amonth03 = L"Mar"; ++ _M_data->_M_amonth04 = L"Apr"; ++ _M_data->_M_amonth05 = L"May"; ++ _M_data->_M_amonth06 = L"Jun"; ++ _M_data->_M_amonth07 = L"Jul"; ++ _M_data->_M_amonth08 = L"Aug"; ++ _M_data->_M_amonth09 = L"Sep"; ++ _M_data->_M_amonth10 = L"Oct"; ++ _M_data->_M_amonth11 = L"Nov"; ++ _M_data->_M_amonth12 = L"Dec"; ++ } ++#if 0 ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ union { char *__s; wchar_t *__w; } __u; ++ ++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); ++ _M_data->_M_date_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); ++ _M_data->_M_date_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); ++ _M_data->_M_time_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); ++ _M_data->_M_time_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); ++ _M_data->_M_am = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); ++ _M_data->_M_pm = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); ++ _M_data->_M_am_pm_format = __u.__w; ++ ++ // Day names, starting with "C"'s Sunday. ++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); ++ _M_data->_M_day1 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); ++ _M_data->_M_day2 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); ++ _M_data->_M_day3 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); ++ _M_data->_M_day4 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); ++ _M_data->_M_day5 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); ++ _M_data->_M_day6 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); ++ _M_data->_M_day7 = __u.__w; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); ++ _M_data->_M_aday1 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); ++ _M_data->_M_aday2 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); ++ _M_data->_M_aday3 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); ++ _M_data->_M_aday4 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); ++ _M_data->_M_aday5 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); ++ _M_data->_M_aday6 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); ++ _M_data->_M_aday7 = __u.__w; ++ ++ // Month names, starting with "C"'s January. ++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); ++ _M_data->_M_month01 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); ++ _M_data->_M_month02 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); ++ _M_data->_M_month03 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); ++ _M_data->_M_month04 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); ++ _M_data->_M_month05 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); ++ _M_data->_M_month06 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); ++ _M_data->_M_month07 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); ++ _M_data->_M_month08 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); ++ _M_data->_M_month09 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); ++ _M_data->_M_month10 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); ++ _M_data->_M_month11 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); ++ _M_data->_M_month12 = __u.__w; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); ++ _M_data->_M_amonth01 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); ++ _M_data->_M_amonth02 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); ++ _M_data->_M_amonth03 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); ++ _M_data->_M_amonth04 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); ++ _M_data->_M_amonth05 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); ++ _M_data->_M_amonth06 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); ++ _M_data->_M_amonth07 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); ++ _M_data->_M_amonth08 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); ++ _M_data->_M_amonth09 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); ++ _M_data->_M_amonth10 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); ++ _M_data->_M_amonth11 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); ++ _M_data->_M_amonth12 = __u.__w; ++ } ++#endif // 0 ++ } ++#endif ++} +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h +@@ -0,0 +1,68 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions ++// ++ ++// Written by Benjamin Kosnik ++ ++ template ++ __timepunct<_CharT>::__timepunct(size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template ++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template ++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(__s) ++ { ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ _M_name_timepunct = __tmp; ++ _M_initialize_timepunct(__cloc); ++ } ++ ++ template ++ __timepunct<_CharT>::~__timepunct() ++ { ++ if (_M_name_timepunct != _S_get_c_name()) ++ delete [] _M_name_timepunct; ++ delete _M_data; ++ _S_destroy_c_locale(_M_c_locale_timepunct); ++ } +--- gcc/libstdc++-v3/configure ++++ gcc/libstdc++-v3/configure +@@ -5764,7 +5764,7 @@ + enableval="$enable_clocale" + + case "$enableval" in +- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; ++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; + *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} + { (exit 1); exit 1; }; } ;; +@@ -5789,6 +5789,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ linux-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -6019,6 +6022,76 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ echo "$as_me:$LINENO: result: uclibc" >&5 ++echo "${ECHO_T}uclibc" >&6 ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ # Extract the first word of "msgfmt", so it can be a program name with args. ++set dummy msgfmt; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$check_msgfmt"; then ++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_check_msgfmt="yes" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" ++fi ++fi ++check_msgfmt=$ac_cv_prog_check_msgfmt ++if test -n "$check_msgfmt"; then ++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 ++echo "${ECHO_T}$check_msgfmt" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ ++ ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +--- gcc/libstdc++-v3/include/c_compatibility/wchar.h ++++ gcc/libstdc++-v3/include/c_compatibility/wchar.h +@@ -101,7 +101,9 @@ + using std::wmemcpy; + using std::wmemmove; + using std::wmemset; ++#if _GLIBCXX_HAVE_WCSFTIME + using std::wcsftime; ++#endif + + #if _GLIBCXX_USE_C99 + using std::wcstold; +--- gcc/libstdc++-v3/include/c_std/std_cwchar.h ++++ gcc/libstdc++-v3/include/c_std/std_cwchar.h +@@ -182,7 +182,9 @@ + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; ++#if _GLIBCXX_HAVE_WCSFTIME + using ::wcsftime; ++#endif + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; diff --git a/packages/gcc/gcc-4.2.1/300-libstdc++-pic.patch b/packages/gcc/gcc-4.2.1/300-libstdc++-pic.patch new file mode 100644 index 0000000000..89d03a85e5 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/300-libstdc++-pic.patch @@ -0,0 +1,46 @@ +# DP: Build and install libstdc++_pic.a library. + +--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500 +@@ -214,6 +214,10 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ + + ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Added bits to build debug library. + if GLIBCXX_BUILD_DEBUG + all-local: build_debug +--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500 ++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500 +@@ -627,7 +627,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -660,6 +660,7 @@ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-exec \ ++ install-exec-local \ + install-exec-am install-info install-info-am install-man \ + install-strip install-toolexeclibLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ +@@ -745,6 +746,11 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/packages/gcc/gcc-4.2.1/301-missing-execinfo_h.patch b/packages/gcc/gcc-4.2.1/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..0e2092f3fb --- /dev/null +++ b/packages/gcc/gcc-4.2.1/301-missing-execinfo_h.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 ++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 +@@ -500,7 +500,7 @@ + #ifdef __linux__ + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/packages/gcc/gcc-4.2.1/302-c99-snprintf.patch b/packages/gcc/gcc-4.2.1/302-c99-snprintf.patch new file mode 100644 index 0000000000..dfb22d681b --- /dev/null +++ b/packages/gcc/gcc-4.2.1/302-c99-snprintf.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 +@@ -142,7 +142,7 @@ + using ::vsprintf; + } + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/packages/gcc/gcc-4.2.1/303-c99-complex-ugly-hack.patch b/packages/gcc/gcc-4.2.1/303-c99-complex-ugly-hack.patch new file mode 100644 index 0000000000..2ccc80d9bb --- /dev/null +++ b/packages/gcc/gcc-4.2.1/303-c99-complex-ugly-hack.patch @@ -0,0 +1,12 @@ +--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 ++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 +@@ -7194,6 +7194,9 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include ++#ifdef __UCLIBC__ ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs ++#endif + int + main () + { diff --git a/packages/gcc/gcc-4.2.1/304-index_macro.patch b/packages/gcc/gcc-4.2.1/304-index_macro.patch new file mode 100644 index 0000000000..d8e476555d --- /dev/null +++ b/packages/gcc/gcc-4.2.1/304-index_macro.patch @@ -0,0 +1,24 @@ +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100 +@@ -59,6 +59,9 @@ + #include + #include + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + # ifdef __GC + # define __GC_CONST const + # else +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100 +@@ -53,6 +53,9 @@ + #include // For uninitialized_copy_n + #include // For power + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) + + using std::size_t; diff --git a/packages/gcc/gcc-4.2.1/602-sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.1/602-sdk-libstdc++-includes.patch new file mode 100644 index 0000000000..23fce7544d --- /dev/null +++ b/packages/gcc/gcc-4.2.1/602-sdk-libstdc++-includes.patch @@ -0,0 +1,20 @@ +--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500 +@@ -21,5 +21,5 @@ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once + + # -I/-D flags to pass when compiling. +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include + +--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500 +@@ -35,7 +35,7 @@ + + libmath_la_SOURCES = stubs.c + +-AM_CPPFLAGS = $(CANADIAN_INCLUDES) ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include + + # Only compiling "C" sources in this directory. + LIBTOOL = @LIBTOOL@ --tag CC diff --git a/packages/gcc/gcc-4.2.1/740-sh-pr24836.patch b/packages/gcc/gcc-4.2.1/740-sh-pr24836.patch new file mode 100644 index 0000000000..7992282cff --- /dev/null +++ b/packages/gcc/gcc-4.2.1/740-sh-pr24836.patch @@ -0,0 +1,25 @@ +http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 + +--- gcc/gcc/configure.ac (revision 106699) ++++ gcc/gcc/configure.ac (working copy) +@@ -2446,7 +2446,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 +--- gcc/gcc/configure ++++ gcc/gcc/configure +@@ -14846,7 +14846,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 diff --git a/packages/gcc/gcc-4.2.1/800-arm-bigendian.patch b/packages/gcc/gcc-4.2.1/800-arm-bigendian.patch new file mode 100644 index 0000000000..07c6093379 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/800-arm-bigendian.patch @@ -0,0 +1,67 @@ +By Lennert Buytenhek +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-4.2.0/gcc/config/arm/linux-elf.h ++++ gcc-4.2.0/gcc/config/arm/linux-elf.h +@@ -28,19 +28,33 @@ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -61,7 +75,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #undef LINK_SPEC +--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200 ++++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200 +@@ -696,6 +696,11 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="${tmake_file} t-linux arm/t-arm" + case ${target} in ++ arm*b-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac ++ case ${target} in + arm*-*-linux-*eabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" diff --git a/packages/gcc/gcc-4.2.1/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.2.1/801-arm-bigendian-eabi.patch new file mode 100644 index 0000000000..54490fc24f --- /dev/null +++ b/packages/gcc/gcc-4.2.1/801-arm-bigendian-eabi.patch @@ -0,0 +1,14 @@ +Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100 ++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100 +@@ -48,7 +48,8 @@ + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + #undef SUBTARGET_EXTRA_LINK_SPEC +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" ++#define SUBTARGET_EXTRA_LINK_SPEC \ ++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} " + + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ diff --git a/packages/gcc/gcc-4.2.1/README b/packages/gcc/gcc-4.2.1/README new file mode 100644 index 0000000000..b85840dc20 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/README @@ -0,0 +1,4 @@ +The numbered patches come from +http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/ +Other patches are locally added to fix things (mostly inherited and reapplied +from gcc 3.4.4 where applicable) diff --git a/packages/gcc/gcc-4.2.1/arm-nolibfloat.patch b/packages/gcc/gcc-4.2.1/arm-nolibfloat.patch new file mode 100644 index 0000000000..c4897c0330 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/arm-nolibfloat.patch @@ -0,0 +1,24 @@ +# Dimitry Andric , 2004-05-01 +# +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed +# anymore. (The required functions are now in libgcc.) +# +# Fixes errors like +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat +# collect2: ld returned 1 exit status +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat + +Index: gcc-4.0.2/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000 ++++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000 +@@ -56,7 +56,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which diff --git a/packages/gcc/gcc-4.2.1/arm-softfloat.patch b/packages/gcc/gcc-4.2.1/arm-softfloat.patch new file mode 100644 index 0000000000..c86c83ed15 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/arm-softfloat.patch @@ -0,0 +1,16 @@ +Index: gcc-4.0.2/gcc/config/arm/t-linux +=================================================================== +--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000 ++++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000 +@@ -4,7 +4,10 @@ + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi _floatdidf _floatdisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float diff --git a/packages/gcc/gcc-4.2.1/arm-thumb-cache.patch b/packages/gcc/gcc-4.2.1/arm-thumb-cache.patch new file mode 100644 index 0000000000..fa63846c8c --- /dev/null +++ b/packages/gcc/gcc-4.2.1/arm-thumb-cache.patch @@ -0,0 +1,29 @@ +--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200 ++++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200 +@@ -44,6 +44,7 @@ + + /* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ ++#if !defined(__thumb__) + #define CLEAR_INSN_CACHE(BEG, END) \ + { \ + register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +@@ -53,3 +54,18 @@ + : "=r" (_beg) \ + : "0" (_beg), "r" (_end), "r" (_flg)); \ + } ++#else ++#define CLEAR_INSN_CACHE(BEG, END) \ ++{ \ ++ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ ++ register unsigned long _end __asm ("a2") = (unsigned long) (END); \ ++ register unsigned long _flg __asm ("a3") = 0; \ ++ register unsigned long _swi __asm ("a4") = 0xf0002; \ ++ __asm __volatile ("push {r7}\n" \ ++ " mov r7,a4\n" \ ++ " swi 0 @ sys_cacheflush\n" \ ++ " pop {r7}\n" \ ++ : "=r" (_beg) \ ++ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \ ++} ++#endif diff --git a/packages/gcc/gcc-4.2.1/arm-thumb.patch b/packages/gcc/gcc-4.2.1/arm-thumb.patch new file mode 100644 index 0000000000..69e2f68cf2 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/arm-thumb.patch @@ -0,0 +1,64 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc ++++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm +@@ -995,10 +995,24 @@ + .code 32 + FUNC_START div0 + ++#if ! defined __thumb__ + stmfd sp!, {r1, lr} + mov r0, #SIGFPE + bl SYM(raise) __PLT__ + RETLDM r1 ++#else ++ push {r1, lr} ++ mov r0, #SIGFPE ++ bl SYM(raise) __PLT__ ++#if __ARM_ARCH__ > 4 ++ pop {r1, pc} ++#else ++ @ on 4T that won't work ++ pop {r1} ++ pop {r3} ++ bx r3 ++#endif ++#endif + + FUNC_END div0 + +@@ -1141,11 +1155,12 @@ + code here switches to the correct mode before executing the function. */ + + .text +- .align 0 ++ .align 1 + .force_thumb + + .macro call_via register + THUMB_FUNC_START _call_via_\register ++ .hidden SYM (_call_via_\register) + + bx \register + nop +@@ -1242,6 +1257,7 @@ + .code 16 + + THUMB_FUNC_START _interwork_call_via_\register ++ .hidden SYM (_interwork_call_via_\register) + + bx pc + nop +--- gcc-4.1.1/gcc/config/arm/t-linux~gcc ++++ gcc-4.1.1/gcc/config/arm/t-linux +@@ -7,6 +7,7 @@ + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ + _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ + _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _call_via_rX \ + _fixsfsi _fixunssfsi _floatdidf _floatdisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float diff --git a/packages/gcc/gcc-4.2.1/cache-amnesia.patch b/packages/gcc/gcc-4.2.1/cache-amnesia.patch new file mode 100644 index 0000000000..ef7cd111c5 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/cache-amnesia.patch @@ -0,0 +1,13 @@ +diff --git a/gcc/configure b/gcc/configure +index 44620ab..6e1830c 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12272,7 +12272,7 @@ else + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ +- ${realsrcdir}/configure \ ++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias + CFLAGS="${saved_CFLAGS}" diff --git a/packages/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff b/packages/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff new file mode 100644 index 0000000000..568e15abff --- /dev/null +++ b/packages/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff @@ -0,0 +1,18 @@ +--- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055 ++++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056 +@@ -15415,6 +15415,15 @@ + /* Move from sp to reg. */ + asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); + } ++ else if (GET_CODE (e1) == PLUS ++ && GET_CODE (XEXP (e1, 0)) == REG ++ && REGNO (XEXP (e1, 0)) == SP_REGNUM ++ && GET_CODE (XEXP (e1, 1)) == CONST_INT) ++ { ++ /* Set reg to offset from sp. */ ++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", ++ REGNO (e0), (int)INTVAL(XEXP (e1, 1))); ++ } + else + abort (); + break; diff --git a/packages/gcc/gcc-4.2.1/gcc41-configure.in.patch b/packages/gcc/gcc-4.2.1/gcc41-configure.in.patch new file mode 100644 index 0000000000..3d33bcb978 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/gcc41-configure.in.patch @@ -0,0 +1,22 @@ +--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700 ++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700 +@@ -1907,7 +1907,7 @@ + *) gxx_include_dir=${with_gxx_include_dir} ;; + esac + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700 ++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700 +@@ -2669,7 +2669,7 @@ + *) gxx_include_dir=${with_gxx_include_dir} ;; + esac + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in diff --git a/packages/gcc/gcc-4.2.1/ldflags.patch b/packages/gcc/gcc-4.2.1/ldflags.patch new file mode 100644 index 0000000000..9576f60778 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/ldflags.patch @@ -0,0 +1,22 @@ +--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100 ++++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100 +@@ -334,7 +334,7 @@ + CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) + LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates +-LDFLAGS_FOR_TARGET = ++LDFLAGS_FOR_TARGET = @LDFLAGS@ + PICFLAG_FOR_TARGET = + + # ------------------------------------ +--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100 ++++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100 +@@ -337,7 +337,7 @@ + CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) + LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates +-LDFLAGS_FOR_TARGET = ++LDFLAGS_FOR_TARGET = @LDFLAGS@ + PICFLAG_FOR_TARGET = + + # ------------------------------------ diff --git a/packages/gcc/gcc-4.2.1/sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.1/sdk-libstdc++-includes.patch new file mode 100644 index 0000000000..4377c2143b --- /dev/null +++ b/packages/gcc/gcc-4.2.1/sdk-libstdc++-includes.patch @@ -0,0 +1,22 @@ +--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100 ++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100 +@@ -32,7 +32,7 @@ + + libmath_la_SOURCES = stubs.c + +-AM_CPPFLAGS = $(CANADIAN_INCLUDES) ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include + + # Only compiling "C" sources in this directory. + LIBTOOL = @LIBTOOL@ --tag CC +--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100 ++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100 +@@ -18,7 +18,7 @@ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once + + # -I/-D flags to pass when compiling. +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include + + + diff --git a/packages/gcc/gcc-4.2.1/sh3-installfix-fixheaders.patch b/packages/gcc/gcc-4.2.1/sh3-installfix-fixheaders.patch new file mode 100644 index 0000000000..a06cd2e075 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/sh3-installfix-fixheaders.patch @@ -0,0 +1,11 @@ +--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000 ++++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000 +@@ -3772,8 +3772,6 @@ + $(INSTALL_SCRIPT) $(mkinstalldirs) \ + $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ + $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ +- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \ +- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ + else :; fi + echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \ + > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf diff --git a/packages/gcc/gcc-4.2.1/unbreak-armv4t.patch b/packages/gcc/gcc-4.2.1/unbreak-armv4t.patch new file mode 100644 index 0000000000..b3399abfdb --- /dev/null +++ b/packages/gcc/gcc-4.2.1/unbreak-armv4t.patch @@ -0,0 +1,12 @@ +diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h +--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700 ++++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700 +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + #undef SUBTARGET_EXTRA_LINK_SPEC + #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" diff --git a/packages/gcc/gcc-4.2.1/zecke-no-host-includes.patch b/packages/gcc/gcc-4.2.1/zecke-no-host-includes.patch new file mode 100644 index 0000000000..6afb10d6ef --- /dev/null +++ b/packages/gcc/gcc-4.2.1/zecke-no-host-includes.patch @@ -0,0 +1,31 @@ +Index: gcc-4.0.2/gcc/c-incpath.c +=================================================================== +--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100 ++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200 +@@ -350,6 +350,26 @@ + p->construct = 0; + p->user_supplied_p = user_supplied_p; + ++#ifdef CROSS_COMPILE ++ /* A common error when cross compiling is including ++ host headers. This code below will try to fail fast ++ for cross compiling. Currently we consider /usr/include, ++ /opt/include and /sw/include as harmful. */ ++ { ++ /* printf("Adding Path: %s\n", p->name ); */ ++ if( strstr(p->name, "/usr/include" ) == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } else if( strstr(p->name, "/sw/include") == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } else if( strstr(p->name, "/opt/include") == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } ++ } ++#endif ++ + add_cpp_dir_path (p, chain); + } + diff --git a/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch new file mode 100644 index 0000000000..42ec190600 --- /dev/null +++ b/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch @@ -0,0 +1,12 @@ +Index: gcc-4.1.1/Makefile.in +=================================================================== +--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200 ++++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200 +@@ -194,6 +194,7 @@ + AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ ++ CPP="$(CC_FOR_TARGET) -E"; export CCP; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ diff --git a/packages/gcc/gcc-cross-sdk_4.2.0.bb b/packages/gcc/gcc-cross-sdk_4.2.0.bb deleted file mode 100644 index 71c2cd08a2..0000000000 --- a/packages/gcc/gcc-cross-sdk_4.2.0.bb +++ /dev/null @@ -1,40 +0,0 @@ -DESCRIPTION = "The GNU cc and gcc C compilers." -HOMEPAGE = "http://www.gnu.org/software/gcc/" -SECTION = "devel" -LICENSE = "GPL" -PR = "r0" - -inherit sdk - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" - -DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc" -PACKAGES = "${PN}" - -require gcc_${PV}.bb -require gcc4-build-sdk.inc -require gcc-package-sdk.inc - -SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ - file://100-uclibc-conf.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://ldflags.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ - " - -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " - diff --git a/packages/gcc/gcc-cross_4.2.0.bb b/packages/gcc/gcc-cross_4.2.0.bb deleted file mode 100644 index 9025a98f3c..0000000000 --- a/packages/gcc/gcc-cross_4.2.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -require gcc_${PV}.bb -# path mangling, needed by the cross packaging -require gcc-paths-cross.inc -inherit cross -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" -# NOTE: split PR. If the main .oe changes something that affects its *build* -# remember to increment this one too. -PR = "r1" - -DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native" -PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" - -# cross build -require gcc3-build-cross.inc -# cross packaging -require gcc-package-cross.inc - -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " - -EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR}/${BUILD_SYS}" diff --git a/packages/gcc/gcc-cross_4.2.1.bb b/packages/gcc/gcc-cross_4.2.1.bb new file mode 100644 index 0000000000..9025a98f3c --- /dev/null +++ b/packages/gcc/gcc-cross_4.2.1.bb @@ -0,0 +1,20 @@ +require gcc_${PV}.bb +# path mangling, needed by the cross packaging +require gcc-paths-cross.inc +inherit cross +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" +# NOTE: split PR. If the main .oe changes something that affects its *build* +# remember to increment this one too. +PR = "r1" + +DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native" +PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" + +# cross build +require gcc3-build-cross.inc +# cross packaging +require gcc-package-cross.inc + +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " + +EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR}/${BUILD_SYS}" diff --git a/packages/gcc/gcc_4.2.0.bb b/packages/gcc/gcc_4.2.0.bb deleted file mode 100644 index b5c4b3c936..0000000000 --- a/packages/gcc/gcc_4.2.0.bb +++ /dev/null @@ -1,52 +0,0 @@ -PR = "r0" -DESCRIPTION = "The GNU cc and gcc C compilers." -HOMEPAGE = "http://www.gnu.org/software/gcc/" -SECTION = "devel" -LICENSE = "GPL" - -inherit autotools gettext - -require gcc-package.inc - -SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ - file://100-uclibc-conf.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://ldflags.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - " - -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " - -#Set the fortran bits -# 'fortran' or '', not 'f77' like gcc3 had -FORTRAN = "" -HAS_GFORTRAN = "no" -HAS_G2C = "no" - -#Set the java bits -JAVA_arm = "" -JAVA = "" - -LANGUAGES = "c,c++${FORTRAN}${JAVA}" -require gcc3-build.inc -ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR} - - -EXTRA_OECONF += " --disable-libssp --disable-bootstrap " - diff --git a/packages/gcc/gcc_4.2.1.bb b/packages/gcc/gcc_4.2.1.bb new file mode 100644 index 0000000000..dd3a9c59cc --- /dev/null +++ b/packages/gcc/gcc_4.2.1.bb @@ -0,0 +1,52 @@ +PR = "r0" +DESCRIPTION = "The GNU cc and gcc C compilers." +HOMEPAGE = "http://www.gnu.org/software/gcc/" +SECTION = "devel" +LICENSE = "GPL" + +inherit autotools gettext + +require gcc-package.inc + +SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ + file://100-uclibc-conf.patch;patch=1 \ +# file://200-uclibc-locale.patch;patch=1 \ + file://300-libstdc++-pic.patch;patch=1 \ + file://301-missing-execinfo_h.patch;patch=1 \ + file://302-c99-snprintf.patch;patch=1 \ + file://303-c99-complex-ugly-hack.patch;patch=1 \ + file://304-index_macro.patch;patch=1 \ + file://602-sdk-libstdc++-includes.patch;patch=1 \ + file://740-sh-pr24836.patch;patch=1 \ + file://800-arm-bigendian.patch;patch=1 \ + file://arm-nolibfloat.patch;patch=1 \ + file://arm-softfloat.patch;patch=1 \ + file://gcc41-configure.in.patch;patch=1 \ + file://arm-thumb.patch;patch=1 \ + file://arm-thumb-cache.patch;patch=1 \ + file://ldflags.patch;patch=1 \ + file://zecke-xgcc-cpp.patch;patch=1 \ + file://unbreak-armv4t.patch;patch=1 \ + file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ + file://cache-amnesia.patch;patch=1 \ + " + +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " + +#Set the fortran bits +# 'fortran' or '', not 'f77' like gcc3 had +FORTRAN = "" +HAS_GFORTRAN = "no" +HAS_G2C = "no" + +#Set the java bits +JAVA_arm = "" +JAVA = "" + +LANGUAGES = "c,c++${FORTRAN}${JAVA}" +require gcc3-build.inc +ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR} + + +EXTRA_OECONF += " --disable-libssp --disable-bootstrap " + -- cgit v1.2.3 From 5961a7fd3b224f587d8a4eaac3ef7fd2fdb25cc9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 Jul 2007 09:46:21 +0000 Subject: mtd-utils: Remove stale files/versions (from poky) --- packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb | 2 - .../add-exclusion-to-mkfs-jffs2-20041113.patch | 107 ---------- .../add-exclusion-to-mkfs-jffs2-20060131.patch | 100 ---------- .../mtd-utils/add-exclusion-to-mkfs-jffs2.patch | 103 ---------- packages/mtd/mtd-utils/add_lzo.patch | 220 --------------------- packages/mtd/mtd-utils/favour_lzo.patch | 136 ------------- .../mtd/mtd-utils/fix-ignoreerrors-20060131.patch | 20 -- packages/mtd/mtd-utils/fix-ignoreerrors.patch | 20 -- packages/mtd/mtd-utils_0.0.0+cvs20060223.bb | 39 ---- 9 files changed, 747 deletions(-) delete mode 100644 packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb delete mode 100644 packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20041113.patch delete mode 100644 packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20060131.patch delete mode 100644 packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch delete mode 100644 packages/mtd/mtd-utils/add_lzo.patch delete mode 100644 packages/mtd/mtd-utils/favour_lzo.patch delete mode 100644 packages/mtd/mtd-utils/fix-ignoreerrors-20060131.patch delete mode 100644 packages/mtd/mtd-utils/fix-ignoreerrors.patch delete mode 100644 packages/mtd/mtd-utils_0.0.0+cvs20060223.bb (limited to 'packages') diff --git a/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb b/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb deleted file mode 100644 index 6f9d71e10c..0000000000 --- a/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb +++ /dev/null @@ -1,2 +0,0 @@ -require mtd-utils_${PV}.bb -require mtd-utils-native.inc diff --git a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20041113.patch b/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20041113.patch deleted file mode 100644 index cb819e19be..0000000000 --- a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20041113.patch +++ /dev/null @@ -1,107 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- mtd/util/mkfs.jffs2.c~add-exclusion-to-mkfs-jffs2.patch -+++ mtd/util/mkfs.jffs2.c -@@ -89,7 +89,12 @@ - struct filesystem_entry *files; /* Only relevant to directories */ - }; - -+struct ignorepath_entry { -+ struct ignorepath_entry* next; /* Points to the next ignorepath element */ -+ char name[PATH_MAX]; /* Name of the entry */ -+}; - -+static struct ignorepath_entry* ignorepath = 0; - static int out_fd = -1; - static char default_rootdir[] = "."; - static char *rootdir = default_rootdir; -@@ -363,6 +368,7 @@ - char *hpath, *tpath; - struct dirent *dp, **namelist; - struct filesystem_entry *entry; -+ struct ignorepath_entry* element = ignorepath; - - - if (lstat(hostpath, &sb)) { -@@ -372,6 +378,15 @@ - entry = add_host_filesystem_entry(targetpath, hostpath, - sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); - -+ while ( element ) { -+ if ( strcmp( element->name, hostpath ) == 0 ) { -+ printf( "Note: ignoring directories below '%s'\n", hostpath ); -+ return entry; -+ break; -+ } -+ element = element->next; -+ } -+ - n = scandir(hostpath, &namelist, 0, alphasort); - if (n < 0) { - perror_msg_and_die("opening directory %s", hostpath); -@@ -1139,6 +1154,7 @@ - {"root", 1, NULL, 'r'}, - {"pagesize", 1, NULL, 's'}, - {"eraseblock", 1, NULL, 'e'}, -+ {"ignore", 1, NULL, 'i'}, - {"output", 1, NULL, 'o'}, - {"help", 0, NULL, 'h'}, - {"verbose", 0, NULL, 'v'}, -@@ -1180,6 +1196,7 @@ - " -L, --list-compressors Show the list of the avaiable compressors\n" - " -t, --test-compression Call decompress and compare with the original (for test)\n" - " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" -+ " -i, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" - " -o, --output=FILE Output to FILE (default: stdout)\n" - " -l, --little-endian Create a little-endian filesystem\n" - " -b, --big-endian Create a big-endian filesystem\n" -@@ -1202,13 +1219,14 @@ - struct stat sb; - FILE *devtable = NULL; - struct filesystem_entry *root; -- char *compr_name = NULL; -- int compr_prior = -1; -+ char *compr_name = NULL; -+ int compr_prior = -1; -+ struct ignorepath_entry* element = ignorepath; - -- jffs2_compressors_init(); -+ jffs2_compressors_init(); - - while ((opt = getopt_long(argc, argv, -- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:", long_options, &c)) >= 0) -+ "D:d:r:s:i:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:", long_options, &c)) >= 0) - { - switch (opt) { - case 'D': -@@ -1231,6 +1249,27 @@ - page_size = strtol(optarg, NULL, 0); - break; - -+ case 'i': -+ printf( "Note: Adding '%s' to ignore Path\n", optarg ); -+ if ( !ignorepath ) { -+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); -+ ignorepath->next = 0; -+ strcpy( &ignorepath->name[0], optarg ); -+ } else { -+ while ( element->next ) element = element->next; -+ element->next = xmalloc( sizeof( struct ignorepath_entry ) ); -+ element->next->next = 0; -+ strcpy( &element->next->name[0], optarg ); -+ } -+ printf( "--------- Dumping ignore path list ----------------\n" ); -+ element=ignorepath; -+ while ( element ) { -+ printf( " * '%s'\n", &element->name[0] ); -+ element = element->next; -+ } -+ printf( "---------------------------------------------------\n" ); -+ break; -+ - case 'o': - if (out_fd != -1) { - error_msg_and_die("output filename specified more than once"); diff --git a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20060131.patch b/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20060131.patch deleted file mode 100644 index e24f395890..0000000000 --- a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-20060131.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- mtd/util/mkfs.jffs2.c~add-exclusion-to-mkfs-jffs2.patch -+++ mtd/util/mkfs.jffs2.c -@@ -92,7 +92,12 @@ - struct filesystem_entry *files; /* Only relevant to directories */ - }; - -- -+struct ignorepath_entry { -+ struct ignorepath_entry* next; /* Points to the next ignorepath element */ -+ char name[PATH_MAX]; /* Name of the entry */ -+}; -+ -+static struct ignorepath_entry* ignorepath = 0; - static int out_fd = -1; - static int in_fd = -1; - static char default_rootdir[] = "."; -@@ -367,7 +372,7 @@ - char *hpath, *tpath; - struct dirent *dp, **namelist; - struct filesystem_entry *entry; -- -+ struct ignorepath_entry* element = ignorepath; - - if (lstat(hostpath, &sb)) { - perror_msg_and_die("%s", hostpath); -@@ -376,6 +381,15 @@ - entry = add_host_filesystem_entry(targetpath, hostpath, - sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); - -+ while ( element ) { -+ if ( strcmp( element->name, targetpath ) == 0 ) { -+ printf( "Note: ignoring directories below '%s'\n", targetpath ); -+ return entry; -+ break; -+ } -+ element = element->next; -+ } -+ - n = scandir(hostpath, &namelist, 0, alphasort); - if (n < 0) { - perror_msg_and_die("opening directory %s", hostpath); -@@ -1157,6 +1171,7 @@ - {"root", 1, NULL, 'r'}, - {"pagesize", 1, NULL, 's'}, - {"eraseblock", 1, NULL, 'e'}, -+ {"ignore", 1, NULL, 'I'}, - {"output", 1, NULL, 'o'}, - {"help", 0, NULL, 'h'}, - {"verbose", 0, NULL, 'v'}, -@@ -1199,6 +1214,7 @@ - " -L, --list-compressors Show the list of the avaiable compressors\n" - " -t, --test-compression Call decompress and compare with the original (for test)\n" - " -n, --no-eraseblock-headers Don't add a eraseblock header to every eraseblock\n" -+ " -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" - " -o, --output=FILE Output to FILE (default: stdout)\n" - " -l, --little-endian Create a little-endian filesystem\n" - " -b, --big-endian Create a big-endian filesystem\n" -@@ -1368,11 +1384,12 @@ - struct filesystem_entry *root; - char *compr_name = NULL; - int compr_prior = -1; -+ struct ignorepath_entry* element = ignorepath; - - jffs2_compressors_init(); - - while ((opt = getopt_long(argc, argv, -- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) -+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) - { - switch (opt) { - case 'D': -@@ -1395,6 +1412,28 @@ - page_size = strtol(optarg, NULL, 0); - break; - -+ case 'I': -+ printf( "Note: Adding '%s' to ignore Path\n", optarg ); -+ element = ignorepath; -+ if ( !ignorepath ) { -+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); -+ ignorepath->next = 0; -+ strcpy( &ignorepath->name[0], optarg ); -+ } else { -+ while ( element->next ) element = element->next; -+ element->next = xmalloc( sizeof( struct ignorepath_entry ) ); -+ element->next->next = 0; -+ strcpy( &element->next->name[0], optarg ); -+ } -+ printf( "--------- Dumping ignore path list ----------------\n" ); -+ element = ignorepath; -+ while ( element ) { -+ printf( " * '%s'\n", &element->name[0] ); -+ element = element->next; -+ } -+ printf( "---------------------------------------------------\n" ); -+ break; -+ - case 'o': - if (out_fd != -1) { - error_msg_and_die("output filename specified more than once"); diff --git a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch b/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch deleted file mode 100644 index 3ac41280bb..0000000000 --- a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch +++ /dev/null @@ -1,103 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- mtd/util/mkfs.jffs2.c~add-exclusion-to-mkfs-jffs2.patch -+++ mtd/util/mkfs.jffs2.c -@@ -92,7 +92,12 @@ - struct filesystem_entry *files; /* Only relevant to directories */ - }; - -+struct ignorepath_entry { -+ struct ignorepath_entry* next; /* Points to the next ignorepath element */ -+ char name[PATH_MAX]; /* Name of the entry */ -+}; - -+static struct ignorepath_entry* ignorepath = 0; - static int out_fd = -1; - static int in_fd = -1; - static char default_rootdir[] = "."; -@@ -367,6 +372,7 @@ - char *hpath, *tpath; - struct dirent *dp, **namelist; - struct filesystem_entry *entry; -+ struct ignorepath_entry* element = ignorepath; - - - if (lstat(hostpath, &sb)) { -@@ -376,6 +382,15 @@ - entry = add_host_filesystem_entry(targetpath, hostpath, - sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); - -+ while ( element ) { -+ if ( strcmp( element->name, targetpath ) == 0 ) { -+ printf( "Note: ignoring directories below '%s'\n", targetpath ); -+ return entry; -+ break; -+ } -+ element = element->next; -+ } -+ - n = scandir(hostpath, &namelist, 0, alphasort); - if (n < 0) { - perror_msg_and_die("opening directory %s", hostpath); -@@ -1147,6 +1162,7 @@ - {"root", 1, NULL, 'r'}, - {"pagesize", 1, NULL, 's'}, - {"eraseblock", 1, NULL, 'e'}, -+ {"ignore", 1, NULL, 'I'}, - {"output", 1, NULL, 'o'}, - {"help", 0, NULL, 'h'}, - {"verbose", 0, NULL, 'v'}, -@@ -1189,6 +1205,7 @@ - " -L, --list-compressors Show the list of the avaiable compressors\n" - " -t, --test-compression Call decompress and compare with the original (for test)\n" - " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" -+ " -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" - " -o, --output=FILE Output to FILE (default: stdout)\n" - " -l, --little-endian Create a little-endian filesystem\n" - " -b, --big-endian Create a big-endian filesystem\n" -@@ -1349,11 +1366,12 @@ - struct filesystem_entry *root; - char *compr_name = NULL; - int compr_prior = -1; -+ struct ignorepath_entry* element = ignorepath; - - jffs2_compressors_init(); - - while ((opt = getopt_long(argc, argv, -- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) -+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) - { - switch (opt) { - case 'D': -@@ -1376,6 +1394,28 @@ - page_size = strtol(optarg, NULL, 0); - break; - -+ case 'I': -+ printf( "Note: Adding '%s' to ignore Path\n", optarg ); -+ element = ignorepath; -+ if ( !ignorepath ) { -+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); -+ ignorepath->next = 0; -+ strcpy( &ignorepath->name[0], optarg ); -+ } else { -+ while ( element->next ) element = element->next; -+ element->next = xmalloc( sizeof( struct ignorepath_entry ) ); -+ element->next->next = 0; -+ strcpy( &element->next->name[0], optarg ); -+ } -+ printf( "--------- Dumping ignore path list ----------------\n" ); -+ element = ignorepath; -+ while ( element ) { -+ printf( " * '%s'\n", &element->name[0] ); -+ element = element->next; -+ } -+ printf( "---------------------------------------------------\n" ); -+ break; -+ - case 'o': - if (out_fd != -1) { - error_msg_and_die("output filename specified more than once"); diff --git a/packages/mtd/mtd-utils/add_lzo.patch b/packages/mtd/mtd-utils/add_lzo.patch deleted file mode 100644 index 9afd1ca46b..0000000000 --- a/packages/mtd/mtd-utils/add_lzo.patch +++ /dev/null @@ -1,220 +0,0 @@ -Add LZO support to mtd-utils to generate LZO compressed jffs2 images - -Unlike the kernel version, the standard lzo userspace library is used -along with lzo1x_999_compress rather than the lzo1x_1_compress version -since better compression ratios can be obtained (at no significant cost -to decompression time). - -Signed-off-by: Richard Purdie - ---- - Makefile | 3 - - compr.c | 6 ++ - compr.h | 6 ++ - compr_lzo.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++ - include/linux/jffs2.h | 1 - 5 files changed, 135 insertions(+), 1 deletion(-) - -Index: git/Makefile -=================================================================== ---- git.orig/Makefile 2007-03-01 11:57:58.000000000 +0000 -+++ git/Makefile 2007-03-01 11:58:01.000000000 +0000 -@@ -58,8 +58,9 @@ $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc3 - $(BUILDDIR)/compr_rtime.o \ - $(BUILDDIR)/mkfs.jffs2.o \ - $(BUILDDIR)/compr_zlib.o \ -+ $(BUILDDIR)/compr_lzo.o \ - $(BUILDDIR)/compr.o -- $(CC) $(LDFLAGS) -o $@ $^ -lz -+ $(CC) $(LDFLAGS) -o $@ $^ -lz -llzo - - $(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o - $(CC) $(LDFLAGS) -o $@ $^ -Index: git/compr.c -=================================================================== ---- git.orig/compr.c 2007-03-01 11:57:58.000000000 +0000 -+++ git/compr.c 2007-03-01 11:58:01.000000000 +0000 -@@ -474,6 +474,9 @@ int jffs2_compressors_init(void) - #ifdef CONFIG_JFFS2_RTIME - jffs2_rtime_init(); - #endif -+#ifdef CONFIG_JFFS2_LZO -+ jffs2_lzo_init(); -+#endif - return 0; - } - -@@ -485,5 +488,8 @@ int jffs2_compressors_exit(void) - #ifdef CONFIG_JFFS2_ZLIB - jffs2_zlib_exit(); - #endif -+#ifdef CONFIG_JFFS2_LZO -+ jffs2_lzo_exit(); -+#endif - return 0; - } -Index: git/compr.h -=================================================================== ---- git.orig/compr.h 2007-03-01 11:57:58.000000000 +0000 -+++ git/compr.h 2007-03-01 11:58:01.000000000 +0000 -@@ -21,11 +21,13 @@ - - #define CONFIG_JFFS2_ZLIB - #define CONFIG_JFFS2_RTIME -+#define CONFIG_JFFS2_LZO - - #define JFFS2_RUBINMIPS_PRIORITY 10 - #define JFFS2_DYNRUBIN_PRIORITY 20 - #define JFFS2_RTIME_PRIORITY 50 - #define JFFS2_ZLIB_PRIORITY 60 -+#define JFFS2_LZO_PRIORITY 80 - - #define JFFS2_COMPR_MODE_NONE 0 - #define JFFS2_COMPR_MODE_PRIORITY 1 -@@ -111,5 +113,9 @@ void jffs2_zlib_exit(void); - int jffs2_rtime_init(void); - void jffs2_rtime_exit(void); - #endif -+#ifdef CONFIG_JFFS2_LZO -+int jffs2_lzo_init(void); -+void jffs2_lzo_exit(void); -+#endif - - #endif /* __JFFS2_COMPR_H__ */ -Index: git/compr_lzo.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/compr_lzo.c 2007-03-01 11:58:01.000000000 +0000 -@@ -0,0 +1,120 @@ -+/* -+ * JFFS2 LZO Compression Interface. -+ * -+ * Copyright (C) 2007 Nokia Corporation. All rights reserved. -+ * -+ * Author: Richard Purdie -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -+ * 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "compr.h" -+ -+extern int page_size; -+ -+static void *lzo_mem; -+static void *lzo_compress_buf; -+ -+/* -+ * Note about LZO compression. -+ * -+ * We want to use the _999_ compression routine which gives better compression -+ * rates at the expense of time. Decompression time is unaffected. We might as -+ * well use the standard lzo library routines for this but they will overflow -+ * the destination buffer since they don't check the destination size. -+ * -+ * We therefore compress to a temporary buffer and copy if it will fit. -+ * -+ */ -+static int jffs2_lzo_cmpr(unsigned char *data_in, unsigned char *cpage_out, -+ uint32_t *sourcelen, uint32_t *dstlen, void *model) -+{ -+ uint32_t compress_size; -+ int ret; -+ -+ ret = lzo1x_999_compress(data_in, *sourcelen, lzo_compress_buf, &compress_size, lzo_mem); -+ -+ if (ret != LZO_E_OK) -+ return -1; -+ -+ if (compress_size > *dstlen) -+ return -1; -+ -+ memcpy(cpage_out, lzo_compress_buf, compress_size); -+ *dstlen = compress_size; -+ -+ return 0; -+} -+ -+static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, -+ uint32_t srclen, uint32_t destlen, void *model) -+{ -+ int ret; -+ uint32_t dl; -+ -+ ret = lzo1x_decompress_safe(data_in,srclen,cpage_out,&dl,NULL); -+ -+ if (ret != LZO_E_OK || dl != destlen) -+ return -1; -+ -+ return 0; -+} -+ -+static struct jffs2_compressor jffs2_lzo_comp = { -+ .priority = JFFS2_LZO_PRIORITY, -+ .name = "lzo", -+ .compr = JFFS2_COMPR_LZO, -+ .compress = &jffs2_lzo_cmpr, -+ .decompress = &jffs2_lzo_decompress, -+ .disabled = 0, -+}; -+ -+int jffs2_lzo_init(void) -+{ -+ int ret; -+ -+ lzo_mem = malloc(LZO1X_999_MEM_COMPRESS); -+ if (!lzo_mem) -+ return -1; -+ -+ /* Worse case LZO compression size from their FAQ */ -+ lzo_compress_buf = malloc(page_size + (page_size / 64) + 16 + 3); -+ if (!lzo_compress_buf) { -+ free(lzo_mem); -+ return -1; -+ } -+ -+ ret = jffs2_register_compressor(&jffs2_lzo_comp); -+ if (ret < 0) { -+ free(lzo_compress_buf); -+ free(lzo_mem); -+ } -+ -+ return ret; -+} -+ -+void jffs2_lzo_exit(void) -+{ -+ jffs2_unregister_compressor(&jffs2_lzo_comp); -+ free(lzo_compress_buf); -+ free(lzo_mem); -+} -Index: git/include/linux/jffs2.h -=================================================================== ---- git.orig/include/linux/jffs2.h 2007-03-01 11:57:58.000000000 +0000 -+++ git/include/linux/jffs2.h 2007-03-01 11:58:01.000000000 +0000 -@@ -46,6 +46,7 @@ - #define JFFS2_COMPR_COPY 0x04 - #define JFFS2_COMPR_DYNRUBIN 0x05 - #define JFFS2_COMPR_ZLIB 0x06 -+#define JFFS2_COMPR_LZO 0x07 - /* Compatibility flags. */ - #define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */ - #define JFFS2_NODE_ACCURATE 0x2000 diff --git a/packages/mtd/mtd-utils/favour_lzo.patch b/packages/mtd/mtd-utils/favour_lzo.patch deleted file mode 100644 index 9e55d5f4b3..0000000000 --- a/packages/mtd/mtd-utils/favour_lzo.patch +++ /dev/null @@ -1,136 +0,0 @@ -Add a favourlzo compression mode to mtd-utils - -This allows lzo compression to be used in the cases where the -compression ratio isn't quite as good zlib. This can make sense in -certain use cases because LZO decompression is much faster than zlib. - -Signed-off-by: Richard Purdie - ---- - compr.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- - compr.h | 1 + - 2 files changed, 50 insertions(+), 3 deletions(-) - -Index: git/compr.c -=================================================================== ---- git.orig/compr.c 2007-03-01 11:58:01.000000000 +0000 -+++ git/compr.c 2007-03-01 11:58:09.000000000 +0000 -@@ -16,6 +16,8 @@ - #include - #include - -+#define FAVOUR_LZO_PERCENT 80 -+ - extern int page_size; - - /* LIST IMPLEMENTATION (from linux/list.h) */ -@@ -166,6 +168,33 @@ static void jffs2_decompression_test(str - } - } - -+/* -+ * Return 1 to use this compression -+ */ -+static int jffs2_is_best_compression(struct jffs2_compressor *this, -+ struct jffs2_compressor *best, uint32_t size, uint32_t bestsize) -+{ -+ switch (jffs2_compression_mode) { -+ case JFFS2_COMPR_MODE_SIZE: -+ if (bestsize > size) -+ return 1; -+ return 0; -+ case JFFS2_COMPR_MODE_FAVOURLZO: -+ if ((this->compr == JFFS2_COMPR_LZO) && (bestsize > size)) -+ return 1; -+ if ((best->compr != JFFS2_COMPR_LZO) && (bestsize > size)) -+ return 1; -+ if ((this->compr == JFFS2_COMPR_LZO) && (bestsize > (size * FAVOUR_LZO_PERCENT / 100))) -+ return 1; -+ if ((bestsize * FAVOUR_LZO_PERCENT / 100) > size) -+ return 1; -+ -+ return 0; -+ } -+ /* Shouldn't happen */ -+ return 0; -+} -+ - /* jffs2_compress: - * @data: Pointer to uncompressed data - * @cdata: Pointer to returned pointer to buffer for compressed data -@@ -231,21 +260,29 @@ uint16_t jffs2_compress( unsigned char * - } - if (ret == JFFS2_COMPR_NONE) free(output_buf); - break; -+ case JFFS2_COMPR_MODE_FAVOURLZO: - case JFFS2_COMPR_MODE_SIZE: - orig_slen = *datalen; - orig_dlen = *cdatalen; - list_for_each_entry(this, &jffs2_compressor_list, list) { -+ uint32_t needed_buf_size; -+ -+ if (jffs2_compression_mode == JFFS2_COMPR_MODE_FAVOURLZO) -+ needed_buf_size = orig_slen+jffs2_compression_check; -+ else -+ needed_buf_size = orig_dlen+jffs2_compression_check; -+ - /* Skip decompress-only backwards-compatibility and disabled modules */ - if ((!this->compress)||(this->disabled)) - continue; - /* Allocating memory for output buffer if necessary */ -- if ((this->compr_buf_sizecompr_buf)) { -+ if ((this->compr_buf_size < needed_buf_size) && (this->compr_buf)) { - free(this->compr_buf); - this->compr_buf_size=0; - this->compr_buf=NULL; - } - if (!this->compr_buf) { -- tmp_buf = malloc(orig_dlen+jffs2_compression_check); -+ tmp_buf = malloc(needed_buf_size); - if (!tmp_buf) { - fprintf(stderr,"mkfs.jffs2: No memory for compressor allocation. (%d bytes)\n",orig_dlen); - continue; -@@ -265,7 +302,8 @@ uint16_t jffs2_compress( unsigned char * - if (!compr_ret) { - if (jffs2_compression_check) - jffs2_decompression_test(this, data_in, this->compr_buf, *cdatalen, *datalen, this->compr_buf_size); -- if ((!best_dlen)||(best_dlen>*cdatalen)) { -+ if (((!best_dlen) || jffs2_is_best_compression(this, best, *cdatalen, best_dlen)) -+ && (*cdatalen < *datalen)) { - best_dlen = *cdatalen; - best_slen = *datalen; - best = this; -@@ -377,6 +415,9 @@ char *jffs2_stats(void) - case JFFS2_COMPR_MODE_SIZE: - act_buf += sprintf(act_buf,"size"); - break; -+ case JFFS2_COMPR_MODE_FAVOURLZO: -+ act_buf += sprintf(act_buf,"favourlzo"); -+ break; - default: - act_buf += sprintf(act_buf,"unkown"); - break; -@@ -413,6 +454,11 @@ int jffs2_set_compression_mode_name(cons - jffs2_compression_mode = JFFS2_COMPR_MODE_SIZE; - return 0; - } -+ if (!strcmp("favourlzo", name)) { -+ jffs2_compression_mode = JFFS2_COMPR_MODE_FAVOURLZO; -+ return 0; -+ } -+ - return 1; - } - -Index: git/compr.h -=================================================================== ---- git.orig/compr.h 2007-03-01 11:58:01.000000000 +0000 -+++ git/compr.h 2007-03-01 11:58:09.000000000 +0000 -@@ -32,6 +32,7 @@ - #define JFFS2_COMPR_MODE_NONE 0 - #define JFFS2_COMPR_MODE_PRIORITY 1 - #define JFFS2_COMPR_MODE_SIZE 2 -+#define JFFS2_COMPR_MODE_FAVOURLZO 3 - - #define kmalloc(a,b) malloc(a) - #define kfree(a) free(a) diff --git a/packages/mtd/mtd-utils/fix-ignoreerrors-20060131.patch b/packages/mtd/mtd-utils/fix-ignoreerrors-20060131.patch deleted file mode 100644 index 8266a37c46..0000000000 --- a/packages/mtd/mtd-utils/fix-ignoreerrors-20060131.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- mtd/util/nanddump.c.orig 2006-01-30 21:19:22.000000000 +0100 -+++ mtd/util/nanddump.c 2006-01-30 21:19:24.000000000 +0100 -@@ -224,7 +224,7 @@ - } - } - -- if (badblock) { -+ if (badblock && !ignoreerrors) { - if (omitbad) - continue; - memset (readbuf, 0xff, bs); -@@ -259,7 +259,7 @@ - if (omitoob) - continue; - -- if (badblock) { -+ if (badblock && !ignoreerrors) { - memset (readbuf, 0xff, meminfo.oobsize); - } else { - /* Read OOB data and exit on failure */ diff --git a/packages/mtd/mtd-utils/fix-ignoreerrors.patch b/packages/mtd/mtd-utils/fix-ignoreerrors.patch deleted file mode 100644 index b1f702a316..0000000000 --- a/packages/mtd/mtd-utils/fix-ignoreerrors.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- mtd/util/nanddump.c.orig 2005-12-30 19:07:39.000000000 +0100 -+++ mtd/util/nanddump.c 2005-12-30 19:08:53.000000000 +0100 -@@ -224,7 +224,7 @@ - } - } - -- if (badblock) { -+ if (badblock && !ignoreerrors) { - if (omitbad) - continue; - memset (readbuf, 0xff, bs); -@@ -259,7 +259,7 @@ - if (omitoob) - continue; - -- if (badblock) { -+ if (badblock && !ignoreerrors) { - memset (readbuf, 0xff, meminfo.oobsize); - } else { - /* Read OOB data and exit on failure */ diff --git a/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb b/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb deleted file mode 100644 index 96199f1602..0000000000 --- a/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "Tools for managing memory technology devices." -SECTION = "base" -DEPENDS = "zlib" -HOMEPAGE = "http://www.linux-mtd.infradead.org/" -LICENSE = "GPLv2" -PR = "r0" -SRCDATE = "20060223" - -SRC_URI = "cvs://anoncvs:anoncvs@cvs.infradead.org/home/cvs;module=mtd \ - file://add-exclusion-to-mkfs-jffs2-20060131.patch;patch=1 \ - file://fix-ignoreerrors-20060131.patch;patch=1" -S = "${WORKDIR}/mtd/" - -CFLAGS_prepend = "-I${S}/include " - -do_compile () { - oe_runmake -C util ${mtd_utils} -} - -do_stage () { - install -d ${STAGING_INCDIR}/mtd - for f in ${S}/include/mtd/*.h; do - install -m 0644 $f ${STAGING_INCDIR}/mtd/ - done - for binary in ${mtd_utils}; do - install -m 0755 util/$binary ${STAGING_BINDIR} - done -} - -mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ - mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \ - flashcp nandwrite jffs2dump sumtool" - -do_install () { - install -d ${D}${bindir} - for binary in ${mtd_utils}; do - install -m 0755 util/$binary ${D}${bindir} - done -} -- cgit v1.2.3 From fc798ce19aba645dfe0b29563e7f7e8c33ff01dc Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 10:18:31 +0000 Subject: webkit: fix dftables build --- packages/webkit/webkit_svn.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/webkit/webkit_svn.bb b/packages/webkit/webkit_svn.bb index 656b2384ac..10884a3dca 100644 --- a/packages/webkit/webkit_svn.bb +++ b/packages/webkit/webkit_svn.bb @@ -1,4 +1,4 @@ -DEPENDS = "libpcre flex-native gperf-native gperf perl-native curl icu uicmoc4-native qmake2-native libxml2 sqlite3 cairo libxslt libidn gnutls gtk+" +DEPENDS = "flex-native gperf-native gperf perl-native curl icu uicmoc4-native qmake2-native libxml2 sqlite3 cairo libxslt libidn gnutls gtk+" # Yes, this is wrong... PV = "0.0+svn${SRCDATE}" @@ -32,7 +32,9 @@ do_configure_append() { do_compile_prepend() { mkdir -p ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/ - cp ${STAGING_BINDIR_NATIVE}/dftables ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/ + cd ${S}/JavaScriptCore/pcre + ${BUILD_CC} dftables.c -o dftables -I. -I../wtf + cp dftables ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/ cd ${S}/WebKitBuilds/Debug } -- cgit v1.2.3 From b49cb416ed450da28047474fe3d7dc795fb22eb0 Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Wed, 25 Jul 2007 10:32:23 +0000 Subject: disapproval of revision '8cdc9906876cb88040360ad2c43a38608055f2b4' --- .../gpephone/phoneserver/phoneserver-gta01.patch | 391 +++++++++++++++++++++ packages/gpephone/phoneserver_1.0.bb | 7 +- 2 files changed, 396 insertions(+), 2 deletions(-) create mode 100644 packages/gpephone/phoneserver/phoneserver-gta01.patch (limited to 'packages') diff --git a/packages/gpephone/phoneserver/phoneserver-gta01.patch b/packages/gpephone/phoneserver/phoneserver-gta01.patch new file mode 100644 index 0000000000..fc5968ef5a --- /dev/null +++ b/packages/gpephone/phoneserver/phoneserver-gta01.patch @@ -0,0 +1,391 @@ +diff -u -r phoneserver-1.0/config.h phoneserver-1.0-mine/config.h +--- phoneserver-1.0/config.h 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/config.h 2007-07-10 15:06:28.000000000 +0200 +@@ -21,8 +21,7 @@ + + /* serial port name */ + #ifndef SERIAL_PORT +-//#define SERIAL_PORT "/dev/pts/0" //ttyS1" +-#define SERIAL_PORT "/dev/ttyS1" //ttyS1" ++#define SERIAL_PORT "/dev/ttySAC0" /* NEO1973 */ + #endif /* */ + + /* serial port baudrate */ +@@ -30,6 +29,8 @@ + #define SERIAL_BAUDRATE B115200 + #endif /* */ + ++#define CRTSCTS 1 /* NEO needs RTS/CTS flow control */ ++ + /* buffer to hold AT command response */ + #ifndef ATCOMMAND_BUFFER_SIZE + #define ATCOMMAND_BUFFER_SIZE 10240 +diff -u -r phoneserver-1.0/Makefile.am phoneserver-1.0-mine/Makefile.am +--- phoneserver-1.0/Makefile.am 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/Makefile.am 2007-07-10 13:14:47.000000000 +0200 +@@ -3,7 +3,7 @@ + + INCLUDES = @DEPS_CFLAGS@ -DPREFIX=\"@prefix@\" -D_GNU_SOURCE -Wall \ + -DDBUS_API_SUBJECT_TO_CHANGE \ +- -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DCELLON_PLATFORM ++ -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DT39_PLATFORM -DNEO1973 + LDADD = @DEPS_LIBS@ + + +diff -u -r phoneserver-1.0/Makefile.in phoneserver-1.0-mine/Makefile.in +--- phoneserver-1.0/Makefile.in 2007-02-02 13:25:43.000000000 +0100 ++++ phoneserver-1.0-mine/Makefile.in 2007-07-10 13:07:16.000000000 +0200 +@@ -158,7 +158,7 @@ + target_alias = @target_alias@ + INCLUDES = @DEPS_CFLAGS@ -DPREFIX=\"@prefix@\" -D_GNU_SOURCE -Wall \ + -DDBUS_API_SUBJECT_TO_CHANGE \ +- -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DCELLON_PLATFORM ++ -DDEBUG -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DT39_PLATFORM + + LDADD = @DEPS_LIBS@ + phoneserver_SOURCES = phoneserver.c phone-server-voc.c phone-server-sms.c phone-server-mul.c phone-server-pbk.c \ +diff -u -r phoneserver-1.0/phoneserver.c phoneserver-1.0-mine/phoneserver.c +--- phoneserver-1.0/phoneserver.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/phoneserver.c 2007-07-10 13:43:57.000000000 +0200 +@@ -324,22 +324,31 @@ + phonebook_update_entry_handler); + #endif + ++#ifdef NEO1973 ++ system("echo 1 > /sys/devices/platform/gta01-pm-gsm.0/power_on"); ++ sleep(1); ++#endif ++ + // tapi begins + // Initialize + result = tapi_initialize (); + + // Get file descripter +- if (result == TEL_ERR_NONE) +- { ++ if (result == TEL_ERR_NONE) { + result = tel_get_fd (sid, (UInt32 *) & g_fd); ++ } else { ++ /* without modem there is nothing we can do */ ++ exit(1); + } ++ + // Open session +- if (result == TEL_ERR_NONE) +- { ++ if (result == TEL_ERR_NONE) { + result = tel_open_session (&sid); ++ } else { ++ /* without fd we are as well useless */ ++ exit(1); + } + +- + if (result == TEL_ERR_NONE) + { + /* pbk section */ +@@ -357,6 +366,9 @@ + tel_evt_register (sid, TEL_EVENT_MTSMS, sms_incoming_cb, NULL); + tel_evt_register (sid, TEL_EVENT_STATUS_REPORT, sta_report_cb, NULL); + ++ } else { ++ /* without session we are also lost */ ++ exit(1); + } + // tapi ends + #if 1 +diff -u -r phoneserver-1.0/phone-server-voc.c phoneserver-1.0-mine/phone-server-voc.c +--- phoneserver-1.0/phone-server-voc.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/phone-server-voc.c 2007-07-10 16:38:12.000000000 +0200 +@@ -1028,6 +1028,7 @@ + g_print ("$$$$$$$$$$$$$$$$$$$notify VOC about the %s, and call_id = %d\n", + pmethod, call_id); + ++#if 0 + //0803 + + guint index; +@@ -1038,7 +1039,7 @@ + ("###The held call which is going to be hungup is equal to: %d, index=%d,cid=%d", + call_id, index, cid_dbus); + //0803 +- ++#endif + + if (!strcmp (pmethod, "accept")) + { +diff -u -r phoneserver-1.0/serial.c phoneserver-1.0-mine/serial.c +--- phoneserver-1.0/serial.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/serial.c 2007-07-10 15:07:14.000000000 +0200 +@@ -124,7 +124,7 @@ + + + /* Open a device with standard options. +- *Use value (-1) for "with_hw_handshake" if its specification is required from the user. ++ * Use value (-1) for "with_hw_handshake" if its specification is required from the user. + */ + int + serial_opendevice (const Int8 *file, Int32 with_odd_parity, Int32 with_async) +@@ -148,8 +148,7 @@ + + /* Set port settings for canonical input processing */ + tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL; +- if (with_odd_parity) +- { ++ if (with_odd_parity) { + tp.c_cflag |= (PARENB | PARODD); + tp.c_iflag = 0; + } +@@ -157,35 +156,36 @@ + tp.c_iflag = IGNPAR; + + #ifdef CRTSCTS ++ tp.c_cflag |= CRTSCTS; ++#else + tp.c_cflag &= ~CRTSCTS; +- +-#endif /* */ ++#endif + tp.c_oflag = 0; + tp.c_lflag = 0; + tp.c_cc[VMIN] = 1; + tp.c_cc[VTIME] = 0; ++ + retcode = tcflush (fd, TCIFLUSH); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: tcflush"); + serial_close (fd); + return -1; + } ++ + retcode = tcsetattr (fd, TCSANOW, &tp); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: tcsetattr"); + serial_close (fd); + return -1; + } ++ + serial_changespeed (fd, 115200); + + /* We need to turn off O_NONBLOCK now (we have CLOCAL set so it is safe). + *When we run some device script it really doesn't expect NONBLOCK! + */ + retcode = fcntl (fd, F_SETFL, 0); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: fnctl(F_SETFL)"); + serial_close (fd); + return -1; +@@ -195,8 +195,7 @@ + + #if !(__unices__) + retcode = fcntl (fd, F_SETOWN, getpid ()); +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: fnctl(F_SETOWN)"); + serial_close (fd); + return -1; +@@ -223,12 +222,12 @@ + + # endif + #endif /* */ +- if (retcode == -1) +- { ++ if (retcode == -1) { + perror ("Gnokii serial_opendevice: fnctl(F_SETFL)"); + serial_close (fd); + return -1; + } ++ + return fd; + } + +@@ -240,15 +239,16 @@ + unsigned int flags; + + flags = TIOCM_DTR; ++ + if (dtr) + ioctl (fd, TIOCMBIS, &flags); +- + else + ioctl (fd, TIOCMBIC, &flags); ++ + flags = TIOCM_RTS; ++ + if (rts) + ioctl (fd, TIOCMBIS, &flags); +- + else + ioctl (fd, TIOCMBIC, &flags); + } +@@ -262,6 +262,7 @@ + FD_SET (fd, &readfds); + return select (fd + 1, &readfds, NULL, NULL, timeout); + } ++ + static int + serial_wselect (int fd, struct timeval *timeout) + { +@@ -361,12 +362,9 @@ + { + bs = n; + got = write (fd, buf + r, bs); +- if (got == 0) +- { +- g_print ("Serial write: oops, zero byte has written!\n"); +- } +- else if (got < 0) +- { ++ if (got == 0) { ++ g_print ("Serial write: oops, zero byte written!\n"); ++ } else if (got < 0) { + if (errno == EINTR) + continue; + if (errno != EAGAIN) +diff -u -r phoneserver-1.0/tapi.c phoneserver-1.0-mine/tapi.c +--- phoneserver-1.0/tapi.c 2007-02-02 13:20:13.000000000 +0100 ++++ phoneserver-1.0-mine/tapi.c 2007-07-10 16:51:22.000000000 +0200 +@@ -112,6 +112,7 @@ + /************************************************************************/ + /* Initialization Function Block */ + /************************************************************************/ ++tel_err_t tapi_Init_PowerOn (); + tel_err_t tapi_Init_SoftReset (); + tel_err_t tapi_Init_SetNoEcho (); + tel_err_t tapi_Init_SetCharset (); +@@ -287,6 +288,7 @@ + + ****************/ + static init_function init_func_table[] = { ++ tapi_Init_PowerOn, + tapi_Init_SoftReset, + tapi_Init_SetNoEcho, + tapi_Init_SetCharset, +@@ -477,6 +479,18 @@ + + + tel_err_t ++tapi_Init_PowerOn () ++{ ++ tel_err_t result; ++ Int8 *CommandStr; ++ ++ /* AT+CFUN=1 */ ++ CommandStr = AT_Builder_ExeCmd ((Int8 *) CMD_CFUN, (Int8 *) "=1", (Int8 *) NULL); ++ result = tapi_init_general (CommandStr); ++ return result; ++} ++ ++tel_err_t + tapi_Init_SoftReset () + { + tel_err_t result; +@@ -516,7 +530,7 @@ + //TODO: This phone does not support "HEX", we should set it to HEX + #ifdef T39_PLATFORM + CommandStr = +- AT_Builder_SetCmd ((Int8 *) CMD_CSCS, (Int8 *) "\"UTF-8\"", (Int8 *) NULL); ++ AT_Builder_SetCmd ((Int8 *) CMD_CSCS, (Int8 *) "\"8859-1\"", (Int8 *) NULL); + #endif + #ifdef CELLON_PLATFORM + CommandStr = +@@ -689,8 +703,8 @@ + (Int8 *) "0", (Int8 *) "1", (Int8 *) "0", (Int8 *) NULL); + #else + CommandStr = +- AT_Builder_SetCmd ((Int8 *) CMD_CNMI, (Int8 *) "3", (Int8 *) "1", +- (Int8 *) "0", (Int8 *) "0", (Int8 *) "0", (Int8 *) NULL); ++ AT_Builder_SetCmd ((Int8 *) CMD_CNMI, (Int8 *) "2", (Int8 *) "1", ++ (Int8 *) "0", (Int8 *) "1", (Int8 *) "0", (Int8 *) NULL); + #endif + result = tapi_init_general (CommandStr); + return result; +@@ -1737,7 +1751,7 @@ + (*evt)->evt_data.async_data.cb = tel_ctx.cur_async_evt.cb; + (*evt)->evt_data.async_data.user_data = tel_ctx.cur_async_evt.user_data; + #ifdef DEBUG +- //g_print("sms data is --> %s\n", data->user_data[0].text); ++ g_print("sms data is --> %s\n", data->user_data[0].text); + #endif + return TEL_ERR_NONE; + } +@@ -1979,14 +1993,14 @@ + sscanf (param_str, "%d", &index); + entry->index = index; + #ifdef DEBUG +- //g_print("index -> %d\n", index); ++ g_print("index -> %d\n", index); + #endif + /* number */ + param_str = (Int8 *) g_ptr_array_index (param, 1); + //exclude the quotation + memcpy (entry->number.number, param_str + 1, strlen (param_str) - 2); + #ifdef DEBUG +- //g_print("number -> %s\n", entry->number.number); ++ g_print("number -> %s\n", entry->number.number); + #endif + /* type */ + param_str = (Int8 *) g_ptr_array_index (param, 2); +@@ -1994,7 +2008,7 @@ + entry->number.npi = index & 0xF; + entry->number.ton = (index & 0x70) >> 4; + #ifdef DEBUG +- //g_print("type -> %s\n", param_str); ++ g_print("type -> %s\n", param_str); + #endif + /* text */ + param_str = (Int8 *) g_ptr_array_index (param, 3); +@@ -2015,7 +2029,7 @@ + char_unicode_decode (entry->text, entry_textbuffer, len); + #endif + #ifdef DEBUG +- //g_print("text -> %s\n", entry->text); ++ g_print("text -> %s\n", entry->text); + #endif + AT_Parser_Free (param); + /* add the entry into array */ +@@ -2524,11 +2538,11 @@ + tel_call_info_change_t *call_status = g_new0 (tel_call_info_change_t, 1); + at_command_buffer_t *cmd_buffer; + +- //g_print("AT_UNSO_PPURC_Handler called\n"); +-// cmd_buffer = tapi_get_cmd_buffer(in_buffer, CMD_PPURC, 0, NULL); ++ g_print("AT_UNSO_PPURC_Handler called\n"); ++ cmd_buffer = tapi_get_cmd_buffer(in_buffer, CMD_PPURC, 0, NULL); + #ifdef DEBUG +- //g_print("====cur parser pos is ---> %d\n", tel_ctx.cur_parser_pos); +- //g_print("====total parser item is ---> %d\n", tel_ctx.cur_resp.cmd->len); ++ g_print("====cur parser pos is ---> %d\n", tel_ctx.cur_parser_pos); ++ g_print("====total parser item is ---> %d\n", tel_ctx.cur_resp.cmd->len); + #endif + cmd_buffer = + tapi_get_cmd_buffer (in_buffer, CMD_PPURC, tel_ctx.cur_parser_pos - 1, +@@ -3749,8 +3763,10 @@ + break; + case TEL_HANGUPALL: + /* +CHUP */ ++ //CommandStr = ++ // AT_Builder_ExeCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); + CommandStr = +- AT_Builder_ExeCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); ++ AT_Builder_ExeCmd ((Int8 *) "H", (Int8 *) NULL, (Int8 *) NULL); + break; + case TEL_HANGUPACTIVE_ACCEPTOTHER: + /* +CHLD=1 */ +@@ -3859,7 +3875,8 @@ + break; + case TEL_HANGUPALL: + /* +CHUP */ +- AT_Builder_AppendCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); ++ //AT_Builder_AppendCmd ((Int8 *) CMD_CHUP, (Int8 *) NULL, (Int8 *) NULL); ++ AT_Builder_AppendCmd ((Int8 *) "H", (Int8 *) NULL, (Int8 *) NULL); + break; + case TEL_HANGUPACTIVE_ACCEPTOTHER: + /* +CHLD=1 */ diff --git a/packages/gpephone/phoneserver_1.0.bb b/packages/gpephone/phoneserver_1.0.bb index 522d31cee1..d85bbf1699 100644 --- a/packages/gpephone/phoneserver_1.0.bb +++ b/packages/gpephone/phoneserver_1.0.bb @@ -2,12 +2,15 @@ LICENSE = "LiPS" DESCRIPTION = "Phone services server" SECTION = "gpe" PRIORITY = "optional" -PR = "r1" +PR = "r2" + +PACKAGE_ARCH = "${MACHINE}" DEPENDS = "dbus-glib glib-2.0 libmsgenabler libabenabler" GPE_TARBALL_SUFFIX= "bz2" inherit gpephone autotools -SRC_URI += "file://changeport.patch;patch=1;pnum=0" +SRC_URI_append_x86 = " file://changeport.patch;patch=1;pnum=0" +SRC_URI_append_fic-gta01 = " file://phoneserver-gta01.patch;patch=1" -- cgit v1.2.3 From 3a1f4cca35c4e7665932a4f574d43cc68d470281 Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Wed, 25 Jul 2007 10:35:55 +0000 Subject: phoneserver: Fix PACKAGE_ARCH --- packages/gpephone/phoneserver_1.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/gpephone/phoneserver_1.0.bb b/packages/gpephone/phoneserver_1.0.bb index d85bbf1699..1415951473 100644 --- a/packages/gpephone/phoneserver_1.0.bb +++ b/packages/gpephone/phoneserver_1.0.bb @@ -2,9 +2,9 @@ LICENSE = "LiPS" DESCRIPTION = "Phone services server" SECTION = "gpe" PRIORITY = "optional" -PR = "r2" +PR = "r3" -PACKAGE_ARCH = "${MACHINE}" +PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "dbus-glib glib-2.0 libmsgenabler libabenabler" -- cgit v1.2.3 From af3fdf9495476b000ff6b50e8c3b8e15fa1ff422 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 14:31:04 +0000 Subject: webkit: add some qmake magic from zecke to make install and staging work better --- packages/webkit/webkit_svn.bb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/webkit/webkit_svn.bb b/packages/webkit/webkit_svn.bb index 10884a3dca..c5f5dcafa7 100644 --- a/packages/webkit/webkit_svn.bb +++ b/packages/webkit/webkit_svn.bb @@ -27,7 +27,7 @@ do_configure_append() { qmake2 -spec ${QMAKESPEC} CONFIG+=gdk-port CONFIG-=qt CONFIG-=release CONFIG+=debug mkdir -p WebKitBuilds/Debug cd WebKitBuilds/Debug - PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro + PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro WEBKIT_INC_DIR=${prefix}/include WEBKIT_LIB_DIR=${libdir} } do_compile_prepend() { @@ -44,11 +44,20 @@ do_install() { install -d ${D}${libdir}/pkgconfig install -m 0755 ${S}/WebKitBuilds/Debug/WebKitTools/GdkLauncher/GdkLauncher ${D}${bindir} - cp -pPR WebKitBuilds/Debug/lib/*.so* ${D}${libdir} - cp -pPR WebKitBuilds/Debug/lib/*.pc ${D}${libdir}/pkgconfig/ || true + cd ${S}/WebKitBuilds/Debug + PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro WEBKIT_INC_DIR=${D}${prefix}/include WEBKIT_LIB_DIR=${D}${libdir} + oe_runmake install } +do_stage() { + install -d ${STAGING_LIBDIR} + install -d ${STAGING_INCDIR} + cd ${S}/WebKitBuilds/Debug + PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro WEBKIT_INC_DIR=${STAGING_INCDIR} WEBKIT_LIB_DIR=${STAGING_LIBDIR} + oe_runmake install +} + PACKAGES =+ "webkit-gdklauncher-dbg webkit-gdklauncher" FILES_webkit-gdklauncher = "${bindir}/GdkLauncher" -- cgit v1.2.3 From 5e0430f8ebbe9cdf22423e8b2a39c5efe9dd301e Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 25 Jul 2007 14:46:01 +0000 Subject: Remove bashism from linux-gta01.inc --- packages/linux/linux-gta01.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/linux/linux-gta01.inc b/packages/linux/linux-gta01.inc index 915e5633af..098ae9d069 100644 --- a/packages/linux/linux-gta01.inc +++ b/packages/linux/linux-gta01.inc @@ -62,7 +62,7 @@ do_configure() { echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - if [ "${TARGET_OS}" == "linux-gnueabi" ]; then + if [ "${TARGET_OS}" = "linux-gnueabi" ]; then echo "CONFIG_AEABI=y" >> ${S}/.config echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config else -- cgit v1.2.3 From 61ef961eaa201ac885e2412d529125511c0b7801 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 16:58:12 +0000 Subject: gcc 4.2.1: add missing uclibc locale patch and a patch to reduce binary size with -Os --- packages/gcc/gcc-4.2.1/200-uclibc-locale.patch | 8 +- .../gcc/gcc-4.2.1/904-flatten-switch-stmt-00.patch | 153 +++++++++++++++++++++ packages/gcc/gcc_4.2.1.bb | 3 +- 3 files changed, 159 insertions(+), 5 deletions(-) create mode 100644 packages/gcc/gcc-4.2.1/904-flatten-switch-stmt-00.patch (limited to 'packages') diff --git a/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch b/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch index c933d1c446..ea21388b75 100644 --- a/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch +++ b/packages/gcc/gcc-4.2.1/200-uclibc-locale.patch @@ -1,14 +1,14 @@ --- gcc/libstdc++-v3/acinclude.m4 +++ gcc/libstdc++-v3/acinclude.m4 @@ -1369,7 +1369,7 @@ - AC_MSG_CHECKING([for C locale to use]) + AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], [use MODEL for target locale package], - [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) + [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) - - # If they didn't use this option switch, or if they specified --enable - # with no specific model, we'll have to look for one. If they + + # Deal with gettext issues. Default to not using it (=no) until we detect + # support for it later. Let the user turn it off via --e/d, but let that @@ -1385,6 +1385,9 @@ # Default to "generic". if test $enable_clocale_flag = auto; then diff --git a/packages/gcc/gcc-4.2.1/904-flatten-switch-stmt-00.patch b/packages/gcc/gcc-4.2.1/904-flatten-switch-stmt-00.patch new file mode 100644 index 0000000000..8fac37c4df --- /dev/null +++ b/packages/gcc/gcc-4.2.1/904-flatten-switch-stmt-00.patch @@ -0,0 +1,153 @@ +Hi, + +The attached patch makes sure that we create smaller object code for +simple switch statements. We just make sure to flatten the switch +statement into an if-else chain, basically. + +This fixes a size-regression as compared to gcc-3.4, as can be seen +below. + +2007-04-15 Bernhard Fischer <..> + + * stmt.c (expand_case): Do not create a complex binary tree when + optimizing for size but rather use the simple ordered list. + (emit_case_nodes): do not emit jumps to the default_label when + optimizing for size. + +Not regtested so far. +Comments? + +Attached is the test switch.c mentioned below. + +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done + +$ size switch-*.o + text data bss dec hex filename + 169 0 0 169 a9 switch-2.95.o + 115 0 0 115 73 switch-3.3.o + 103 0 0 103 67 switch-3.4.o + 124 0 0 124 7c switch-4.0.o + 124 0 0 124 7c switch-4.1.o + 124 0 0 124 7c switch-4.2.orig-HEAD.o + 95 0 0 95 5f switch-4.3-HEAD.o + 124 0 0 124 7c switch-4.3.orig-HEAD.o + 166 0 0 166 a6 switch-CHAIN-2.95.o + 111 0 0 111 6f switch-CHAIN-3.3.o + 95 0 0 95 5f switch-CHAIN-3.4.o + 95 0 0 95 5f switch-CHAIN-4.0.o + 95 0 0 95 5f switch-CHAIN-4.1.o + 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o + + +Content-Type: text/x-diff; charset=us-ascii +Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" + +Index: gcc-4.2.0/gcc/stmt.c +=================================================================== +--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843) ++++ gcc-4.2.0/gcc/stmt.c (working copy) +@@ -2517,7 +2517,11 @@ expand_case (tree exp) + use_cost_table + = (TREE_CODE (orig_type) != ENUMERAL_TYPE + && estimate_case_costs (case_list)); +- balance_case_nodes (&case_list, NULL); ++ /* When optimizing for size, we want a straight list to avoid ++ jumps as much as possible. This basically creates an if-else ++ chain. */ ++ if (!optimize_size) ++ balance_case_nodes (&case_list, NULL); + emit_case_nodes (index, case_list, default_label, index_type); + emit_jump (default_label); + } +@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt + { + if (!node_has_low_bound (node, index_type)) + { ++ if (!optimize_size) /* don't jl to the .default_label. */ + emit_cmp_and_jump_insns (index, + convert_modes + (mode, imode, + + +Content-Type: text/x-csrc; charset=us-ascii +Content-Disposition: attachment; filename="switch.c" + +int +commutative_tree_code (int code) +{ +#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret; +#ifndef CHAIN + switch (code) + { +# if 1 + CASE(1,3) + CASE(3,2) + CASE(5,8) + CASE(7,1) + CASE(33,4) + CASE(44,9) + CASE(55,10) + CASE(66,-1) + CASE(77,99) + CASE(666,0) +# else + case 1: + return 3; + case 3: + return 2; + case 5: + return 8; + case 7: + return 1; + case 33: + return 4; + case 44: + return 9; + case 55: + return 10; + case 66: + return -1; + case 77: + return 99; + case 666: + return 0; +# endif + default: + break; + } + return 4711; + +#else + if (code == 1) + return 3; + else if (code == 3) + return 2; + else if (code == 5) + return 8; + else if (code == 7) + return 1; + else if (code == 33) + return 4; + else if (code == 44) + return 9; + else if (code == 55) + return 10; + else if (code == 66) + return -1; + else if (code == 77) + return 99; + else if (code == 666) + return 0; + else + return 4711; +#endif +} + + +--AhhlLboLdkugWU4S-- + diff --git a/packages/gcc/gcc_4.2.1.bb b/packages/gcc/gcc_4.2.1.bb index dd3a9c59cc..79d32d45ce 100644 --- a/packages/gcc/gcc_4.2.1.bb +++ b/packages/gcc/gcc_4.2.1.bb @@ -10,7 +10,7 @@ require gcc-package.inc SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://100-uclibc-conf.patch;patch=1 \ -# file://200-uclibc-locale.patch;patch=1 \ + file://200-uclibc-locale.patch;patch=1 \ file://300-libstdc++-pic.patch;patch=1 \ file://301-missing-execinfo_h.patch;patch=1 \ file://302-c99-snprintf.patch;patch=1 \ @@ -19,6 +19,7 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://602-sdk-libstdc++-includes.patch;patch=1 \ file://740-sh-pr24836.patch;patch=1 \ file://800-arm-bigendian.patch;patch=1 \ + file://904-flatten-switch-stmt-00.patch;patch=1 \ file://arm-nolibfloat.patch;patch=1 \ file://arm-softfloat.patch;patch=1 \ file://gcc41-configure.in.patch;patch=1 \ -- cgit v1.2.3 From 0b76fcd34931913aaa1ce37b010eb205acd8019b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 17:17:56 +0000 Subject: wifi-radar: fix rdepends, closes #2684 --- packages/wifi-radar/wifi-radar_1.9.6.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/wifi-radar/wifi-radar_1.9.6.bb b/packages/wifi-radar/wifi-radar_1.9.6.bb index 70e913e086..59d24b9d74 100644 --- a/packages/wifi-radar/wifi-radar_1.9.6.bb +++ b/packages/wifi-radar/wifi-radar_1.9.6.bb @@ -3,9 +3,11 @@ DESCRIPTION="WiFi Radar is a Python/PyGTK2 utility for managing WiFi profiles." HOMEPAGE="http://www.bitbuilder.com/wifi_radar/" LICENSE = "GPL" +PR = "r1" + PACKAGE_ARCH = "all" -RDEPENDS = "python-core python-pygtk2 python-re python-io" +RDEPENDS = "python-core python-pygtk2 python-re python-io python-pygobject python-pycairo" SRC_URI="http://wifi-radar.systemimager.org/pub/${PN}-${PV}.tar.bz2 \ file://wifi-radar.patch;patch=1 \ -- cgit v1.2.3 From af94b0cbe6a90e6fd541d299060847654dee2a63 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Jul 2007 12:44:52 +0000 Subject: bluez-gnome: re-add cvs recipe --- packages/bluez/bluez-gnome_cvs.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/bluez/bluez-gnome_cvs.bb (limited to 'packages') diff --git a/packages/bluez/bluez-gnome_cvs.bb b/packages/bluez/bluez-gnome_cvs.bb new file mode 100644 index 0000000000..65412663a0 --- /dev/null +++ b/packages/bluez/bluez-gnome_cvs.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "BLuetooth configuration applet" +LICENSE = "GPL+LGPL" + +DEFAULT_PREFERENCE = "-1" + +DEPENDS = "dbus-glib gconf libnotify gtk+" + +SRC_URI = "cvs://anonymous@cvs.bluez.org/cvsroot/bluez;module=gnome \ + " + +PV = "0.9+cvs${SRCDATE}" +S = "${WORKDIR}/gnome" + +inherit autotools pkgconfig gconf + +FILES_${PN} += "${datadir}/gconf" + -- cgit v1.2.3 From f03685ab6480294ba673f9aff7fc7d66839392f0 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 26 Jul 2007 13:54:30 +0000 Subject: packages/asterisk/asterisk-1.2.23 : Add asterisk 1.2.23 which has some vulnerability fixes --- packages/asterisk/asterisk-1.2.23/.mtn2git_empty | 0 packages/asterisk/asterisk-1.2.23/asterisk.patch | 221 +++++++++++++++++++++ .../asterisk/asterisk-1.2.23/enable-speex.patch | 21 ++ .../asterisk-1.2.23/uclibc-compat-getloadavg.patch | 13 ++ packages/asterisk/asterisk-1.2.23/uclibc-dns.patch | 18 ++ packages/asterisk/asterisk_1.2.23.bb | 44 ++++ 6 files changed, 317 insertions(+) create mode 100644 packages/asterisk/asterisk-1.2.23/.mtn2git_empty create mode 100644 packages/asterisk/asterisk-1.2.23/asterisk.patch create mode 100644 packages/asterisk/asterisk-1.2.23/enable-speex.patch create mode 100644 packages/asterisk/asterisk-1.2.23/uclibc-compat-getloadavg.patch create mode 100644 packages/asterisk/asterisk-1.2.23/uclibc-dns.patch create mode 100644 packages/asterisk/asterisk_1.2.23.bb (limited to 'packages') diff --git a/packages/asterisk/asterisk-1.2.23/.mtn2git_empty b/packages/asterisk/asterisk-1.2.23/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/asterisk/asterisk-1.2.23/asterisk.patch b/packages/asterisk/asterisk-1.2.23/asterisk.patch new file mode 100644 index 0000000000..006b8e9291 --- /dev/null +++ b/packages/asterisk/asterisk-1.2.23/asterisk.patch @@ -0,0 +1,221 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- asterisk-1.2.9.1/./Makefile~asterisk ++++ asterisk-1.2.9.1/./Makefile +@@ -331,7 +331,7 @@ + ASTCFLAGS+= $(TRACE_FRAMES) + ASTCFLAGS+= $(MALLOC_DEBUG) + ASTCFLAGS+= $(BUSYDETECT) +-ASTCFLAGS+= $(OPTIONS) ++#ASTCFLAGS+= $(OPTIONS) + ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize) + ASTCFLAGS+= -fomit-frame-pointer + endif +@@ -347,12 +347,12 @@ + netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \ + cryptostub.o + +-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) ++ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/sys/poll.h),) + OBJS+= poll.o + ASTCFLAGS+=-DPOLLCOMPAT + endif + +-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) ++ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),) + OBJS+= dlfcn.o + ASTCFLAGS+=-DDLFCNCOMPAT + endif +@@ -397,7 +397,7 @@ + endif + + ifeq ($(MAKETOPLEVEL),$(MAKELEVEL)) +- CFLAGS+=$(ASTCFLAGS) ++override CFLAGS+=$(ASTCFLAGS) + endif + + # This is used when generating the doxygen documentation +@@ -519,7 +519,7 @@ + fi + rm -f include/asterisk/build.h.tmp + $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c +- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) ++ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LDFLAGS) $(LIBS) + + muted: muted.o + $(CC) $(AUDIO_LIBS) -o muted muted.o +--- asterisk-1.2.9.1/codecs/gsm/Makefile~asterisk ++++ asterisk-1.2.9.1/codecs/gsm/Makefile +@@ -51,7 +51,7 @@ + ifneq (${PROC},ppc) + ifneq (${PROC},ppc64) + ifneq (${PROC},s390) +-OPTIMIZE+=-march=$(PROC) ++#OPTIMIZE+=-march=$(PROC) + endif + endif + endif +@@ -243,7 +243,7 @@ + ifneq (${PROC},arm) + ifneq ($(shell uname -m), parisc) + ifneq ($(shell uname -m),s390) +-GSM_SOURCES+= $(SRC)/k6opt.s ++#GSM_SOURCES+= $(SRC)/k6opt.s + endif + endif + endif +@@ -309,7 +309,7 @@ + ifneq ($(shell uname -m), armv4l) + ifneq ($(shell uname -m), parisc) + ifneq ($(shell uname -m),s390) +-GSM_OBJECTS+= $(SRC)/k6opt.o ++#GSM_OBJECTS+= $(SRC)/k6opt.o + endif + endif + endif +--- asterisk-1.2.9.1/res/Makefile~asterisk ++++ asterisk-1.2.9.1/res/Makefile +@@ -89,7 +89,7 @@ + fi + + res_crypto.so: res_crypto.o +- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS) ++ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} $(CRYPTO_LIBS) + + clean: + rm -f *.so *.o .depend +--- asterisk-1.2.9.1/channels/Makefile~asterisk ++++ asterisk-1.2.9.1/channels/Makefile +@@ -73,7 +73,7 @@ + SOLINK+=-lrt + endif + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/ixjuser.h),) + CHANNEL_LIBS+=chan_phone.so + endif + +@@ -88,16 +88,16 @@ + + CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/alsa/asoundlib.h),) + CHANNEL_LIBS+=chan_alsa.so + endif + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libpri.so.1),) + CFLAGS+=-DZAPATA_PRI + ZAPPRI=-lpri + endif + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libmfcr2.so.1),) + CFLAGS+=-DZAPATA_R2 + ZAPR2=-lmfcr2 + endif +@@ -110,7 +110,7 @@ + endif + + ifndef WITHOUT_ZAPTEL +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/zaptel.h),) + ifeq (${OSARCH},NetBSD) + SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib + endif +@@ -122,7 +122,7 @@ + endif + endif # WITHOUT_ZAPTEL + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vpbapi.h),) + CHANNEL_LIBS+=chan_vpb.so + CFLAGS+=-DLINUX + endif +@@ -137,7 +137,7 @@ + + ZAPDIR=/usr/lib + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/nbs.h),) + CHANNEL_LIBS+=chan_nbs.so + endif + +@@ -158,7 +158,7 @@ + rm -f busy.h ringtone.h gentone gentone-ulaw + + %.so : %.o +- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS} ++ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} ${LIBS} + + ifneq ($(wildcard .depend),) + include .depend +@@ -215,7 +215,7 @@ + chan_alsa.o: $(ALSA_SRC) + + chan_alsa.so: chan_alsa.o +- $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl ++ $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl $(LDFLAGS) + + chan_nbs.so: chan_nbs.o + $(CC) $(SOLINK) -o $@ $< -lnbs +--- asterisk-1.2.9.1/pbx/Makefile~asterisk ++++ asterisk-1.2.9.1/pbx/Makefile +@@ -59,7 +59,7 @@ + $(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS) + + pbx_dundi.so: dundi-parser.o pbx_dundi.o +- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} ++ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} $(LDFLAGS) + + %.moc : %.h + $(MOC) $< -o $@ +--- asterisk-1.2.9.1/formats/Makefile~asterisk ++++ asterisk-1.2.9.1/formats/Makefile +@@ -25,7 +25,7 @@ + # + # OGG/Vorbis format + # +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vorbis/codec.h),) + FORMAT_LIBS+=format_ogg_vorbis.so + endif + +@@ -57,7 +57,7 @@ + $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm + + format_ogg_vorbis.so : format_ogg_vorbis.o +- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm ++ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm $(LDFLAGS) + + install: all + for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done +--- asterisk-1.2.9.1/utils/Makefile~asterisk ++++ asterisk-1.2.9.1/utils/Makefile +@@ -22,11 +22,11 @@ + + TARGET=stereorize streamplayer + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/popt.h),) + TARGET+=smsq + endif + +-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),) ++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/newt.h),) + TARGET+=astman + endif + +@@ -64,7 +64,7 @@ + $(CC) $(CFLAGS) -o $@ $^ + + smsq: smsq.o +- $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt ++ $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt $(LDFLAGS) + + streamplayer: streamplayer.o + $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS} diff --git a/packages/asterisk/asterisk-1.2.23/enable-speex.patch b/packages/asterisk/asterisk-1.2.23/enable-speex.patch new file mode 100644 index 0000000000..0f5c578bd9 --- /dev/null +++ b/packages/asterisk/asterisk-1.2.23/enable-speex.patch @@ -0,0 +1,21 @@ +--- /codecs/orig-Makefile 2005-11-29 13:24:39.000000000 -0500 ++++ /codecs/Makefile 2007-02-28 09:54:42.000000000 -0500 +@@ -29,7 +29,7 @@ + endif + + UI_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/speex.h) +-UIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/speex/speex.h) ++UIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/include/speex/speex.h) + ULI_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/speex.h) + ULIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/speex/speex.h) + ifneq (${UI_SPEEX},) +@@ -38,7 +38,8 @@ + endif + ifneq (${UIS_SPEEX},) + MODSPEEX=codec_speex.so +- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/include/speex ++ CFLAGS+=-I$(CROSS_COMPILE_TARGET)/include/speex ++ LIBSPEEX=-L$(CROSS_COMPILE_TARGET)/lib + LIBSPEEX+=-lspeex -lm + endif + ifneq (${ULI_SPEEX},) diff --git a/packages/asterisk/asterisk-1.2.23/uclibc-compat-getloadavg.patch b/packages/asterisk/asterisk-1.2.23/uclibc-compat-getloadavg.patch new file mode 100644 index 0000000000..a909513b1c --- /dev/null +++ b/packages/asterisk/asterisk-1.2.23/uclibc-compat-getloadavg.patch @@ -0,0 +1,13 @@ +diff -ruN asterisk-1.2.0-old/include/asterisk/compat.h asterisk-1.2.0-new/include/asterisk/compat.h +--- asterisk-1.2.0-old/include/asterisk/compat.h 2005-11-08 05:13:19.000000000 +0100 ++++ asterisk-1.2.0-new/include/asterisk/compat.h 2005-12-04 05:32:31.000000000 +0100 +@@ -75,7 +75,9 @@ + #define HAVE_STRTOQ + + #ifdef _BSD_SOURCE ++#ifndef __UCLIBC__ + #define HAVE_GETLOADAVG ++#endif /* __UCLIBC__ */ + #endif + + #ifdef __linux__ diff --git a/packages/asterisk/asterisk-1.2.23/uclibc-dns.patch b/packages/asterisk/asterisk-1.2.23/uclibc-dns.patch new file mode 100644 index 0000000000..4ba8b6205b --- /dev/null +++ b/packages/asterisk/asterisk-1.2.23/uclibc-dns.patch @@ -0,0 +1,18 @@ +--- /orig-dns.c 2007-07-16 23:46:58.000000000 +0300 ++++ /dns.c 2007-07-26 16:29:44.000000000 +0300 +@@ -237,7 +237,14 @@ + #if defined(res_ndestroy) + #define HAS_RES_NDESTROY + #endif +-#else ++#endif ++ ++#ifdef __UCLIBC__ ++#undef HAS_RES_NINIT ++#undef HAS_RES_NDESTROY ++#endif ++ ++#ifndef HAS_RES_NINIT + AST_MUTEX_DEFINE_STATIC(res_lock); + #if 0 + #warning "Warning, res_ninit is missing... Could have reentrancy issues" diff --git a/packages/asterisk/asterisk_1.2.23.bb b/packages/asterisk/asterisk_1.2.23.bb new file mode 100644 index 0000000000..3d91637dba --- /dev/null +++ b/packages/asterisk/asterisk_1.2.23.bb @@ -0,0 +1,44 @@ +DESCRIPTION="The Asterisk open source software PBX" +HOMEPAGE="www.asterisk.org" +LICENSE="GPL" +DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis speex" +SECTION = "console/telephony" +PR = "r0" + +SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \ + file://uclibc-compat-getloadavg.patch;patch=1 \ + file://uclibc-dns.patch;patch=1 \ + file://asterisk.patch;patch=1 \ + file://enable-speex.patch;patch=1" + +S = "${WORKDIR}/asterisk-${PV}" + + +export CROSS_COMPILE="${CCACHE}${HOST_PREFIX}" +export CROSS_COMPILE_BIN="${STAGING_BINDIR_CROSS}" +export CROSS_COMPILE_TARGET="${STAGING_DIR}/${HOST_SYS}" + +export CROSS_ARCH="Linux" +export CROSS_PROC="${TARGET_ARCH}" + +export MAKECMDGOALS="dont-optimize" + +# We will probably have to edit the CFLAG in the Makefile + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake DESTDIR=${D} install +} + +do_stage () { + install -d ${STAGING_INCDIR}/asterisk + install -m 0644 ${S}/include/asterisk/*.h ${STAGING_INCDIR}/asterisk/ +} + + +FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" +FILES_${PN}-dbg += "/var/lib/asterisk/agi-bin/.debug" + -- cgit v1.2.3 From 4a6da99875bc3426bbdd7da4ccf8576d7fa3ae4f Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 26 Jul 2007 13:57:56 +0000 Subject: packages/asterisk/asterisk-1.2.13 : remove older varsions of asterisk --- packages/asterisk/asterisk-1.2.13/.mtn2git_empty | 0 packages/asterisk/asterisk-1.2.13/asterisk.patch | 221 --------------------- .../asterisk-1.2.13/uclibc-compat-getloadavg.patch | 13 -- packages/asterisk/asterisk-1.2.13/uclibc-dsn.patch | 18 -- packages/asterisk/asterisk_1.2.13.bb | 37 ---- 5 files changed, 289 deletions(-) delete mode 100644 packages/asterisk/asterisk-1.2.13/.mtn2git_empty delete mode 100644 packages/asterisk/asterisk-1.2.13/asterisk.patch delete mode 100644 packages/asterisk/asterisk-1.2.13/uclibc-compat-getloadavg.patch delete mode 100644 packages/asterisk/asterisk-1.2.13/uclibc-dsn.patch delete mode 100644 packages/asterisk/asterisk_1.2.13.bb (limited to 'packages') diff --git a/packages/asterisk/asterisk-1.2.13/.mtn2git_empty b/packages/asterisk/asterisk-1.2.13/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/asterisk/asterisk-1.2.13/asterisk.patch b/packages/asterisk/asterisk-1.2.13/asterisk.patch deleted file mode 100644 index 006b8e9291..0000000000 --- a/packages/asterisk/asterisk-1.2.13/asterisk.patch +++ /dev/null @@ -1,221 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- asterisk-1.2.9.1/./Makefile~asterisk -+++ asterisk-1.2.9.1/./Makefile -@@ -331,7 +331,7 @@ - ASTCFLAGS+= $(TRACE_FRAMES) - ASTCFLAGS+= $(MALLOC_DEBUG) - ASTCFLAGS+= $(BUSYDETECT) --ASTCFLAGS+= $(OPTIONS) -+#ASTCFLAGS+= $(OPTIONS) - ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize) - ASTCFLAGS+= -fomit-frame-pointer - endif -@@ -347,12 +347,12 @@ - netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \ - cryptostub.o - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) -+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/sys/poll.h),) - OBJS+= poll.o - ASTCFLAGS+=-DPOLLCOMPAT - endif - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) -+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),) - OBJS+= dlfcn.o - ASTCFLAGS+=-DDLFCNCOMPAT - endif -@@ -397,7 +397,7 @@ - endif - - ifeq ($(MAKETOPLEVEL),$(MAKELEVEL)) -- CFLAGS+=$(ASTCFLAGS) -+override CFLAGS+=$(ASTCFLAGS) - endif - - # This is used when generating the doxygen documentation -@@ -519,7 +519,7 @@ - fi - rm -f include/asterisk/build.h.tmp - $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c -- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) -+ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LDFLAGS) $(LIBS) - - muted: muted.o - $(CC) $(AUDIO_LIBS) -o muted muted.o ---- asterisk-1.2.9.1/codecs/gsm/Makefile~asterisk -+++ asterisk-1.2.9.1/codecs/gsm/Makefile -@@ -51,7 +51,7 @@ - ifneq (${PROC},ppc) - ifneq (${PROC},ppc64) - ifneq (${PROC},s390) --OPTIMIZE+=-march=$(PROC) -+#OPTIMIZE+=-march=$(PROC) - endif - endif - endif -@@ -243,7 +243,7 @@ - ifneq (${PROC},arm) - ifneq ($(shell uname -m), parisc) - ifneq ($(shell uname -m),s390) --GSM_SOURCES+= $(SRC)/k6opt.s -+#GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif - endif -@@ -309,7 +309,7 @@ - ifneq ($(shell uname -m), armv4l) - ifneq ($(shell uname -m), parisc) - ifneq ($(shell uname -m),s390) --GSM_OBJECTS+= $(SRC)/k6opt.o -+#GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif - endif ---- asterisk-1.2.9.1/res/Makefile~asterisk -+++ asterisk-1.2.9.1/res/Makefile -@@ -89,7 +89,7 @@ - fi - - res_crypto.so: res_crypto.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} $(CRYPTO_LIBS) - - clean: - rm -f *.so *.o .depend ---- asterisk-1.2.9.1/channels/Makefile~asterisk -+++ asterisk-1.2.9.1/channels/Makefile -@@ -73,7 +73,7 @@ - SOLINK+=-lrt - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/ixjuser.h),) - CHANNEL_LIBS+=chan_phone.so - endif - -@@ -88,16 +88,16 @@ - - CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/alsa/asoundlib.h),) - CHANNEL_LIBS+=chan_alsa.so - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libpri.so.1),) - CFLAGS+=-DZAPATA_PRI - ZAPPRI=-lpri - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libmfcr2.so.1),) - CFLAGS+=-DZAPATA_R2 - ZAPR2=-lmfcr2 - endif -@@ -110,7 +110,7 @@ - endif - - ifndef WITHOUT_ZAPTEL --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/zaptel.h),) - ifeq (${OSARCH},NetBSD) - SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib - endif -@@ -122,7 +122,7 @@ - endif - endif # WITHOUT_ZAPTEL - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vpbapi.h),) - CHANNEL_LIBS+=chan_vpb.so - CFLAGS+=-DLINUX - endif -@@ -137,7 +137,7 @@ - - ZAPDIR=/usr/lib - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/nbs.h),) - CHANNEL_LIBS+=chan_nbs.so - endif - -@@ -158,7 +158,7 @@ - rm -f busy.h ringtone.h gentone gentone-ulaw - - %.so : %.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} ${LIBS} - - ifneq ($(wildcard .depend),) - include .depend -@@ -215,7 +215,7 @@ - chan_alsa.o: $(ALSA_SRC) - - chan_alsa.so: chan_alsa.o -- $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl -+ $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl $(LDFLAGS) - - chan_nbs.so: chan_nbs.o - $(CC) $(SOLINK) -o $@ $< -lnbs ---- asterisk-1.2.9.1/pbx/Makefile~asterisk -+++ asterisk-1.2.9.1/pbx/Makefile -@@ -59,7 +59,7 @@ - $(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS) - - pbx_dundi.so: dundi-parser.o pbx_dundi.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} $(LDFLAGS) - - %.moc : %.h - $(MOC) $< -o $@ ---- asterisk-1.2.9.1/formats/Makefile~asterisk -+++ asterisk-1.2.9.1/formats/Makefile -@@ -25,7 +25,7 @@ - # - # OGG/Vorbis format - # --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vorbis/codec.h),) - FORMAT_LIBS+=format_ogg_vorbis.so - endif - -@@ -57,7 +57,7 @@ - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm - - format_ogg_vorbis.so : format_ogg_vorbis.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm $(LDFLAGS) - - install: all - for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done ---- asterisk-1.2.9.1/utils/Makefile~asterisk -+++ asterisk-1.2.9.1/utils/Makefile -@@ -22,11 +22,11 @@ - - TARGET=stereorize streamplayer - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/popt.h),) - TARGET+=smsq - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/newt.h),) - TARGET+=astman - endif - -@@ -64,7 +64,7 @@ - $(CC) $(CFLAGS) -o $@ $^ - - smsq: smsq.o -- $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt -+ $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt $(LDFLAGS) - - streamplayer: streamplayer.o - $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS} diff --git a/packages/asterisk/asterisk-1.2.13/uclibc-compat-getloadavg.patch b/packages/asterisk/asterisk-1.2.13/uclibc-compat-getloadavg.patch deleted file mode 100644 index a909513b1c..0000000000 --- a/packages/asterisk/asterisk-1.2.13/uclibc-compat-getloadavg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN asterisk-1.2.0-old/include/asterisk/compat.h asterisk-1.2.0-new/include/asterisk/compat.h ---- asterisk-1.2.0-old/include/asterisk/compat.h 2005-11-08 05:13:19.000000000 +0100 -+++ asterisk-1.2.0-new/include/asterisk/compat.h 2005-12-04 05:32:31.000000000 +0100 -@@ -75,7 +75,9 @@ - #define HAVE_STRTOQ - - #ifdef _BSD_SOURCE -+#ifndef __UCLIBC__ - #define HAVE_GETLOADAVG -+#endif /* __UCLIBC__ */ - #endif - - #ifdef __linux__ diff --git a/packages/asterisk/asterisk-1.2.13/uclibc-dsn.patch b/packages/asterisk/asterisk-1.2.13/uclibc-dsn.patch deleted file mode 100644 index 23657bcc76..0000000000 --- a/packages/asterisk/asterisk-1.2.13/uclibc-dsn.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ruN asterisk-1.0.7-old/dns.c asterisk-1.0.7-new/dns.c ---- asterisk-1.0.7-old/dns.c 2004-06-22 22:11:15.000000000 +0200 -+++ asterisk-1.0.7-new/dns.c 2005-03-19 17:38:06.000000000 +0100 -@@ -153,7 +153,13 @@ - - #if defined(res_ninit) - #define HAS_RES_NINIT --#else -+#endif -+ -+#ifdef __UCLIBC__ -+#undef HAS_RES_NINIT -+#endif -+ -+#ifndef HAS_RES_NINIT - AST_MUTEX_DEFINE_STATIC(res_lock); - #if 0 - #warning "Warning, res_ninit is missing... Could have reentrancy issues" diff --git a/packages/asterisk/asterisk_1.2.13.bb b/packages/asterisk/asterisk_1.2.13.bb deleted file mode 100644 index 3378f6e48b..0000000000 --- a/packages/asterisk/asterisk_1.2.13.bb +++ /dev/null @@ -1,37 +0,0 @@ -DESCRIPTION="The Asterisk open source software PBX" -HOMEPAGE="www.asterisk.org" -LICENSE="GPL" -DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis popt" -PR = "r2" - -SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \ - file://uclibc-compat-getloadavg.patch;patch=1 \ - file://uclibc-dsn.patch;patch=1 \ - file://asterisk.patch;patch=1" - - -export CROSS_COMPILE="${CCACHE}${HOST_PREFIX}" -export CROSS_COMPILE_BIN="${STAGING_BINDIR_CROSS}" -export CROSS_COMPILE_TARGET="${STAGING_DIR}/${HOST_SYS}" - -export CROSS_ARCH="Linux" -export CROSS_PROC="${TARGET_ARCH}" - -export MAKECMDGOALS="dont-optimize" - -# We will probably have to edit the CFLAG in the Makefile - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake DESTDIR=${D} install -} - -do_stage () { - install -d ${STAGING_INCDIR}/asterisk - install -m 0644 ${S}/include/asterisk/*.h ${STAGING_INCDIR}/asterisk/ -} - - -- cgit v1.2.3 From eb8ee6b969f820e8352e117b21688a94976070aa Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 26 Jul 2007 13:58:49 +0000 Subject: packages/asterisk/asterisk_1.2.14.bb : remove old versions of asterisk --- packages/asterisk/asterisk-1.2.14/asterisk.patch | 221 --------------------- .../asterisk-1.2.14/uclibc-compat-getloadavg.patch | 13 -- packages/asterisk/asterisk-1.2.14/uclibc-dsn.patch | 18 -- packages/asterisk/asterisk_1.2.14.bb | 43 ---- 4 files changed, 295 deletions(-) delete mode 100644 packages/asterisk/asterisk-1.2.14/asterisk.patch delete mode 100644 packages/asterisk/asterisk-1.2.14/uclibc-compat-getloadavg.patch delete mode 100644 packages/asterisk/asterisk-1.2.14/uclibc-dsn.patch delete mode 100644 packages/asterisk/asterisk_1.2.14.bb (limited to 'packages') diff --git a/packages/asterisk/asterisk-1.2.14/asterisk.patch b/packages/asterisk/asterisk-1.2.14/asterisk.patch deleted file mode 100644 index 006b8e9291..0000000000 --- a/packages/asterisk/asterisk-1.2.14/asterisk.patch +++ /dev/null @@ -1,221 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- asterisk-1.2.9.1/./Makefile~asterisk -+++ asterisk-1.2.9.1/./Makefile -@@ -331,7 +331,7 @@ - ASTCFLAGS+= $(TRACE_FRAMES) - ASTCFLAGS+= $(MALLOC_DEBUG) - ASTCFLAGS+= $(BUSYDETECT) --ASTCFLAGS+= $(OPTIONS) -+#ASTCFLAGS+= $(OPTIONS) - ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize) - ASTCFLAGS+= -fomit-frame-pointer - endif -@@ -347,12 +347,12 @@ - netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \ - cryptostub.o - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) -+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/sys/poll.h),) - OBJS+= poll.o - ASTCFLAGS+=-DPOLLCOMPAT - endif - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) -+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),) - OBJS+= dlfcn.o - ASTCFLAGS+=-DDLFCNCOMPAT - endif -@@ -397,7 +397,7 @@ - endif - - ifeq ($(MAKETOPLEVEL),$(MAKELEVEL)) -- CFLAGS+=$(ASTCFLAGS) -+override CFLAGS+=$(ASTCFLAGS) - endif - - # This is used when generating the doxygen documentation -@@ -519,7 +519,7 @@ - fi - rm -f include/asterisk/build.h.tmp - $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c -- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) -+ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LDFLAGS) $(LIBS) - - muted: muted.o - $(CC) $(AUDIO_LIBS) -o muted muted.o ---- asterisk-1.2.9.1/codecs/gsm/Makefile~asterisk -+++ asterisk-1.2.9.1/codecs/gsm/Makefile -@@ -51,7 +51,7 @@ - ifneq (${PROC},ppc) - ifneq (${PROC},ppc64) - ifneq (${PROC},s390) --OPTIMIZE+=-march=$(PROC) -+#OPTIMIZE+=-march=$(PROC) - endif - endif - endif -@@ -243,7 +243,7 @@ - ifneq (${PROC},arm) - ifneq ($(shell uname -m), parisc) - ifneq ($(shell uname -m),s390) --GSM_SOURCES+= $(SRC)/k6opt.s -+#GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif - endif -@@ -309,7 +309,7 @@ - ifneq ($(shell uname -m), armv4l) - ifneq ($(shell uname -m), parisc) - ifneq ($(shell uname -m),s390) --GSM_OBJECTS+= $(SRC)/k6opt.o -+#GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif - endif ---- asterisk-1.2.9.1/res/Makefile~asterisk -+++ asterisk-1.2.9.1/res/Makefile -@@ -89,7 +89,7 @@ - fi - - res_crypto.so: res_crypto.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} $(CRYPTO_LIBS) - - clean: - rm -f *.so *.o .depend ---- asterisk-1.2.9.1/channels/Makefile~asterisk -+++ asterisk-1.2.9.1/channels/Makefile -@@ -73,7 +73,7 @@ - SOLINK+=-lrt - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/ixjuser.h),) - CHANNEL_LIBS+=chan_phone.so - endif - -@@ -88,16 +88,16 @@ - - CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/alsa/asoundlib.h),) - CHANNEL_LIBS+=chan_alsa.so - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libpri.so.1),) - CFLAGS+=-DZAPATA_PRI - ZAPPRI=-lpri - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libmfcr2.so.1),) - CFLAGS+=-DZAPATA_R2 - ZAPR2=-lmfcr2 - endif -@@ -110,7 +110,7 @@ - endif - - ifndef WITHOUT_ZAPTEL --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/zaptel.h),) - ifeq (${OSARCH},NetBSD) - SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib - endif -@@ -122,7 +122,7 @@ - endif - endif # WITHOUT_ZAPTEL - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vpbapi.h),) - CHANNEL_LIBS+=chan_vpb.so - CFLAGS+=-DLINUX - endif -@@ -137,7 +137,7 @@ - - ZAPDIR=/usr/lib - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/nbs.h),) - CHANNEL_LIBS+=chan_nbs.so - endif - -@@ -158,7 +158,7 @@ - rm -f busy.h ringtone.h gentone gentone-ulaw - - %.so : %.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} ${LIBS} - - ifneq ($(wildcard .depend),) - include .depend -@@ -215,7 +215,7 @@ - chan_alsa.o: $(ALSA_SRC) - - chan_alsa.so: chan_alsa.o -- $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl -+ $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl $(LDFLAGS) - - chan_nbs.so: chan_nbs.o - $(CC) $(SOLINK) -o $@ $< -lnbs ---- asterisk-1.2.9.1/pbx/Makefile~asterisk -+++ asterisk-1.2.9.1/pbx/Makefile -@@ -59,7 +59,7 @@ - $(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS) - - pbx_dundi.so: dundi-parser.o pbx_dundi.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} $(LDFLAGS) - - %.moc : %.h - $(MOC) $< -o $@ ---- asterisk-1.2.9.1/formats/Makefile~asterisk -+++ asterisk-1.2.9.1/formats/Makefile -@@ -25,7 +25,7 @@ - # - # OGG/Vorbis format - # --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vorbis/codec.h),) - FORMAT_LIBS+=format_ogg_vorbis.so - endif - -@@ -57,7 +57,7 @@ - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm - - format_ogg_vorbis.so : format_ogg_vorbis.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm $(LDFLAGS) - - install: all - for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done ---- asterisk-1.2.9.1/utils/Makefile~asterisk -+++ asterisk-1.2.9.1/utils/Makefile -@@ -22,11 +22,11 @@ - - TARGET=stereorize streamplayer - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/popt.h),) - TARGET+=smsq - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/newt.h),) - TARGET+=astman - endif - -@@ -64,7 +64,7 @@ - $(CC) $(CFLAGS) -o $@ $^ - - smsq: smsq.o -- $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt -+ $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt $(LDFLAGS) - - streamplayer: streamplayer.o - $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS} diff --git a/packages/asterisk/asterisk-1.2.14/uclibc-compat-getloadavg.patch b/packages/asterisk/asterisk-1.2.14/uclibc-compat-getloadavg.patch deleted file mode 100644 index a909513b1c..0000000000 --- a/packages/asterisk/asterisk-1.2.14/uclibc-compat-getloadavg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN asterisk-1.2.0-old/include/asterisk/compat.h asterisk-1.2.0-new/include/asterisk/compat.h ---- asterisk-1.2.0-old/include/asterisk/compat.h 2005-11-08 05:13:19.000000000 +0100 -+++ asterisk-1.2.0-new/include/asterisk/compat.h 2005-12-04 05:32:31.000000000 +0100 -@@ -75,7 +75,9 @@ - #define HAVE_STRTOQ - - #ifdef _BSD_SOURCE -+#ifndef __UCLIBC__ - #define HAVE_GETLOADAVG -+#endif /* __UCLIBC__ */ - #endif - - #ifdef __linux__ diff --git a/packages/asterisk/asterisk-1.2.14/uclibc-dsn.patch b/packages/asterisk/asterisk-1.2.14/uclibc-dsn.patch deleted file mode 100644 index 23657bcc76..0000000000 --- a/packages/asterisk/asterisk-1.2.14/uclibc-dsn.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ruN asterisk-1.0.7-old/dns.c asterisk-1.0.7-new/dns.c ---- asterisk-1.0.7-old/dns.c 2004-06-22 22:11:15.000000000 +0200 -+++ asterisk-1.0.7-new/dns.c 2005-03-19 17:38:06.000000000 +0100 -@@ -153,7 +153,13 @@ - - #if defined(res_ninit) - #define HAS_RES_NINIT --#else -+#endif -+ -+#ifdef __UCLIBC__ -+#undef HAS_RES_NINIT -+#endif -+ -+#ifndef HAS_RES_NINIT - AST_MUTEX_DEFINE_STATIC(res_lock); - #if 0 - #warning "Warning, res_ninit is missing... Could have reentrancy issues" diff --git a/packages/asterisk/asterisk_1.2.14.bb b/packages/asterisk/asterisk_1.2.14.bb deleted file mode 100644 index 0ec55f8e42..0000000000 --- a/packages/asterisk/asterisk_1.2.14.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION="The Asterisk open source software PBX" -HOMEPAGE="www.asterisk.org" -LICENSE="GPL" -DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis popt" -SECTION = "console/telephony" -PR = "r4" - -SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \ - file://uclibc-compat-getloadavg.patch;patch=1 \ - file://uclibc-dsn.patch;patch=1 \ - file://asterisk.patch;patch=1" - -S = "${WORKDIR}/asterisk-${PV}" - - -export CROSS_COMPILE="${CCACHE}${HOST_PREFIX}" -export CROSS_COMPILE_BIN="${STAGING_BINDIR_CROSS}" -export CROSS_COMPILE_TARGET="${STAGING_DIR}/${HOST_SYS}" - -export CROSS_ARCH="Linux" -export CROSS_PROC="${TARGET_ARCH}" - -export MAKECMDGOALS="dont-optimize" - -# We will probably have to edit the CFLAG in the Makefile - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake DESTDIR=${D} install -} - -do_stage () { - install -d ${STAGING_INCDIR}/asterisk - install -m 0644 ${S}/include/asterisk/*.h ${STAGING_INCDIR}/asterisk/ -} - - -FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" -FILES_${PN}-dbg += "/var/lib/asterisk/agi-bin/.debug" - -- cgit v1.2.3 From 60c64186524c725e95496bd2b158ed1bd062b70c Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 26 Jul 2007 14:00:54 +0000 Subject: packages/asterisk/asterisk_1.2.16.bb : Remove old versions of asterisk --- packages/asterisk/asterisk-1.2.16/.mtn2git_empty | 0 packages/asterisk/asterisk-1.2.16/asterisk.patch | 221 --------------------- .../asterisk-1.2.16/uclibc-compat-getloadavg.patch | 13 -- packages/asterisk/asterisk-1.2.16/uclibc-dsn.patch | 18 -- packages/asterisk/asterisk_1.2.16.bb | 43 ---- 5 files changed, 295 deletions(-) delete mode 100644 packages/asterisk/asterisk-1.2.16/.mtn2git_empty delete mode 100644 packages/asterisk/asterisk-1.2.16/asterisk.patch delete mode 100644 packages/asterisk/asterisk-1.2.16/uclibc-compat-getloadavg.patch delete mode 100644 packages/asterisk/asterisk-1.2.16/uclibc-dsn.patch delete mode 100644 packages/asterisk/asterisk_1.2.16.bb (limited to 'packages') diff --git a/packages/asterisk/asterisk-1.2.16/.mtn2git_empty b/packages/asterisk/asterisk-1.2.16/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/asterisk/asterisk-1.2.16/asterisk.patch b/packages/asterisk/asterisk-1.2.16/asterisk.patch deleted file mode 100644 index 006b8e9291..0000000000 --- a/packages/asterisk/asterisk-1.2.16/asterisk.patch +++ /dev/null @@ -1,221 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- asterisk-1.2.9.1/./Makefile~asterisk -+++ asterisk-1.2.9.1/./Makefile -@@ -331,7 +331,7 @@ - ASTCFLAGS+= $(TRACE_FRAMES) - ASTCFLAGS+= $(MALLOC_DEBUG) - ASTCFLAGS+= $(BUSYDETECT) --ASTCFLAGS+= $(OPTIONS) -+#ASTCFLAGS+= $(OPTIONS) - ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize) - ASTCFLAGS+= -fomit-frame-pointer - endif -@@ -347,12 +347,12 @@ - netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \ - cryptostub.o - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) -+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/sys/poll.h),) - OBJS+= poll.o - ASTCFLAGS+=-DPOLLCOMPAT - endif - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) -+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),) - OBJS+= dlfcn.o - ASTCFLAGS+=-DDLFCNCOMPAT - endif -@@ -397,7 +397,7 @@ - endif - - ifeq ($(MAKETOPLEVEL),$(MAKELEVEL)) -- CFLAGS+=$(ASTCFLAGS) -+override CFLAGS+=$(ASTCFLAGS) - endif - - # This is used when generating the doxygen documentation -@@ -519,7 +519,7 @@ - fi - rm -f include/asterisk/build.h.tmp - $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c -- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) -+ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LDFLAGS) $(LIBS) - - muted: muted.o - $(CC) $(AUDIO_LIBS) -o muted muted.o ---- asterisk-1.2.9.1/codecs/gsm/Makefile~asterisk -+++ asterisk-1.2.9.1/codecs/gsm/Makefile -@@ -51,7 +51,7 @@ - ifneq (${PROC},ppc) - ifneq (${PROC},ppc64) - ifneq (${PROC},s390) --OPTIMIZE+=-march=$(PROC) -+#OPTIMIZE+=-march=$(PROC) - endif - endif - endif -@@ -243,7 +243,7 @@ - ifneq (${PROC},arm) - ifneq ($(shell uname -m), parisc) - ifneq ($(shell uname -m),s390) --GSM_SOURCES+= $(SRC)/k6opt.s -+#GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif - endif -@@ -309,7 +309,7 @@ - ifneq ($(shell uname -m), armv4l) - ifneq ($(shell uname -m), parisc) - ifneq ($(shell uname -m),s390) --GSM_OBJECTS+= $(SRC)/k6opt.o -+#GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif - endif ---- asterisk-1.2.9.1/res/Makefile~asterisk -+++ asterisk-1.2.9.1/res/Makefile -@@ -89,7 +89,7 @@ - fi - - res_crypto.so: res_crypto.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} $(CRYPTO_LIBS) - - clean: - rm -f *.so *.o .depend ---- asterisk-1.2.9.1/channels/Makefile~asterisk -+++ asterisk-1.2.9.1/channels/Makefile -@@ -73,7 +73,7 @@ - SOLINK+=-lrt - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/ixjuser.h),) - CHANNEL_LIBS+=chan_phone.so - endif - -@@ -88,16 +88,16 @@ - - CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/alsa/asoundlib.h),) - CHANNEL_LIBS+=chan_alsa.so - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libpri.so.1),) - CFLAGS+=-DZAPATA_PRI - ZAPPRI=-lpri - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libmfcr2.so.1),) - CFLAGS+=-DZAPATA_R2 - ZAPR2=-lmfcr2 - endif -@@ -110,7 +110,7 @@ - endif - - ifndef WITHOUT_ZAPTEL --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/zaptel.h),) - ifeq (${OSARCH},NetBSD) - SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib - endif -@@ -122,7 +122,7 @@ - endif - endif # WITHOUT_ZAPTEL - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vpbapi.h),) - CHANNEL_LIBS+=chan_vpb.so - CFLAGS+=-DLINUX - endif -@@ -137,7 +137,7 @@ - - ZAPDIR=/usr/lib - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/nbs.h),) - CHANNEL_LIBS+=chan_nbs.so - endif - -@@ -158,7 +158,7 @@ - rm -f busy.h ringtone.h gentone gentone-ulaw - - %.so : %.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} ${LIBS} - - ifneq ($(wildcard .depend),) - include .depend -@@ -215,7 +215,7 @@ - chan_alsa.o: $(ALSA_SRC) - - chan_alsa.so: chan_alsa.o -- $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl -+ $(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl $(LDFLAGS) - - chan_nbs.so: chan_nbs.o - $(CC) $(SOLINK) -o $@ $< -lnbs ---- asterisk-1.2.9.1/pbx/Makefile~asterisk -+++ asterisk-1.2.9.1/pbx/Makefile -@@ -59,7 +59,7 @@ - $(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS) - - pbx_dundi.so: dundi-parser.o pbx_dundi.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} $(LDFLAGS) - - %.moc : %.h - $(MOC) $< -o $@ ---- asterisk-1.2.9.1/formats/Makefile~asterisk -+++ asterisk-1.2.9.1/formats/Makefile -@@ -25,7 +25,7 @@ - # - # OGG/Vorbis format - # --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vorbis/codec.h),) - FORMAT_LIBS+=format_ogg_vorbis.so - endif - -@@ -57,7 +57,7 @@ - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm - - format_ogg_vorbis.so : format_ogg_vorbis.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm $(LDFLAGS) - - install: all - for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done ---- asterisk-1.2.9.1/utils/Makefile~asterisk -+++ asterisk-1.2.9.1/utils/Makefile -@@ -22,11 +22,11 @@ - - TARGET=stereorize streamplayer - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/popt.h),) - TARGET+=smsq - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/newt.h),) - TARGET+=astman - endif - -@@ -64,7 +64,7 @@ - $(CC) $(CFLAGS) -o $@ $^ - - smsq: smsq.o -- $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt -+ $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt $(LDFLAGS) - - streamplayer: streamplayer.o - $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS} diff --git a/packages/asterisk/asterisk-1.2.16/uclibc-compat-getloadavg.patch b/packages/asterisk/asterisk-1.2.16/uclibc-compat-getloadavg.patch deleted file mode 100644 index a909513b1c..0000000000 --- a/packages/asterisk/asterisk-1.2.16/uclibc-compat-getloadavg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN asterisk-1.2.0-old/include/asterisk/compat.h asterisk-1.2.0-new/include/asterisk/compat.h ---- asterisk-1.2.0-old/include/asterisk/compat.h 2005-11-08 05:13:19.000000000 +0100 -+++ asterisk-1.2.0-new/include/asterisk/compat.h 2005-12-04 05:32:31.000000000 +0100 -@@ -75,7 +75,9 @@ - #define HAVE_STRTOQ - - #ifdef _BSD_SOURCE -+#ifndef __UCLIBC__ - #define HAVE_GETLOADAVG -+#endif /* __UCLIBC__ */ - #endif - - #ifdef __linux__ diff --git a/packages/asterisk/asterisk-1.2.16/uclibc-dsn.patch b/packages/asterisk/asterisk-1.2.16/uclibc-dsn.patch deleted file mode 100644 index 23657bcc76..0000000000 --- a/packages/asterisk/asterisk-1.2.16/uclibc-dsn.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ruN asterisk-1.0.7-old/dns.c asterisk-1.0.7-new/dns.c ---- asterisk-1.0.7-old/dns.c 2004-06-22 22:11:15.000000000 +0200 -+++ asterisk-1.0.7-new/dns.c 2005-03-19 17:38:06.000000000 +0100 -@@ -153,7 +153,13 @@ - - #if defined(res_ninit) - #define HAS_RES_NINIT --#else -+#endif -+ -+#ifdef __UCLIBC__ -+#undef HAS_RES_NINIT -+#endif -+ -+#ifndef HAS_RES_NINIT - AST_MUTEX_DEFINE_STATIC(res_lock); - #if 0 - #warning "Warning, res_ninit is missing... Could have reentrancy issues" diff --git a/packages/asterisk/asterisk_1.2.16.bb b/packages/asterisk/asterisk_1.2.16.bb deleted file mode 100644 index 0ec55f8e42..0000000000 --- a/packages/asterisk/asterisk_1.2.16.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION="The Asterisk open source software PBX" -HOMEPAGE="www.asterisk.org" -LICENSE="GPL" -DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis popt" -SECTION = "console/telephony" -PR = "r4" - -SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \ - file://uclibc-compat-getloadavg.patch;patch=1 \ - file://uclibc-dsn.patch;patch=1 \ - file://asterisk.patch;patch=1" - -S = "${WORKDIR}/asterisk-${PV}" - - -export CROSS_COMPILE="${CCACHE}${HOST_PREFIX}" -export CROSS_COMPILE_BIN="${STAGING_BINDIR_CROSS}" -export CROSS_COMPILE_TARGET="${STAGING_DIR}/${HOST_SYS}" - -export CROSS_ARCH="Linux" -export CROSS_PROC="${TARGET_ARCH}" - -export MAKECMDGOALS="dont-optimize" - -# We will probably have to edit the CFLAG in the Makefile - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake DESTDIR=${D} install -} - -do_stage () { - install -d ${STAGING_INCDIR}/asterisk - install -m 0644 ${S}/include/asterisk/*.h ${STAGING_INCDIR}/asterisk/ -} - - -FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" -FILES_${PN}-dbg += "/var/lib/asterisk/agi-bin/.debug" - -- cgit v1.2.3 From 12988d4665a5c6f17c910fc215f935901bd397a8 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 26 Jul 2007 14:02:01 +0000 Subject: packages/asterisk/asterisk-1.2.14 : remove dir from old asterisk package --- packages/asterisk/asterisk-1.2.14/.mtn2git_empty | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 packages/asterisk/asterisk-1.2.14/.mtn2git_empty (limited to 'packages') diff --git a/packages/asterisk/asterisk-1.2.14/.mtn2git_empty b/packages/asterisk/asterisk-1.2.14/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 -- cgit v1.2.3 From d063de816c79b80a5fe8452da60c986c90c81cf3 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Jul 2007 14:41:11 +0000 Subject: clutter: rename to clutter-glx so we can have different flavours of clutter * Needs a fix for pkgconfig, but it's a nice first step --- packages/clutter/clutter-glx_svn.bb | 9 +++++++++ packages/clutter/clutter_svn.bb | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 packages/clutter/clutter-glx_svn.bb delete mode 100644 packages/clutter/clutter_svn.bb (limited to 'packages') diff --git a/packages/clutter/clutter-glx_svn.bb b/packages/clutter/clutter-glx_svn.bb new file mode 100644 index 0000000000..8a2a1fa1ed --- /dev/null +++ b/packages/clutter/clutter-glx_svn.bb @@ -0,0 +1,9 @@ +require clutter.inc + +PV = "0.3.1+svn${SRCDATE}" + +SRC_URI = "svn://svn.o-hand.com/repos/clutter/trunk;module=clutter;proto=http" + +S = "${WORKDIR}/clutter" + + diff --git a/packages/clutter/clutter_svn.bb b/packages/clutter/clutter_svn.bb deleted file mode 100644 index 8a2a1fa1ed..0000000000 --- a/packages/clutter/clutter_svn.bb +++ /dev/null @@ -1,9 +0,0 @@ -require clutter.inc - -PV = "0.3.1+svn${SRCDATE}" - -SRC_URI = "svn://svn.o-hand.com/repos/clutter/trunk;module=clutter;proto=http" - -S = "${WORKDIR}/clutter" - - -- cgit v1.2.3 From 4e2dba920549b2881b2c69e1d4746f997dcb4336 Mon Sep 17 00:00:00 2001 From: Philip Balister Date: Thu, 26 Jul 2007 15:50:04 +0000 Subject: gnuradio_svn.bb : First pass at adding support for GNU Radio. Still needs debugging. --- packages/gnuradio/.mtn2git_empty | 0 packages/gnuradio/gnuradio_svn.bb | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 packages/gnuradio/.mtn2git_empty create mode 100644 packages/gnuradio/gnuradio_svn.bb (limited to 'packages') diff --git a/packages/gnuradio/.mtn2git_empty b/packages/gnuradio/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/gnuradio/gnuradio_svn.bb b/packages/gnuradio/gnuradio_svn.bb new file mode 100644 index 0000000000..1e313b0b6c --- /dev/null +++ b/packages/gnuradio/gnuradio_svn.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "GNU Radio" +SECTION = "apps" +PRIORITY = "optional" +LICENSE = "GPL" +DEPENDS = "fftw python boost cppunit sdcc-native swig swig-native" +RDEPENDS = "fftw python swig" +PR = "r0" + +SRC_URI = "svn://gnuradio.org/svn/gnuradio;module=trunk;proto=http" + +inherit autotools pkgconfig + +S="${WORKDIR}/trunk" + +CXXFLAGS_powerpc += "-lstdc++" + +export BUILD_SYS := "${BUILD_SYS}" +export HOST_SYS := "${HOST_SYS}" + +EXTRA_OECONF = "--disable-gr-atsc --disable-gr-video-sdl" + -- cgit v1.2.3 From f6e3577288367c1a0ca035676da5d170e1a15fe3 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 27 Jul 2007 08:16:54 +0000 Subject: fftw.inc: automake 1.10 workaround --- packages/fftw/fftw.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages') diff --git a/packages/fftw/fftw.inc b/packages/fftw/fftw.inc index 8929bec2c6..88c946b1d4 100644 --- a/packages/fftw/fftw.inc +++ b/packages/fftw/fftw.inc @@ -11,6 +11,10 @@ S = "${WORKDIR}/fftw-${PV}" inherit autotools pkgconfig +do_configure_prepend() { + echo 'AM_PROG_AS' >> ${S}/configure.ac +} + do_stage () { autotools_stage_all } -- cgit v1.2.3 From 12e9dd26696aaa5b1ffbc48b8d8eff9afc2c6102 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 27 Jul 2007 10:29:18 +0000 Subject: gnuradio: set PV --- packages/gnuradio/gnuradio_svn.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/gnuradio/gnuradio_svn.bb b/packages/gnuradio/gnuradio_svn.bb index 1e313b0b6c..f3d4873e5a 100644 --- a/packages/gnuradio/gnuradio_svn.bb +++ b/packages/gnuradio/gnuradio_svn.bb @@ -2,10 +2,13 @@ DESCRIPTION = "GNU Radio" SECTION = "apps" PRIORITY = "optional" LICENSE = "GPL" -DEPENDS = "fftw python boost cppunit sdcc-native swig swig-native" -RDEPENDS = "fftw python swig" +DEPENDS = "fftwf python boost cppunit sdcc-native swig swig-native" +RDEPENDS = "libfftwf python swig" + +PV = "0.0+svn${SRCDATE}" PR = "r0" + SRC_URI = "svn://gnuradio.org/svn/gnuradio;module=trunk;proto=http" inherit autotools pkgconfig -- cgit v1.2.3 From 40d3de312d7892436cb00b8bdb77eda0746564b1 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 27 Jul 2007 12:19:58 +0000 Subject: gnuradio: fixes * update PV to 3.0.4 * patch out doc generation for gr-trellis subdir * packages all libs seperately * package python files as well --- packages/gnuradio/gnuradio/.mtn2git_empty | 0 packages/gnuradio/gnuradio/no-trellis-doc.patch | 9 +++++++++ packages/gnuradio/gnuradio_svn.bb | 20 +++++++++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 packages/gnuradio/gnuradio/.mtn2git_empty create mode 100644 packages/gnuradio/gnuradio/no-trellis-doc.patch (limited to 'packages') diff --git a/packages/gnuradio/gnuradio/.mtn2git_empty b/packages/gnuradio/gnuradio/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/gnuradio/gnuradio/no-trellis-doc.patch b/packages/gnuradio/gnuradio/no-trellis-doc.patch new file mode 100644 index 0000000000..1e5148d3f9 --- /dev/null +++ b/packages/gnuradio/gnuradio/no-trellis-doc.patch @@ -0,0 +1,9 @@ +--- /tmp/Makefile.am 2007-07-27 13:44:31.000000000 +0200 ++++ trunk/gr-trellis/Makefile.am 2007-07-27 13:50:06.795215000 +0200 +@@ -21,5 +21,5 @@ + + include $(top_srcdir)/Makefile.common + +-SUBDIRS = src doc ++SUBDIRS = src + diff --git a/packages/gnuradio/gnuradio_svn.bb b/packages/gnuradio/gnuradio_svn.bb index f3d4873e5a..0eed243618 100644 --- a/packages/gnuradio/gnuradio_svn.bb +++ b/packages/gnuradio/gnuradio_svn.bb @@ -3,13 +3,16 @@ SECTION = "apps" PRIORITY = "optional" LICENSE = "GPL" DEPENDS = "fftwf python boost cppunit sdcc-native swig swig-native" -RDEPENDS = "libfftwf python swig" -PV = "0.0+svn${SRCDATE}" +RDEPENDS_${PN} = "python-core swig" + +PV = "3.0.4+svn${SRCDATE}" PR = "r0" -SRC_URI = "svn://gnuradio.org/svn/gnuradio;module=trunk;proto=http" +SRC_URI = "svn://gnuradio.org/svn/gnuradio;module=trunk;proto=http \ + file://no-trellis-doc.patch;patch=1 \ + " inherit autotools pkgconfig @@ -22,3 +25,14 @@ export HOST_SYS := "${HOST_SYS}" EXTRA_OECONF = "--disable-gr-atsc --disable-gr-video-sdl" +PACKAGES =+ "libgromnithread libgnuradio-core libgnuradio-core-qa" +FILES_libgnuradio-core = "${libdir}/libgnuradio-core.so.*" +FILES_libgnuradio-core-qa = "${libdir}/libgnuradio-core-qa.so.*" +FILES_libgromnithread = "${libdir}/libgromnithread.so*" + +FILES_${PN} += "${libdir}/python*/site-packages/gnuradio/*" +FILES_${PN}-dbg += "${libdir}/python*/site-packages/gnuradio/.debug \ + ${libdir}/python*/site-packages/gnuradio/*/.debug \ + " + + -- cgit v1.2.3 From 5b3b42e47ea79502308f2f2c13687c200947aeaf Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 27 Jul 2007 13:30:33 +0000 Subject: omext: add proof of concept extension handler for openmoko --- packages/openmoko-apps/omext_0.2.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/openmoko-apps/omext_0.2.bb (limited to 'packages') diff --git a/packages/openmoko-apps/omext_0.2.bb b/packages/openmoko-apps/omext_0.2.bb new file mode 100644 index 0000000000..203b84e3df --- /dev/null +++ b/packages/openmoko-apps/omext_0.2.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Openmoko extensionhandler" +LICENSE = "GPLv2" + +DEPENDS = "dbus-glib" + +SRC_URI = "http://www.devzero.net/openmoko/dist/omext-${PV}.tar.gz" + +inherit autotools pkgconfig + +S = "{WORKDIR}/openmoko-extensionhandler" + + -- cgit v1.2.3 From d9fcc52a43dfde71cdded97290c751cf63a6d1dc Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 27 Jul 2007 14:13:03 +0000 Subject: gnuradio: add enough python stuff to silence dial_tone.py --- packages/gnuradio/gnuradio_svn.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/gnuradio/gnuradio_svn.bb b/packages/gnuradio/gnuradio_svn.bb index 0eed243618..30fe6ba916 100644 --- a/packages/gnuradio/gnuradio_svn.bb +++ b/packages/gnuradio/gnuradio_svn.bb @@ -4,10 +4,10 @@ PRIORITY = "optional" LICENSE = "GPL" DEPENDS = "fftwf python boost cppunit sdcc-native swig swig-native" -RDEPENDS_${PN} = "python-core swig" +RDEPENDS_${PN} = "python-core python-audio python-codecs python-lang python-textutils swig" PV = "3.0.4+svn${SRCDATE}" -PR = "r0" +PR = "r1" SRC_URI = "svn://gnuradio.org/svn/gnuradio;module=trunk;proto=http \ -- cgit v1.2.3