You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(16) |
Aug
(203) |
Sep
(142) |
Oct
(113) |
Nov
(73) |
Dec
(27) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(7) |
Feb
(38) |
Mar
(6) |
Apr
(1) |
May
(9) |
Jun
(104) |
Jul
(6) |
Aug
(11) |
Sep
(13) |
Oct
(6) |
Nov
(15) |
Dec
(37) |
2008 |
Jan
(17) |
Feb
(4) |
Mar
(6) |
Apr
(4) |
May
(2) |
Jun
(5) |
Jul
(1) |
Aug
(3) |
Sep
(21) |
Oct
(7) |
Nov
|
Dec
(3) |
2009 |
Jan
(4) |
Feb
(15) |
Mar
|
Apr
(34) |
May
(44) |
Jun
(12) |
Jul
(6) |
Aug
(15) |
Sep
(20) |
Oct
(10) |
Nov
(1) |
Dec
(20) |
2010 |
Jan
(19) |
Feb
(5) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dan...@us...> - 2008-05-11 15:51:51
|
Revision: 1160 http://cegcc.svn.sourceforge.net/cegcc/?rev=1160&view=rev Author: dannybackx Date: 2008-05-11 08:51:40 -0700 (Sun, 11 May 2008) Log Message: ----------- Move roadmap to the "it works" category. Modified Paths: -------------- trunk/cegcc/website/software-that-works.html Modified: trunk/cegcc/website/software-that-works.html =================================================================== --- trunk/cegcc/website/software-that-works.html 2008-04-27 09:39:53 UTC (rev 1159) +++ trunk/cegcc/website/software-that-works.html 2008-05-11 15:51:40 UTC (rev 1160) @@ -31,6 +31,11 @@ <td>Works with CeGCC ?</td> </tr> <tr> +<td class="project"> <a href="http://sourceforge.net/projects/roadmap">roadmap</a> </td> +<td class="description"> A navigation system that displays street maps and tracks a vehicle using GPS. Specific locations can be selected by street address. Routes and tracks can be created, edited, and saved in GPX format. Runs on most POSIX systems, the iPAQ, and the Zaurus.</td> +<td class="works">Yes, but include file patches required (they're in SVN)</td> +</tr> +<tr> <td class="project"> <a href="http://sourceforge.net/projects/xwords">Crosswords for handhelds</a> </td> <td class="description"> Crosswords implements the rules of Scrabble(tm) for handhelds like PalmOS and PocketPC, (Linux too). Easy to port to other platforms, supports multiple languages and multi-device play via IR or UDP. Not vaporware: one of TIME.com's top 5 PalmOS apps</td> <td class="works">Yes</td> @@ -82,11 +87,6 @@ <td>Works with CeGCC ?</td> </tr> <tr> -<td class="project"> <a href="http://sourceforge.net/projects/roadmap">roadmap</a> </td> -<td class="description"> A navigation system that displays street maps and tracks a vehicle using GPS. Specific locations can be selected by street address. Routes and tracks can be created, edited, and saved in GPX format. Runs on most POSIX systems, the iPAQ, and the Zaurus.</td> -<td class="works">?</td> -</tr> -<tr> <td class="project"> <a href="http://sourceforge.net/projects/navit">navit</a> </td> <td class="description"> Modular, touch screen friendly car navigation systm with GPS tracking, realtime routing engine and support for various vector map formats. There's a GTK+ and a SDL user interface and also a GL accelerated 3d view.</td> <td class="works">?</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-04-27 09:47:49
|
Revision: 1159 http://cegcc.svn.sourceforge.net/cegcc/?rev=1159&view=rev Author: dannybackx Date: 2008-04-27 02:39:53 -0700 (Sun, 27 Apr 2008) Log Message: ----------- Changes to help compile Roadmap. * include/commctrl.h (CommandBar_AddButtons): Change from a function definition into a macro. * include/prsht.h (PSH_MAXIMIZE): Define. * include/winioctl.h (FILE_DEVICE_HAL, FILE_DEVICE_SERVICE, IOCTL_SERVICE_START, IOCTL_SERVICE_STOP, IOCTL_SERVICE_STATUS, IOCTL_SERVICE_CONNECTION): Define. Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/commctrl.h trunk/cegcc/src/w32api/include/prsht.h trunk/cegcc/src/w32api/include/winioctl.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-13 13:31:27 UTC (rev 1158) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-27 09:39:53 UTC (rev 1159) @@ -1,12 +1,21 @@ 2008-04-13 Danny Backx <dan...@us...> + * include/commctrl.h (CommandBar_AddButtons): Change from a + function definition into a macro. + * include/prsht.h (PSH_MAXIMIZE): Define. + * include/winioctl.h (FILE_DEVICE_HAL, FILE_DEVICE_SERVICE, + IOCTL_SERVICE_START, IOCTL_SERVICE_STOP, IOCTL_SERVICE_STATUS, + IOCTL_SERVICE_CONNECTION): Define. + +2008-04-13 Danny Backx <dan...@us...> + * include/winuser.h (SystemIdleTimerReset): Define. 2008-04-13 Danny Backx <dan...@us...> * include/notify.h: Add. * include/aygshell.h (SHSetAppKeyWndAssoc): Define. - * include/commctrl (CommandBar_AddButtons): Define. + * include/commctrl.h (CommandBar_AddButtons): Define. 2008-04-13 Danny Backx <dan...@us...> Modified: trunk/cegcc/src/w32api/include/commctrl.h =================================================================== --- trunk/cegcc/src/w32api/include/commctrl.h 2008-04-13 13:31:27 UTC (rev 1158) +++ trunk/cegcc/src/w32api/include/commctrl.h 2008-04-27 09:39:53 UTC (rev 1159) @@ -3750,9 +3750,13 @@ COMMCTRLAPI HMENU WINAPI CommandBar_GetMenu(HWND,WORD); COMMCTRLAPI BOOL WINAPI CommandBar_AddAdornments(HWND,DWORD,DWORD); COMMCTRLAPI int WINAPI CommandBar_Height(HWND); -BOOL CommandBar_AddButtons(HWND hwndCB, UINT uNumButtons, LPTBBUTTON lpButtons); -#define CommandBar_InsertButton(hwnd,i,lptbbutton) ((BOOL)SendMessage((hwnd),TB_INSERTBUTTON,(i),(lptbbutton))) +#define CommandBar_AddButtons(h, cb, lp) \ + SendMessage((h), TB_ADDBUTTONS, (WPARAM)(cb), (LPARAM)(lp)) + + +#define CommandBar_InsertButton(hwnd,i,lptbbutton) \ + ((BOOL)SendMessage((hwnd),TB_INSERTBUTTON,(i),(lptbbutton))) #define CommandBar_Destroy(hwnd) ((void)DestroyWindow(hwnd)) #endif /* _WIN32_WCE */ Modified: trunk/cegcc/src/w32api/include/prsht.h =================================================================== --- trunk/cegcc/src/w32api/include/prsht.h 2008-04-13 13:31:27 UTC (rev 1158) +++ trunk/cegcc/src/w32api/include/prsht.h 2008-04-27 09:39:53 UTC (rev 1159) @@ -26,32 +26,36 @@ #endif #define PSPCB_RELEASE 1 #define PSPCB_CREATE 2 -#define PSH_DEFAULT 0 -#define PSH_PROPTITLE 1 -#define PSH_USEHICON 2 -#define PSH_USEICONID 4 -#define PSH_PROPSHEETPAGE 8 -#define PSH_WIZARDHASFINISH 16 -#define PSH_WIZARD 32 -#define PSH_USEPSTARTPAGE 64 -#define PSH_NOAPPLYNOW 128 -#define PSH_USECALLBACK 256 -#define PSH_HASHELP 512 -#define PSH_MODELESS 1024 -#define PSH_RTLREADING 2048 -#define PSH_WIZARDCONTEXTHELP 4096 + +#define PSH_DEFAULT 0x0000 +#define PSH_PROPTITLE 0x0001 +#define PSH_USEHICON 0x0002 +#define PSH_USEICONID 0x0004 +#define PSH_PROPSHEETPAGE 0x0008 +#define PSH_WIZARDHASFINISH 0x0010 +#define PSH_WIZARD 0x0020 +#define PSH_USEPSTARTPAGE 0x0040 +#define PSH_NOAPPLYNOW 0x0080 +#define PSH_USECALLBACK 0x0100 +#define PSH_HASHELP 0x0200 +#define PSH_MODELESS 0x0400 +#define PSH_RTLREADING 0x0800 +#define PSH_WIZARDCONTEXTHELP 0x1000 +#ifdef _WIN32_IE +#define PSH_MAXIMIZE 0x2000 /* ?? */ +#endif #if (_WIN32_IE >= 0x0400) -#define PSH_WATERMARK 32768 -#define PSH_USEHBMWATERMARK 65536 -#define PSH_USEHPLWATERMARK 131072 -#define PSH_STRETCHWATERMARK 262144 -#define PSH_HEADER 524288 -#define PSH_USEHBMHEADER 1048576 -#define PSH_USEPAGELANG 2097152 +#define PSH_WATERMARK 0x4000 +#define PSH_USEHBMWATERMARK 0x010000 +#define PSH_USEHPLWATERMARK 0x020000 +#define PSH_STRETCHWATERMARK 0x040000 +#define PSH_HEADER 0x080000 +#define PSH_USEHBMHEADER 0x100000 +#define PSH_USEPAGELANG 0x200000 #if (_WIN32_IE < 0x0500) -#define PSH_WIZARD97 0x00002000 +#define PSH_WIZARD97 0x00002000 #else -#define PSH_WIZARD97 0x01000000 +#define PSH_WIZARD97 0x01000000 #endif #endif /* _WIN32_IE >= 0x0400 */ #if (_WIN32_IE >= 0x0500) Modified: trunk/cegcc/src/w32api/include/winioctl.h =================================================================== --- trunk/cegcc/src/w32api/include/winioctl.h 2008-04-13 13:31:27 UTC (rev 1158) +++ trunk/cegcc/src/w32api/include/winioctl.h 2008-04-27 09:39:53 UTC (rev 1159) @@ -548,6 +548,21 @@ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13_EXTENDED))||\ ((t&~PARTITION_NTFT)==PARTITION_EXTENDED)||\ ((t&~PARTITION_NTFT)==PARTITION_XINT13_EXTENDED)) + +#if defined(_WIN32_WCE) +#define FILE_DEVICE_HAL 0x0101 +#define FILE_DEVICE_SERVICE 0x0104 + +#define IOCTL_SERVICE_START \ + CTL_CODE(FILE_DEVICE_SERVICE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_SERVICE_STOP \ + CTL_CODE(FILE_DEVICE_SERVICE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_SERVICE_STATUS \ + CTL_CODE(FILE_DEVICE_SERVICE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_SERVICE_CONNECTION \ + CTL_CODE(FILE_DEVICE_SERVICE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS) +#endif /* _WIN32_WCE */ + #ifdef __cplusplus } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-04-13 13:31:36
|
Revision: 1158 http://cegcc.svn.sourceforge.net/cegcc/?rev=1158&view=rev Author: dannybackx Date: 2008-04-13 06:31:27 -0700 (Sun, 13 Apr 2008) Log Message: ----------- Define SystemIdleTimerReset. Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/winuser.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-13 13:12:49 UTC (rev 1157) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-13 13:31:27 UTC (rev 1158) @@ -1,5 +1,9 @@ 2008-04-13 Danny Backx <dan...@us...> + * include/winuser.h (SystemIdleTimerReset): Define. + +2008-04-13 Danny Backx <dan...@us...> + * include/notify.h: Add. * include/aygshell.h (SHSetAppKeyWndAssoc): Define. * include/commctrl (CommandBar_AddButtons): Define. Modified: trunk/cegcc/src/w32api/include/winuser.h =================================================================== --- trunk/cegcc/src/w32api/include/winuser.h 2008-04-13 13:12:49 UTC (rev 1157) +++ trunk/cegcc/src/w32api/include/winuser.h 2008-04-13 13:31:27 UTC (rev 1158) @@ -4106,6 +4106,9 @@ #if (_WIN32_WINNT >= 0x0501) WINUSERAPI BOOL WINAPI GetLayeredWindowAttributes(HWND,COLORREF*,BYTE*,DWORD*); #endif +#if (_WIN32_WCE >= 0x0200) +WINUSERAPI void WINAPI SystemIdleTimerReset(void); +#endif #ifdef UNICODE #define EDITWORDBREAKPROC EDITWORDBREAKPROCW #define PROPENUMPROC PROPENUMPROCW This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-04-13 13:12:55
|
Revision: 1157 http://cegcc.svn.sourceforge.net/cegcc/?rev=1157&view=rev Author: dannybackx Date: 2008-04-13 06:12:49 -0700 (Sun, 13 Apr 2008) Log Message: ----------- Add a file required for roadmap_editor, definitions from MSDN. Also two definitions in other files. Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/aygshell.h trunk/cegcc/src/w32api/include/commctrl.h Added Paths: ----------- trunk/cegcc/src/w32api/include/notify.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-13 10:56:22 UTC (rev 1156) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-13 13:12:49 UTC (rev 1157) @@ -1,5 +1,11 @@ 2008-04-13 Danny Backx <dan...@us...> + * include/notify.h: Add. + * include/aygshell.h (SHSetAppKeyWndAssoc): Define. + * include/commctrl (CommandBar_AddButtons): Define. + +2008-04-13 Danny Backx <dan...@us...> + * include/aygshell.h: Add <sipapi.h> include. 2008-02-21 Danny Backx <dan...@us...> Modified: trunk/cegcc/src/w32api/include/aygshell.h =================================================================== --- trunk/cegcc/src/w32api/include/aygshell.h 2008-04-13 10:56:22 UTC (rev 1156) +++ trunk/cegcc/src/w32api/include/aygshell.h 2008-04-13 13:12:49 UTC (rev 1157) @@ -241,6 +241,7 @@ #define SHDB_SHOW 1 #define SHDB_HIDE 2 +BOOL SHSetAppKeyWndAssoc(BYTE bVk, HWND hwnd); #endif /* _WIN32_WCE >= 0x0300 */ #ifdef __cplusplus Modified: trunk/cegcc/src/w32api/include/commctrl.h =================================================================== --- trunk/cegcc/src/w32api/include/commctrl.h 2008-04-13 10:56:22 UTC (rev 1156) +++ trunk/cegcc/src/w32api/include/commctrl.h 2008-04-13 13:12:49 UTC (rev 1157) @@ -3750,6 +3750,7 @@ COMMCTRLAPI HMENU WINAPI CommandBar_GetMenu(HWND,WORD); COMMCTRLAPI BOOL WINAPI CommandBar_AddAdornments(HWND,DWORD,DWORD); COMMCTRLAPI int WINAPI CommandBar_Height(HWND); +BOOL CommandBar_AddButtons(HWND hwndCB, UINT uNumButtons, LPTBBUTTON lpButtons); #define CommandBar_InsertButton(hwnd,i,lptbbutton) ((BOOL)SendMessage((hwnd),TB_INSERTBUTTON,(i),(lptbbutton))) #define CommandBar_Destroy(hwnd) ((void)DestroyWindow(hwnd)) Added: trunk/cegcc/src/w32api/include/notify.h =================================================================== --- trunk/cegcc/src/w32api/include/notify.h (rev 0) +++ trunk/cegcc/src/w32api/include/notify.h 2008-04-13 13:12:49 UTC (rev 1157) @@ -0,0 +1,101 @@ +/* + * The notify component supports the Windows CE event notification system. + */ +#ifndef _NOTIFY_H_ +#define _NOTIFY_H_ + +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WIN32_WCE /* Valid from Windows CE 1.01 and later */ + +typedef struct UserNotificationType { + DWORD ActionFlags; + wchar_t *pwszDialogTitle; + wchar_t *pwszDialogText; + wchar_t *pwszSound; + DWORD nMaxSound; + DWORD dwReserved; +} CE_USER_NOTIFICATION, *PCE_USER_NOTIFICATION; + +typedef struct UserNotificationTrigger { + DWORD dwSize; + DWORD dwType; + DWORD dwEvent; + WCHAR *lpszApplication; + WCHAR *lpszArguments; + SYSTEMTIME stStartTime; + SYSTEMTIME stEndTime; +} CE_NOTIFICATION_TRIGGER, *PCE_NOTIFICATION_TRIGGER; + +/* Flags for ActionFlags. Values from forums.microsoft.com. */ +#define PUN_LED 1 /* ? */ +#define PUN_VIBRATE 2 /* ? */ +#define PUN_DIALOG 4 /* ? */ +#define PUN_SOUND 8 /* ? */ +#define PUN_REPEAT 16 /* ? */ +#define PUN_PRIVATE 32 /* ? */ + +/* Values for lWhichEvent in CeRunAppAtEvent */ +#define NOTIFICATION_EVENT_NONE 0 /* ? */ +#define NOTIFICATION_EVENT_TIME_CHANGE 1 /* ? */ +#define NOTIFICATION_EVENT_SYNC_END 2 /* ? */ +#define NOTIFICATION_EVENT_ON_AC_POWER 3 /* ? */ +#define NOTIFICATION_EVENT_OFF_AC_POWER 4 /* ? */ +#define NOTIFICATION_EVENT_NET_CONNECT 5 /* ? */ +#define NOTIFICATION_EVENT_NET_DISCONNECT 6 /* ? */ +#define NOTIFICATION_EVENT_DEVICE_CHANGE 7 /* ? */ +#define NOTIFICATION_EVENT_IR_DISCOVERED 8 /* ? */ +#define NOTIFICATION_EVENT_RS232_DETECTED 9 /* ? */ +#define NOTIFICATION_EVENT_RESTORE_END 10 /* ? */ +#define NOTIFICATION_EVENT_WAKEUP 11 /* ? */ +#define NOTIFICATION_EVENT_TZ_CHANGE 12 /* ? */ +#define NOTIFICATION_EVENT_MACHINE_NAME_CHANGE 13 /* ? */ + +/* Command line values */ +#define APP_RUN_AFTER_EXTENDED_EVENT L"AppRunAfterExtendedEvent" +#define APP_RUN_AFTER_SYNC L"AppRunAfterSync" +#define APP_RUN_AFTER_TZ_CHANGE L"AppRunAfterTzChange" +#define APP_RUN_AFTER_WAKEUP L"AppRunAfterWakeup" +#define APP_RUN_AT_AC_POWER_ON L"AppRunAtAcPowerOn" +#define APP_RUN_AT_AC_POWER_OFF L"AppRunAtAcPowerOff" +#define APP_RUN_AT_NET_CONNECT L"AppRunAtNetConnect" +#define APP_RUN_AT_NET_DISCONNECT L"AppRunAtNetDisconnect" +#define APP_RUN_AT_DEVICE_CHANGE L"AppRunDeviceChange" +#define APP_RUN_AT_IR_DISCOVERY L"AppRunAtIrDiscovery" +#define APP_RUN_AT_RS232_DETECT L"AppRunAtRs232Detect" +#define APP_RUN_AFTER_RESTORE L"AppRunAfterRestore" + +BOOL CeClearUserNotification (HANDLE hNotification); +BOOL CeGetUserNotification (HANDLE hNotification, + DWORD cBufferSize, + LPDWORD pcBytesNeeded, + LPBYTE pBuffer); +BOOL CeGetUserNotificationHandles (HANDLE* rghNotifications, + DWORD cHandles, + LPDWORD pcHandlesNeeded); +BOOL CeGetUserNotificationPreferences (HWND hWndParent, + PCE_USER_NOTIFICATION lpNotification); +BOOL CeHandleAppNotifications (wchar_t *pwszAppName); +BOOL CeRunAppAtEvent (wchar_t *pwszAppName, LONG lWhichEvent); +BOOL CeRunAppAtTime (wchar_t *pwszAppName, SYSTEMTIME* lpTime); +HANDLE CeSetUserNotification (HANDLE hNotification, + wchar_t *pwszAppName, + SYSTEMTIME* lpTime, + PCE_USER_NOTIFICATION lpUserNotification); +HANDLE CeSetUserNotificationEx (HANDLE hNotification, + CE_NOTIFICATION_TRIGGER *pcnt, + CE_USER_NOTIFICATION* pceun); + +#endif /* _WIN32_WCE */ + +#ifdef __cplusplus +} +#endif + +#endif /* _NOTIFY_H_ */ Property changes on: trunk/cegcc/src/w32api/include/notify.h ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-04-13 10:56:24
|
Revision: 1156 http://cegcc.svn.sourceforge.net/cegcc/?rev=1156&view=rev Author: dannybackx Date: 2008-04-13 03:56:22 -0700 (Sun, 13 Apr 2008) Log Message: ----------- Add include <sipapi.h> Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/aygshell.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2008-03-29 13:30:52 UTC (rev 1155) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2008-04-13 10:56:22 UTC (rev 1156) @@ -1,3 +1,7 @@ +2008-04-13 Danny Backx <dan...@us...> + + * include/aygshell.h: Add <sipapi.h> include. + 2008-02-21 Danny Backx <dan...@us...> * include/winnt.h (VER_PLATFORM_WIN32_CE): Define. Modified: trunk/cegcc/src/w32api/include/aygshell.h =================================================================== --- trunk/cegcc/src/w32api/include/aygshell.h 2008-03-29 13:30:52 UTC (rev 1155) +++ trunk/cegcc/src/w32api/include/aygshell.h 2008-04-13 10:56:22 UTC (rev 1156) @@ -14,6 +14,7 @@ #include <windows.h> #include <basetyps.h> /* Make sure we have a CLSID definition */ #include <shellapi.h> /* for WINSHELLAPI */ +#include <sipapi.h> /* * Menu Bar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-03-29 13:30:54
|
Revision: 1155 http://cegcc.svn.sourceforge.net/cegcc/?rev=1155&view=rev Author: dannybackx Date: 2008-03-29 06:30:52 -0700 (Sat, 29 Mar 2008) Log Message: ----------- This fixes decoding the pdata field (for exception handlers) so e.g. objdump does the right thing. This "compressed" pdata format is published on MSDN and is what ARM and SH-4 use. This fix is submitted to binutils, I expect that they'll want the details to be tweaked (it's already modified so the strange conditional compilation is gone). Modified Paths: -------------- trunk/cegcc/src/binutils/ChangeLog.ce trunk/cegcc/src/binutils/bfd/coff-rs6000.c trunk/cegcc/src/binutils/bfd/coff-sh.c trunk/cegcc/src/binutils/bfd/coff64-rs6000.c trunk/cegcc/src/binutils/bfd/coffcode.h trunk/cegcc/src/binutils/bfd/libcoff.h trunk/cegcc/src/binutils/bfd/pe-arm-wince.c trunk/cegcc/src/binutils/bfd/pe-arm.c trunk/cegcc/src/binutils/bfd/peXXigen.c trunk/cegcc/src/binutils/bfd/pei-arm-wince.c trunk/cegcc/src/binutils/bfd/pei-arm.c Modified: trunk/cegcc/src/binutils/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/ChangeLog.ce 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/ChangeLog.ce 2008-03-29 13:30:52 UTC (rev 1155) @@ -1,3 +1,19 @@ +2008-03-29 Danny Backx <dan...@us...> + + * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to + print compressed pdata structure as described on MSDN. This only + applies to a limited set of architectures (ARM, SH4). + * pe-arm-wince.c (slurp_symtab, my_symbol_for_address): Define static + helper functions for pe_print_compressed_pdata. + * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field. + * coffcode.h (bfd_coff_have_print_pdata, bfd_coff_print_pdata) : + Define. + * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): add check on + bfd_coff_backend_data, call the function if non-null. + * libcoff.h, pei-arm.c, pei-arm-wince.c, pe-arm.c, coff-sh.c, + coff64-rs6000.c, coff-rs6000.c: Add target dependent initialisation for + bfd_coff_backend_data. + 2008-01-10 Pedro Alves <ped...@po...> binutils/ Modified: trunk/cegcc/src/binutils/bfd/coff-rs6000.c =================================================================== --- trunk/cegcc/src/binutils/bfd/coff-rs6000.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/coff-rs6000.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -4034,7 +4034,8 @@ NULL, /* _bfd_coff_adjust_symndx */ _bfd_generic_link_add_one_symbol, coff_link_output_has_begun, - coff_final_link_postscript + coff_final_link_postscript, + NULL /* print_pdata */ }, 0x01DF, /* magic number */ @@ -4285,7 +4286,8 @@ NULL, /* _bfd_coff_adjust_symndx */ _bfd_generic_link_add_one_symbol, coff_link_output_has_begun, - coff_final_link_postscript + coff_final_link_postscript, + NULL /* print_pdata */ }, 0x01DF, /* magic number */ Modified: trunk/cegcc/src/binutils/bfd/coff-sh.c =================================================================== --- trunk/cegcc/src/binutils/bfd/coff-sh.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/coff-sh.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -3149,7 +3149,8 @@ coff_classify_symbol, coff_compute_section_file_positions, coff_start_final_link, coff_relocate_section, coff_rtype_to_howto, coff_adjust_symndx, coff_link_add_one_symbol, - coff_link_output_has_begun, coff_final_link_postscript + coff_link_output_has_begun, coff_final_link_postscript, + bfd_pe_print_pdata }; #define coff_small_close_and_cleanup \ Modified: trunk/cegcc/src/binutils/bfd/coff64-rs6000.c =================================================================== --- trunk/cegcc/src/binutils/bfd/coff64-rs6000.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/coff64-rs6000.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -2584,7 +2584,8 @@ NULL, /* _bfd_coff_adjust_symndx */ _bfd_generic_link_add_one_symbol, coff_link_output_has_begun, - coff_final_link_postscript + coff_final_link_postscript, + NULL /* print_pdata */ }, 0x01EF, /* magic number */ @@ -2837,7 +2838,8 @@ NULL, /* _bfd_coff_adjust_symndx */ _bfd_generic_link_add_one_symbol, coff_link_output_has_begun, - coff_final_link_postscript + coff_final_link_postscript, + NULL /* print_pdata */ }, U64_TOCMAGIC, /* magic number */ Modified: trunk/cegcc/src/binutils/bfd/coffcode.h =================================================================== --- trunk/cegcc/src/binutils/bfd/coffcode.h 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/coffcode.h 2008-03-29 13:30:52 UTC (rev 1155) @@ -5263,7 +5263,8 @@ coff_classify_symbol, coff_compute_section_file_positions, coff_start_final_link, coff_relocate_section, coff_rtype_to_howto, coff_adjust_symndx, coff_link_add_one_symbol, - coff_link_output_has_begun, coff_final_link_postscript + coff_link_output_has_begun, coff_final_link_postscript, + bfd_pe_print_pdata }; #ifdef TICOFF @@ -5306,7 +5307,8 @@ coff_classify_symbol, coff_compute_section_file_positions, coff_start_final_link, coff_relocate_section, coff_rtype_to_howto, coff_adjust_symndx, coff_link_add_one_symbol, - coff_link_output_has_begun, coff_final_link_postscript + coff_link_output_has_begun, coff_final_link_postscript, + bfd_pe_print_pdata }; #endif @@ -5350,7 +5352,8 @@ coff_classify_symbol, coff_compute_section_file_positions, coff_start_final_link, coff_relocate_section, coff_rtype_to_howto, coff_adjust_symndx, coff_link_add_one_symbol, - coff_link_output_has_begun, coff_final_link_postscript + coff_link_output_has_begun, coff_final_link_postscript, + bfd_pe_print_pdata }; #endif Modified: trunk/cegcc/src/binutils/bfd/libcoff.h =================================================================== --- trunk/cegcc/src/binutils/bfd/libcoff.h 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/libcoff.h 2008-03-29 13:30:52 UTC (rev 1155) @@ -802,6 +802,8 @@ bfd_boolean (*_bfd_coff_final_link_postscript) (bfd *, struct coff_final_link_info *); + bfd_boolean (*_bfd_coff_print_pdata) + (bfd *, void *); } bfd_coff_backend_data; #define coff_backend_info(abfd) \ @@ -934,3 +936,7 @@ #define bfd_coff_final_link_postscript(a,p) \ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p)) +#define bfd_coff_have_print_pdata(a) \ + (coff_backend_info (a)->_bfd_coff_print_pdata) +#define bfd_coff_print_pdata(a,p) \ + ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p)) Modified: trunk/cegcc/src/binutils/bfd/pe-arm-wince.c =================================================================== --- trunk/cegcc/src/binutils/bfd/pe-arm-wince.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/pe-arm-wince.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -35,4 +35,179 @@ #define LOCAL_LABEL_PREFIX "." +#include "sysdep.h" +#include "bfd.h" + +#undef bfd_pe_print_pdata +#define bfd_pe_print_pdata pe_print_compressed_pdata +extern bfd_boolean pe_print_compressed_pdata (bfd * abfd, void * vfile); + #include "pe-arm.c" + +static int symcount=0; +static asymbol ** +slurp_symtab (bfd *abfd) +{ + asymbol **sy = NULL; + long storage; + + if (!(bfd_get_file_flags (abfd) & HAS_SYMS)) + { + symcount = 0; + return NULL; + } + + storage = bfd_get_symtab_upper_bound (abfd); + if (storage < 0) + return NULL; + if (storage) + sy = bfd_malloc (storage); + + symcount = bfd_canonicalize_symtab (abfd, sy); + if (symcount < 0) + return NULL; + return sy; +} + +static const char * +my_symbol_for_address(bfd *abfd, bfd_vma func) +{ + static asymbol **syms = 0; + int i; + + if (syms == 0) + syms = slurp_symtab (abfd); + for (i=0; i<symcount; i++) { + if (syms[i]->section->vma + syms[i]->value == func) + return syms[i]->name; + } + return NULL; +} + +/* Copied from peXXigen.c , then modified for compressed pdata. + + This really is architecture dependent. On IA-64, a .pdata entry + consists of three dwords containing relative virtual addresses that + specify the start and end address of the code range the entry + covers and the address of the corresponding unwind info data. + + On ARM and SH-4, a compressed PDATA structure is used : + _IMAGE_CE_RUNTIME_FUNCTION_ENTRY, whereas MIPS is documented to use + _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY. + See http://msdn2.microsoft.com/en-us/library/ms253988(VS.80).aspx . + */ + +/* This is the version for "compressed" pdata. */ +bfd_boolean +pe_print_compressed_pdata (bfd * abfd, void * vfile) +{ +# define PDATA_ROW_SIZE (2 * 4) + FILE *file = (FILE *) vfile; + bfd_byte *data = 0; + asection *section = bfd_get_section_by_name (abfd, ".pdata"); + bfd_size_type datasize = 0; + bfd_size_type i; + bfd_size_type start, stop; + int onaline = PDATA_ROW_SIZE; + + if (section == NULL + || coff_section_data (abfd, section) == NULL + || pei_section_data (abfd, section) == NULL) + return TRUE; + + stop = pei_section_data (abfd, section)->virt_size; + if ((stop % onaline) != 0) + fprintf (file, + _("Warning, .pdata section size (%ld) is not a multiple of %d\n"), + (long) stop, onaline); + + fprintf (file, + _("\nThe Function Table (interpreted .pdata section contents)\n")); + + fprintf (file, _("\ + vma:\t\tBegin Prolog Function Flags Exception EH\n\ + \t\tAddress Length Length 32b exc Handler Data\n")); + + datasize = section->size; + if (datasize == 0) + return TRUE; + + if (! bfd_malloc_and_get_section (abfd, section, &data)) + { + if (data != NULL) + free (data); + return FALSE; + } + + start = 0; + + for (i = start; i < stop; i += onaline) + { + bfd_vma begin_addr; + bfd_vma other_data; + bfd_vma prolog_length, function_length; + int flag32bit, exception_flag; + bfd_byte *tdata = 0; + asection *tsection; + + if (i + PDATA_ROW_SIZE > stop) + break; + + begin_addr = GET_PDATA_ENTRY (abfd, data + i ); + other_data = GET_PDATA_ENTRY (abfd, data + i + 4); + + if (begin_addr == 0 && other_data == 0) + /* We are probably into the padding of the section now. */ + break; + + prolog_length = (other_data & 0x000000FF); + function_length = (other_data & 0x3FFFFF00) >> 8; + flag32bit = (int)((other_data & 0x40000000) >> 30); + exception_flag = (int)((other_data & 0x80000000) >> 31); + + fputc (' ', file); + fprintf_vma (file, i + section->vma); fputc ('\t', file); + fprintf_vma (file, begin_addr); fputc (' ', file); + fprintf_vma (file, prolog_length); fputc (' ', file); + fprintf_vma (file, function_length); fputc (' ', file); + fprintf (file, "%2d %2d ", flag32bit, exception_flag); + + /* Get the exception handler's address and the data passed from the + * .text section. This is really the data that belongs with the .pdata + * but got "compressed" out for the ARM and SH4 architectures. */ + tsection = bfd_get_section_by_name (abfd, ".text"); + if (tsection && coff_section_data (abfd, tsection) + && pei_section_data (abfd, tsection)) { + if (bfd_malloc_and_get_section (abfd, tsection, &tdata)) { + int xx = (begin_addr - 8) - tsection->vma; + tdata = bfd_malloc (8); + if (bfd_get_section_contents + (abfd, tsection, tdata, (bfd_vma) xx, 8)) + { + bfd_vma eh, eh_data; + + eh = bfd_get_32(abfd, tdata); + eh_data = bfd_get_32(abfd, tdata + 4); + fprintf(file, "%08x ", (unsigned int)eh); + fprintf(file, "%08x", (unsigned int)eh_data); + if (eh != 0) { + const char *s = my_symbol_for_address(abfd, eh); + if (s) + fprintf(file, " (%s) ", s); + } + } + free (tdata); + } else { + if (tdata) + free(tdata); + } + } + + fprintf (file, "\n"); + } + + free (data); + + return TRUE; +#undef PDATA_ROW_SIZE +} Modified: trunk/cegcc/src/binutils/bfd/pe-arm.c =================================================================== --- trunk/cegcc/src/binutils/bfd/pe-arm.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/pe-arm.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -63,4 +63,8 @@ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } +#undef bfd_pe_print_pdata +#define bfd_pe_print_pdata pe_print_compressed_pdata +extern bfd_boolean pe_print_compressed_pdata (bfd * abfd, void * vfile); + #include "coff-arm.c" Modified: trunk/cegcc/src/binutils/bfd/peXXigen.c =================================================================== --- trunk/cegcc/src/binutils/bfd/peXXigen.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/peXXigen.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -1581,8 +1581,17 @@ /* This really is architecture dependent. On IA-64, a .pdata entry consists of three dwords containing relative virtual addresses that specify the start and end address of the code range the entry - covers and the address of the corresponding unwind info data. */ + covers and the address of the corresponding unwind info data. + On ARM and SH-4, a compressed PDATA structure is used : + _IMAGE_CE_RUNTIME_FUNCTION_ENTRY, whereas MIPS is documented to use + _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY. + See http://msdn2.microsoft.com/en-us/library/ms253988(VS.80).aspx . + + The version of this function to deal with compressed pdata is moved to + pe-arm-wince.c . + */ + static bfd_boolean pe_print_pdata (bfd * abfd, void * vfile) { @@ -1705,6 +1714,7 @@ free (data); return TRUE; +#undef PDATA_ROW_SIZE } #define IMAGE_REL_BASED_HIGHADJ 4 @@ -1975,7 +1985,10 @@ pe_print_idata (abfd, vfile); pe_print_edata (abfd, vfile); - pe_print_pdata (abfd, vfile); + if (bfd_coff_have_print_pdata (abfd)) + bfd_coff_print_pdata (abfd, vfile); + else + pe_print_pdata (abfd, vfile); pe_print_reloc (abfd, vfile); return TRUE; Modified: trunk/cegcc/src/binutils/bfd/pei-arm-wince.c =================================================================== --- trunk/cegcc/src/binutils/bfd/pei-arm-wince.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/pei-arm-wince.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -28,4 +28,11 @@ #define LOCAL_LABEL_PREFIX "." +#include "sysdep.h" +#include "bfd.h" + +#undef bfd_pe_print_pdata +#define bfd_pe_print_pdata pe_print_compressed_pdata +extern bfd_boolean pe_print_compressed_pdata (bfd * abfd, void * vfile); + #include "pei-arm.c" Modified: trunk/cegcc/src/binutils/bfd/pei-arm.c =================================================================== --- trunk/cegcc/src/binutils/bfd/pei-arm.c 2008-03-27 17:22:16 UTC (rev 1154) +++ trunk/cegcc/src/binutils/bfd/pei-arm.c 2008-03-29 13:30:52 UTC (rev 1155) @@ -51,4 +51,8 @@ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } +#undef bfd_pe_print_pdata +#define bfd_pe_print_pdata pe_print_compressed_pdata +extern bfd_boolean pe_print_compressed_pdata (bfd * abfd, void * vfile); + #include "coff-arm.c" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-03-27 17:22:33
|
Revision: 1154 http://cegcc.svn.sourceforge.net/cegcc/?rev=1154&view=rev Author: dannybackx Date: 2008-03-27 10:22:16 -0700 (Thu, 27 Mar 2008) Log Message: ----------- Add directory structure and Makefiles to replace build-mingw32ce-dlls.sh. Hope this is more portable and better at error handling. Modified Paths: -------------- trunk/cegcc/src/ChangeLog trunk/cegcc/src/build-mingw32ce.sh Added Paths: ----------- trunk/cegcc/src/mingwdll/ trunk/cegcc/src/mingwdll/Makefile trunk/cegcc/src/mingwdll/get-version trunk/cegcc/src/mingwdll/libgcc/ trunk/cegcc/src/mingwdll/libgcc/Makefile trunk/cegcc/src/mingwdll/libstdc++/ trunk/cegcc/src/mingwdll/libstdc++/Makefile trunk/cegcc/src/mingwdll/libsupc++/ trunk/cegcc/src/mingwdll/libsupc++/Makefile Modified: trunk/cegcc/src/ChangeLog =================================================================== --- trunk/cegcc/src/ChangeLog 2008-03-27 10:53:39 UTC (rev 1153) +++ trunk/cegcc/src/ChangeLog 2008-03-27 17:22:16 UTC (rev 1154) @@ -1,3 +1,12 @@ +2008-03-27 Danny Backx <dan...@us...> + + * mingwdll: Add new directory structure, containing mostly + Makefiles, to deal with creation of DLL files, to replace + the build-mingw32ce-dlls.sh script. + * build-mingw32ce.sh: Adapt to use mingwdll directory. + * build-mingw32ce.sh: Change order of items in the help text so it + reflects the reality. + 2008-01-02 Danny Backx <dan...@us...> * cegcc/cegccdll/Makefile, cegcc/libstdc++/Makefile: Use "?=" to Modified: trunk/cegcc/src/build-mingw32ce.sh =================================================================== --- trunk/cegcc/src/build-mingw32ce.sh 2008-03-27 10:53:39 UTC (rev 1153) +++ trunk/cegcc/src/build-mingw32ce.sh 2008-03-27 17:22:16 UTC (rev 1154) @@ -23,7 +23,7 @@ [$ac_default_prefix] --components=LIST specify which components to build valid components are: all,binutils,bootstrapgcc, - gcc,w32api,mingw, gdb,gdbstub,docs and profile + mingw,w32api,gcc,docs,profile,gdb,gdbstub,dlls [all] Report bugs to <ceg...@li...>. @@ -367,7 +367,7 @@ cd ${BUILD_DIR} } -build_dlls() +obuild_dlls() { echo "" echo "BUILDING DLL libraries --------------------------" @@ -385,6 +385,22 @@ cd ${BUILD_DIR} } +build_dlls() +{ + echo "" + echo "BUILDING DLL libraries --------------------------" + echo "" + echo "" + + cd ${BUILD_DIR} + + cd ${BASE_DIRECTORY}/mingwdll || exit 1 + make || exit 1 + make install || exit 1 + + cd ${BUILD_DIR} +} + build_all() { build_binutils Added: trunk/cegcc/src/mingwdll/Makefile =================================================================== --- trunk/cegcc/src/mingwdll/Makefile (rev 0) +++ trunk/cegcc/src/mingwdll/Makefile 2008-03-27 17:22:16 UTC (rev 1154) @@ -0,0 +1,25 @@ +SUBDIRS= libgcc libstdc++ libsupc++ + + +all:: + for i in ${SUBDIRS}; do \ + cd $$i ; \ + make all || exit 1; \ + cd .. ; \ + done + + +clean:: + for i in ${SUBDIRS}; do \ + cd $$i ; \ + make clean ; \ + cd .. ; \ + done + +install:: + for i in ${SUBDIRS}; do \ + cd $$i ; \ + make install || exit 1; \ + cd .. ; \ + done + Property changes on: trunk/cegcc/src/mingwdll/Makefile ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingwdll/get-version =================================================================== --- trunk/cegcc/src/mingwdll/get-version (rev 0) +++ trunk/cegcc/src/mingwdll/get-version 2008-03-27 17:22:16 UTC (rev 1154) @@ -0,0 +1,8 @@ +#!/bin/sh +#BASE_DIRECTORY=/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src +LIBVER=$(grep libtool_VERSION= ${BASE_DIRECTORY}/gcc/libstdc++-v3/configure | sed -e 's/libtool_VERSION=//') +LIBVER_c=$(echo $LIBVER | awk -F: '{print $1}') +LIBVER_r=$(echo $LIBVER | awk -F: '{print $2}') +LIBVER_a=$(echo $LIBVER | awk -F: '{print $3}') +LIBSTDCPP_DLLVER=$(($LIBVER_c - $LIBVER_a)) +echo $LIBSTDCPP_DLLVER Property changes on: trunk/cegcc/src/mingwdll/get-version ___________________________________________________________________ Name: svn:executable + * Added: trunk/cegcc/src/mingwdll/libgcc/Makefile =================================================================== --- trunk/cegcc/src/mingwdll/libgcc/Makefile (rev 0) +++ trunk/cegcc/src/mingwdll/libgcc/Makefile 2008-03-27 17:22:16 UTC (rev 1154) @@ -0,0 +1,39 @@ +# +# This Makefile converts a 'static' library into a DLL. +# +# /opt/mingw32ce/lib/gcc/arm-mingw32ce/4.3.0/libgcc.a +# ${PREFIX}/lib/gcc/${TARGET}/${GCC_VERSION}/libgcc.a +# +ME= libgcc +MYDIR= mingwdll/${ME} +#TARGET?= arm-mingw32ce +#BUILD_DIR?= /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-mingw32ce +#PREFIX?= /opt/mingw32ce +DLLVERSION= 0.55.2 +DLL_DIR= ${PREFIX}/${TARGET}/lib +DEVICE_DIR= ${PREFIX}/${TARGET}/lib/device + +DLL_LIBS= # -lws2 + +GCC_VERSION= `${TARGET}-gcc --version | head -1 | awk '{print $$3;}'` + +all:: + mkdir -p ${BUILD_DIR}/${MYDIR} + ${TARGET}-dlltool --output-def ${BUILD_DIR}/${MYDIR}/${ME}.def \ + --export-all ${PREFIX}/lib/gcc/${TARGET}/${GCC_VERSION}/${ME}.a + cd ${BUILD_DIR}/${MYDIR}; ${TARGET}-gcc --shared \ + -o ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll \ + -Wl,--out-implib,${ME}.dll.a ${BUILD_DIR}/${MYDIR}/${ME}.def \ + ${PREFIX}/lib/gcc/${TARGET}/${GCC_VERSION}/${ME}.a ${DLL-LIBS} + -rm -f ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + ${TARGET}-strip ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + +clean:: + -rm -f ${BUILD_DIR}/${MYDIR}/*.o + -rm -f ${BUILD_DIR}/${MYDIR}/${ME}* + +install:: + mkdir -p ${DLL_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}.def ${DLL_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll ${DLL_DIR} Property changes on: trunk/cegcc/src/mingwdll/libgcc/Makefile ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingwdll/libstdc++/Makefile =================================================================== --- trunk/cegcc/src/mingwdll/libstdc++/Makefile (rev 0) +++ trunk/cegcc/src/mingwdll/libstdc++/Makefile 2008-03-27 17:22:16 UTC (rev 1154) @@ -0,0 +1,49 @@ +# +# This Makefile converts a 'static' library into a DLL. +# +# /opt/mingw32ce/arm-mingw32ce/lib/libstdc++.a +# ${PREFIX}/${TARGET}/lib/libstdc++.a +# +ME= libstdc++ +MYDIR= mingwdll/${ME} +#TARGET?= arm-mingw32ce +#BUILD_DIR?= /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-mingw32ce +#PREFIX?= /opt/mingw32ce +#BASE_DIRECTORY?=/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src +DLL_DIR= ${PREFIX}/${TARGET}/lib +DEVICE_DIR= ${PREFIX}/${TARGET}/lib/device + +DLLVERSION= `${BASE_DIRECTORY}/mingwdll/get-version` + +DLL_LIBS= # -lws2 + +GCC_VERSION= `${TARGET}-gcc --version | head -1 | awk '{print $$3;}'` + +all:: + mkdir -p ${BUILD_DIR}/${MYDIR} + ${TARGET}-dlltool --output-def ${BUILD_DIR}/${MYDIR}/${ME}.def \ + --export-all ${PREFIX}/${TARGET}/lib/${ME}.a + cd ${BUILD_DIR}/${MYDIR}; ${TARGET}-gcc --shared \ + -o ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll \ + -Wl,--out-implib,${ME}.dll.a ${BUILD_DIR}/${MYDIR}/${ME}.def \ + ${PREFIX}/${TARGET}/lib/${ME}.a ${DLL-LIBS} + -rm -f ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + ${TARGET}-strip ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + sed \ + -e "s/^dlname=.*\$$/dlname='${ME}-${DLLVERSION}.dll'/" \ + -e "s/^library_names=.*\$$/library_names='${ME}.dll.a'/" \ + <${PREFIX}/${TARGET}/lib/${ME}.la \ + >${BUILD_DIR}/${MYDIR}/${ME}.la + +clean:: + -rm -f ${BUILD_DIR}/${MYDIR}/*.o + -rm -f ${BUILD_DIR}/${MYDIR}/${ME}* + +install:: + mkdir -p ${DLL_DIR} ${DEVICE_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}.def ${DLL_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll ${DLL_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped ${DEVICE_DIR} + rm -f ${DLL_DIR}/${ME}.la + cp ${BUILD_DIR}/${MYDIR}/${ME}.la ${DLL_DIR}/${ME}.la Property changes on: trunk/cegcc/src/mingwdll/libstdc++/Makefile ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingwdll/libsupc++/Makefile =================================================================== --- trunk/cegcc/src/mingwdll/libsupc++/Makefile (rev 0) +++ trunk/cegcc/src/mingwdll/libsupc++/Makefile 2008-03-27 17:22:16 UTC (rev 1154) @@ -0,0 +1,48 @@ +# +# This Makefile converts a 'static' library into a DLL. +# +# /opt/mingw32ce/arm-mingw32ce/lib/libsupc++.a +# ${PREFIX}/${TARGET}/lib/libsupc++.a +# +ME= libsupc++ +MYDIR= mingwdll/${ME} +#TARGET?= arm-mingw32ce +#BUILD_DIR?= /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-mingw32ce +#PREFIX?= /opt/mingw32ce +#BASE_DIRECTORY?=/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src +DLL_DIR= ${PREFIX}/${TARGET}/lib +DEVICE_DIR= ${PREFIX}/${TARGET}/lib/device + +DLLVERSION= `${BASE_DIRECTORY}/mingwdll/get-version` + +DLL_LIBS= # -lws2 + +GCC_VERSION= `${TARGET}-gcc --version | head -1 | awk '{print $$3;}'` + +all:: + mkdir -p ${BUILD_DIR}/${MYDIR} + ${TARGET}-dlltool --output-def ${BUILD_DIR}/${MYDIR}/${ME}.def \ + --export-all ${PREFIX}/${TARGET}/lib/${ME}.a + cd ${BUILD_DIR}/${MYDIR}; ${TARGET}-gcc --shared \ + -o ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll \ + -Wl,--out-implib,${ME}.dll.a ${BUILD_DIR}/${MYDIR}/${ME}.def \ + ${PREFIX}/${TARGET}/lib/${ME}.a ${DLL-LIBS} + -rm -f ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + ${TARGET}-strip ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped + sed \ + -e "s/^dlname=.*\$$/dlname='${ME}-${DLLVERSION}.dll'/" \ + -e "s/^library_names=.*\$$/library_names='${ME}.dll.a'/" \ + <${PREFIX}/${TARGET}/lib/${ME}.la \ + >${BUILD_DIR}/${MYDIR}/${ME}.la + +clean:: + -rm -f ${BUILD_DIR}/${MYDIR}/*.o + -rm -f ${BUILD_DIR}/${MYDIR}/${ME}* + +install:: + mkdir -p ${DLL_DIR} ${DEVICE_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll ${DEVICE_DIR} + cp ${BUILD_DIR}/${MYDIR}/${ME}-${DLLVERSION}.dll.stripped ${DEVICE_DIR} + rm -f ${DLL_DIR}/${ME}.la + cp ${BUILD_DIR}/${MYDIR}/${ME}.la ${DLL_DIR}/${ME}.la Property changes on: trunk/cegcc/src/mingwdll/libsupc++/Makefile ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-03-27 10:53:44
|
Revision: 1153 http://cegcc.svn.sourceforge.net/cegcc/?rev=1153&view=rev Author: dannybackx Date: 2008-03-27 03:53:39 -0700 (Thu, 27 Mar 2008) Log Message: ----------- Fix gcc 4.3.0 TARGET_ATTRIBUTE_TABLE bug. This gets exception handling to work again, and probably many other things. Modified Paths: -------------- trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c trunk/cegcc/src/gcc-4.3.0/gcc/target-def.h Modified: trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce 2008-03-25 13:57:00 UTC (rev 1152) +++ trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce 2008-03-27 10:53:39 UTC (rev 1153) @@ -1,3 +1,11 @@ +2008-03-27 Danny Backx <dan...@us...> + + * gcc/target-def.h: Fix new gcc 4.3.0 bug, this file needs to make + sure TARGET_ATTRIBUTE_TABLE is only defined as NULL if it isn't + already defined. + * gcc/config/arm/arm.c: Remove debug code that I accidentally + committed last week. + 2008-03-22 Danny Backx <dan...@us...> * Import gcc-4.3.0 source tree. Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c 2008-03-25 13:57:00 UTC (rev 1152) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c 2008-03-27 10:53:39 UTC (rev 1153) @@ -18803,35 +18803,6 @@ tree attr, a2; attr = DECL_ATTRIBUTES (decl); - { -// tree format_num_expr = TREE_VALUE (TREE_CHAIN (attr)); -// tree format_num_expr = TREE_VALUE (attr); -// tree format_num_expr = (attr); - -// deze doet iets zinnig : -// tree format_num_expr = TREE_VALUE(decl); -// exarg.c: In function 'handler': -// exarg.c:13: internal compiler error: tree check: expected tree_list, have function_decl in arm_pe_exception_handler, at config/arm/arm.c:15568 -// - -// a2 = lookup_attribute ("__exception_handler__", decl); -// tree format_num_expr = TREE_VALUE(a2); - -// tree format_num_expr = TREE_VALUE(TREE_CHAIN(decl)); -// tree format_num_expr = TREE_VALUE(decl); - tree format_num_expr = decl; - -#if 0 - fprintf(stderr, "Yow arm_pe_exception_handler %p\n", format_num_expr); - if (TREE_CODE(format_num_expr) == STRING_CST) { - fprintf(stderr, "arm_pe_exception_handler : string\n"); - } else if (TREE_CODE(format_num_expr) == INTEGER_CST) { - fprintf(stderr, "arm_pe_exception_handler : integer\n"); - } else { - fprintf(stderr, "arm_pe_exception_handler : unknown\n"); - } -#endif - } if (! attr) return NULL; a2 = lookup_attribute ("__exception_handler__", attr); @@ -18871,19 +18842,6 @@ in the right field as we do with the exception handler. */ tree attr = NULL_TREE; -// fprintf(stderr, "arm_pe_handle_exception_handler_attribute: arg %p no_add_attrs %d\n", -// flags, *no_add_attrs); - - tree format_num_expr = TREE_VALUE (TREE_CHAIN (args)); -#if 0 - if (TREE_CODE(format_num_expr) == STRING_CST) { - fprintf(stderr, "arm_pe_handle_exception_handler_attribute : string\n"); - } else if (TREE_CODE(format_num_expr) == INTEGER_CST) { - fprintf(stderr, "arm_pe_handle_exception_handler_attribute : integer\n"); - } else { - fprintf(stderr, "arm_pe_handle_exception_handler_attribute : unknown\n"); - } -#endif attr = tree_cons (get_identifier ("exception_handler"), args, attr); } else Modified: trunk/cegcc/src/gcc-4.3.0/gcc/target-def.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/target-def.h 2008-03-25 13:57:00 UTC (rev 1152) +++ trunk/cegcc/src/gcc-4.3.0/gcc/target-def.h 2008-03-27 10:53:39 UTC (rev 1153) @@ -391,7 +391,9 @@ /* In tree.c. */ #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes +#ifndef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE NULL +#endif /* In cse.c. */ #define TARGET_ADDRESS_COST default_address_cost This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-03-25 13:57:08
|
Revision: 1152 http://cegcc.svn.sourceforge.net/cegcc/?rev=1152&view=rev Author: dannybackx Date: 2008-03-25 06:57:00 -0700 (Tue, 25 Mar 2008) Log Message: ----------- This is a port of the cegcc svn src/gcc/libstdc++-v3 into gcc-4.3.0 . It doesn't work yet. Modified Paths: -------------- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/acinclude.m4 trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/io/basic_file_stdio.cc trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.cc trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/collate_members.cc trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/time_members.cc trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/newlib/os_defines.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config.h.in trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/configure trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/configure.host trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/crossconfig.m4 trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/Makefile.am trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/Makefile.in trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_global/cstdio trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_global/cstdlib trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_global/cstring trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_global/ctime trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_global/cwchar trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_std/cstdio trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_std/cstdlib trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_std/cstring trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_std/ctime trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/c_std/cwchar trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/ext/mt_allocator.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/ext/pool_allocator.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/ext/stdio_filebuf.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/ext/stdio_sync_filebuf.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/include/precompiled/stdc++.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/libsupc++/typeinfo trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/linkage.m4 trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/src/locale.cc trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/src/locale_init.cc trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/src/localename.cc Added Paths: ----------- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/ChangeLog.ce trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/generic/runtimeopts.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_base.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_inline.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_noninline.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/os_defines.h trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/runtimeopts.h Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/ChangeLog.ce (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/ChangeLog.ce 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,128 @@ +2008-03-25 Danny Backx <dan...@us...> + + * Port src/gcc/libstdc++v3 adaptations from cegcc svn into gcc-4.3.0 . + +2007-12-25 Pedro Alves <ped...@po...> + + * crossconfig.m4: Place *-*-mingw32* case below mingw32ce so + it isn't picked up with arm-mingw32ce. Don't use + arm-unknown-mingw32ce*, use arm*-*-mingw32ce* instead. + +2007-02-04 Pedro Alves <ped...@po...> + + * acinclude.m4 (GLIBCXX_ENABLE_C99]): Remove wcscoll and wcsxfrm. + Check for wcscoll, wcsxfrm, strcoll and strxfrm. + * configure: Regenerate. + * include/c_std/std_cwchar.h: Use _GLIBCXX_HAVE_WCSCOLL, and + _GLIBCXX_HAVE_WCSXFRM. + * config/locale/generic/collate_members.cc + (collate<char>::_M_compare): Use _GLIBCXX_HAVE_STRCOLL. + Use strcmp as alternative. + (collate<char>::_M_transform): Use _GLIBCXX_HAVE_STRXFRM. + Use strncpy as alternative. + (collate<wchar_t>::_M_compare): Use _GLIBCXX_HAVE_WCSCOLL. + Use wcscmp as alternative. + (collate<wchar_t>::_M_transform): Use _GLIBCXX_HAVE_WCSXFRM. + Use wcsncpy as alternative. + +2006-11-12 Pedro Alves <ped...@po...> + + * config/io/basic_file_stdio.cc (__gnu_internal::read, + __gnu_internal::write, __gnu_internal::lseek, + __gnu_internal::fdopen): Delete. + (__basic_file<char>::sys_open): Fix typo. + +2006-10-22 Pedro Alves <ped...@po...> + + * config/locale/generic/time_members.cc : + (__timepunct<char>::_M_put): Enable on __MINGW32CE__. + (__timepunct<char>::_M_initialize_timepunct) : Likewise. + (__timepunct<wchar_t>::_M_put) : Likewise. + (__timepunct<wchar_t>::_M_initialize_timepunct) : Likewise. + +2006-10-18 Pedro Alves <ped...@po...> + + * config/io/basic_file_stdio.cc : Include <windows.h> on mingw32ce. + (__gnu_internal::read) : New. + (__gnu_internal::write) : New. + (__gnu_internal::lseek) : New. + (__gnu_internal::fdopen) : New. + (__gnu_internal::xwrite): Revert to always using file + descriptors (handles on CE). + (__basic_file<char>::sys_open) : Enable on mingw32ce too. Don't + special case __fd == 0. + (__basic_file<char>::fd) : Enable on mingw32ce too. + (__basic_file<char>::xsgetn) : Use file descriptors on mingw32ce too. + (__basic_file<char>::xsputn) : Likewise. + (__basic_file<char>::xsputn_2) : Likewise. + (__basic_file<char>::seekoff) : Likewise, using __gnu_internal::lseek. + (__basic_file<char>::showmanyc) : Implement for mingw32ce using Win32 api. + +2006-10-17 Pedro Alves <ped...@po...> + + * crossconfig.m4 (cegcc*, mingw32*): Add fnctl.h to AC_CHECK_HEADERS. + * configure : Regenerate. + * config.h.in : Regenerate. + * config/io/basic_file_stdio.cc : Wrap fnctl.h inclusion + on _GLIBCXX_HAVE_FCNTL_H. + +2006-10-16 Pedro Alves <ped...@po...> + + * include/ext/pool_allocator.h : Include runtimeopts.h. + (allocate) : Use runtimeopts::force_new_p. + * include/ext/stdio_filebuf.h (stdio_filebuf) : Don't build + fildes constructor version on mingw32ce. + (fd) : Don't build on mingw32ce. + * include/ext/stdio_sync_filebuf.h : Wrap unistd.h inclusion + on _GLIBCXX_HAVE_UNISTD_H. + * include/ext/mt_allocator.h : Include runtimeopts.h. + (_Tune) : Use runtimeopts::force_new_p. + (_S_tune) : Likewise. + * include/Makefile.am (host_headers) : Add runtimeopts.h + * include/Makefile.in : Regenerate. + * include/stdc++.h : Include <bits/c++config.h>. + Wrap errno.h inclusion with _GLIBCXX_HAVE_ERRNO_H. + Wrap clocale.h inclusion with _GLIBCXX_HAVE_LOCALE_H. + Wrap csignal.h inclusion with _GLIBCXX_HAVE_SIGNAL_H. + * include/c_std/std_cstdlib.h (bsearch, calloc, getenv, + mblen, mbstowcs, mbtowc, system, freopen, perror, + remove, rename, rewind, setbuf, tmpfile, tmpnam, + clock, mktime, time, asctime, ctime, gmtime, + localtime, strftime) : These function on exist on coredll. Wrap with + ifndef __MINGW32CE__. + * include/c_std/std_cstring.h (strcoll, strxfrm, strerror): Likewise. + * src/localename.cc : Wrap clocale.h inclusion with + _GLIBCXX_HAVE_LOCALE_H. + (locale) : No locale support on coredll, Always use _S_classic. + * src/locale_init.cc : Wrap clocale.h inclusion with + _GLIBCXX_HAVE_LOCALE_H. + (global) : No setlocale on coredll. Wrap with ifndef __MINGW32CE__. + * src/locale.cc : Wrap clocale.h inclusion with + _GLIBCXX_HAVE_LOCALE_H. + (_S_normalize_category) : Always return __cat on mingw32ce. + * crossconfig.m4 (cegcc): Add errno.h, signal.h and unistd.h + to AC_CHECK_HEADERS. Call GLIBCXX_CHECK_STDLIB_SUPPORT. + * config/locale/generic/collate_members.cc (_M_compare) : + No strcoll on coredll. Call strcmp instead. + (_M_transform) : No strxfrm on coredll. Call strncpy + strlen instead. + * config/locale/generic/c_locale.cc: Include <bits/c++config.h>. + Wrap errno.h inclusion with _GLIBCXX_HAVE_ERRNO_H. + Provice a default ERANGE for mingw32ce. + (__convert_to_v) Adapt to lack of errno and setlocale. + * config/locale/generic/c_locale.h : + Wrap clocale.h inclusion with _GLIBCXX_HAVE_LOCALE_H. + (__convert_from_v) : Don't handle locale on mingw32ce. + * config/locale/generic/time_members.cc (_M_put) : Don't build on + mingw32ce. + * config/io/basic_file_stdio.cc : + Wrap errno.h inclusion with _GLIBCXX_HAVE_ERRNO_H. + Use FILE* instead of file descriptors on mingw32ce throughout. + Adapt to lack of errno. + * configure: Regenerate. + * config.h.in : Regenerate. + +2006-10-10 Pedro Alves <ped...@po...> + + * config/os/generic/runtimeopts.h : New file. + * configure: Regenerate with autoconf 2.59. + * ChangeLog.ce : New file. Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/acinclude.m4 =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/acinclude.m4 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/acinclude.m4 2008-03-25 13:57:00 UTC (rev 1152) @@ -959,6 +959,23 @@ namespace test { using ::wcstof; } ], [], [AC_DEFINE(HAVE_WCSTOF,1,[Defined if wcstof exists.])],[]) + AC_TRY_COMPILE([#include <wchar.h> + namespace test { using ::wcscoll; } ], [], + [AC_DEFINE(HAVE_WCSCOLL,1,[Defined if wcscoll exists.])],[]) + + AC_TRY_COMPILE([#include <wchar.h> + namespace test { using ::wcsxfrm; } ], [], + [AC_DEFINE(HAVE_WCSXFRM,1,[Defined if wcsxfrm exists.])],[]) + + # The next two checks should probably be moved somewhere else. + AC_TRY_COMPILE([#include <string.h> + namespace test { using ::strcoll; } ], [], + [AC_DEFINE(HAVE_STRCOLL,1,[Defined if strcoll exists.])],[]) + + AC_TRY_COMPILE([#include <string.h> + namespace test { using ::strxfrm; } ], [], + [AC_DEFINE(HAVE_STRXFRM,1,[Defined if strxfrm exists.])],[]) + AC_TRY_COMPILE([#include <wctype.h>], [ wint_t t; int i = iswblank(t);], [AC_DEFINE(HAVE_ISWBLANK,1, @@ -1944,7 +1961,6 @@ using ::wcscat; using ::wcschr; using ::wcscmp; - using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; @@ -1961,7 +1977,6 @@ using ::wcstok; using ::wcstol; using ::wcstoul; - using ::wcsxfrm; using ::wctob; using ::wmemchr; using ::wmemcmp; Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/io/basic_file_stdio.cc =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/io/basic_file_stdio.cc 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/io/basic_file_stdio.cc 2008-03-25 13:57:00 UTC (rev 1152) @@ -33,9 +33,12 @@ // #include <bits/basic_file.h> +#ifdef _GLIBCXX_HAVE_FNCTL_H #include <fcntl.h> +#endif +#ifdef _GLIBCXX_HAVE_ERRNO_H #include <errno.h> - +#endif #ifdef _GLIBCXX_HAVE_POLL #include <poll.h> #endif @@ -71,6 +74,10 @@ #include <limits> // For <off_t>::max() and min() and <streamsize>::max() +#ifdef __MINGW32CE__ +#include <windows.h> +#endif + namespace { // Map ios_base::openmode flags to a string for use in fopen(). @@ -124,8 +131,10 @@ for (;;) { const std::streamsize __ret = write(__fd, __s, __nleft); +#ifndef __MINGW32CE__ if (__ret == -1L && errno == EINTR) continue; +#endif if (__ret == -1L) break; @@ -158,8 +167,10 @@ __iov[0].iov_len = __n1_left; const std::streamsize __ret = writev(__fd, __iov, 2); +#ifndef __MINGW32CE__ if (__ret == -1L && errno == EINTR) continue; +#endif if (__ret == -1L) break; @@ -183,6 +194,9 @@ #endif } // anonymous namespace +#ifdef __MINGW32CE__ +using namespace __gnu_internal; +#endif _GLIBCXX_BEGIN_NAMESPACE(std) @@ -200,10 +214,14 @@ if (!this->is_open() && __file) { int __err; +#ifndef __MINGW32CE__ errno = 0; do __err = this->sync(); while (__err && errno == EINTR); +#else + __err = this->sync(); +#endif if (!__err) { _M_cfile = __file; @@ -221,10 +239,14 @@ const char* __c_mode = fopen_mode(__mode); if (__c_mode && !this->is_open() && (_M_cfile = fdopen(__fd, __c_mode))) { + _M_cfile_created = true; +#ifndef __MINGW32CE__ char* __buf = NULL; - _M_cfile_created = true; + /* Fildes on WinCE are handles, and HANDLE == 0 is not stdin. */ if (__fd == 0) setvbuf(_M_cfile, __buf, _IONBF, 0); +#endif + __ret = this; } return __ret; @@ -257,7 +279,11 @@ int __basic_file<char>::fd() +#ifdef __MINGW32CE__ + { return (int)fileno(_M_cfile); } +#else { return fileno(_M_cfile); } +#endif __c_file* __basic_file<char>::file() @@ -276,10 +302,14 @@ // for error first. However, C89/C99 (at variance with IEEE // 1003.1, f.i.) do not mandate that fclose must set errno // upon error. +#ifndef __MINGW32CE__ errno = 0; do __err = fclose(_M_cfile); while (__err && errno == EINTR); +#else + __err = fclose(_M_cfile); +#endif } _M_cfile = 0; if (!__err) @@ -294,7 +324,11 @@ streamsize __ret; do __ret = read(this->fd(), __s, __n); +#ifndef __MINGW32CE__ while (__ret == -1L && errno == EINTR); +#else + while (0); +#endif return __ret; } @@ -339,6 +373,11 @@ streamsize __basic_file<char>::showmanyc() { +#ifdef __MINGW32CE__ + BY_HANDLE_FILE_INFORMATION finfo; + if (GetFileInformationByHandle((HANDLE)this->fd(), &finfo)) + return finfo.nFileSizeLow - SetFilePointer((HANDLE)this->fd(), 0, NULL, FILE_CURRENT); +#else #ifdef FIONREAD // Pipes and sockets. #ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T @@ -378,6 +417,7 @@ return __buffer.st_size - lseek(this->fd(), 0, ios_base::cur); #endif #endif +#endif /* __MINGW32CE__ */ return 0; } Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.cc =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.cc 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.cc 2008-03-25 13:57:00 UTC (rev 1152) @@ -34,7 +34,20 @@ // Written by Benjamin Kosnik <bk...@re...> +#include <bits/c++config.h> + +#ifdef _GLIBCXX_HAVE_ERRNO_H #include <cerrno> // For errno +#endif + +#ifdef __MINGW32CE__ +/* Provide a fake ERANGE to keep the + sources as clean as possible. */ +# ifndef ERANGE +# define ERANGE 1 +# endif +#endif + #include <cmath> // For isinf, finite, finitef, fabs #include <cstdlib> // For strof, strtold #include <cstring> @@ -105,12 +118,17 @@ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, const __c_locale&) { +#ifdef __MINGW32CE__ + int errno; +#endif // Assumes __s formatted for "C" locale. +#ifndef __MINGW32CE__ char* __old = setlocale(LC_ALL, NULL); const size_t __len = strlen(__old) + 1; char* __sav = new char[__len]; memcpy(__sav, __old, __len); setlocale(LC_ALL, "C"); +#endif char* __sanity; #if !__DBL_HAS_INFINITY__ @@ -129,8 +147,10 @@ else __err |= ios_base::failbit; +#ifndef __MINGW32CE__ setlocale(LC_ALL, __sav); delete [] __sav; +#endif } template<> @@ -138,12 +158,18 @@ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, const __c_locale&) { +#ifdef __MINGW32CE__ + int errno; +#endif // Assumes __s formatted for "C" locale. + errno = 0; +#ifndef __MINGW32CE__ char* __old = setlocale(LC_ALL, NULL); const size_t __len = strlen(__old) + 1; char* __sav = new char[__len]; memcpy(__sav, __old, __len); setlocale(LC_ALL, "C"); +#endif #if !__LDBL_HAS_INFINITY__ errno = 0; @@ -178,8 +204,10 @@ else __err |= ios_base::failbit; +#ifndef __MINGW32CE__ setlocale(LC_ALL, __sav); delete [] __sav; +#endif } void Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.h 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/c_locale.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -44,7 +44,9 @@ #pragma GCC system_header +#ifdef _GLIBCXX_HAVE_LOCALE_H #include <clocale> +#endif #include <cstddef> #define _GLIBCXX_NUM_CATEGORIES 0 @@ -62,6 +64,7 @@ const int __size __attribute__((__unused__)), const char* __fmt, ...) { +#ifndef __MINGW32CE__ char* __old = std::setlocale(LC_NUMERIC, NULL); char* __sav = NULL; if (__builtin_strcmp(__old, "C")) @@ -71,6 +74,7 @@ __builtin_memcpy(__sav, __old, __len); std::setlocale(LC_NUMERIC, "C"); } +#endif __builtin_va_list __args; __builtin_va_start(__args, __fmt); @@ -83,11 +87,13 @@ __builtin_va_end(__args); +#ifndef __MINGW32CE__ if (__sav) { std::setlocale(LC_NUMERIC, __sav); delete [] __sav; } +#endif return __ret; } Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/collate_members.cc =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/collate_members.cc 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/collate_members.cc 2008-03-25 13:57:00 UTC (rev 1152) @@ -45,7 +45,11 @@ int collate<char>::_M_compare(const char* __one, const char* __two) const { +#if _GLIBCXX_HAVE_STRCOLL int __cmp = strcoll(__one, __two); +#else + int __cmp = strcmp(__one, __two); +#endif return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); } @@ -53,7 +57,17 @@ size_t collate<char>::_M_transform(char* __to, const char* __from, size_t __n) const - { return strxfrm(__to, __from, __n); } + { +#if _GLIBCXX_HAVE_STRXFRM + return strxfrm(__to, __from, __n); +#else + if (__n == 0) + return strlen (__from); + strncpy(__to, __from, __n - 1); + __to[__n - 1] = '\0'; + return strlen (__to); +#endif + } #ifdef _GLIBCXX_USE_WCHAR_T template<> @@ -61,7 +75,11 @@ collate<wchar_t>::_M_compare(const wchar_t* __one, const wchar_t* __two) const { +#if _GLIBCXX_HAVE_WCSCOLL int __cmp = wcscoll(__one, __two); +#else + int __cmp = wcscmp(__one, __two); +#endif return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); } @@ -69,7 +87,17 @@ size_t collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, size_t __n) const - { return wcsxfrm(__to, __from, __n); } + { +#if _GLIBCXX_HAVE_WCSXFRM + return wcsxfrm(__to, __from, __n); +#else + if (__n == 0) + return wcslen (__from); + wcsncpy(__to, __from, __n - 1); + __to[__n - 1] = L'\0'; + return wcslen (__to); #endif + } +#endif _GLIBCXX_END_NAMESPACE Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/time_members.cc =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/time_members.cc 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/locale/generic/time_members.cc 2008-03-25 13:57:00 UTC (rev 1152) @@ -47,14 +47,18 @@ _M_put(char* __s, size_t __maxlen, const char* __format, const tm* __tm) const { +#ifndef __MINGW32CE__ char* __old = setlocale(LC_ALL, NULL); const size_t __llen = strlen(__old) + 1; char* __sav = new char[__llen]; memcpy(__sav, __old, __llen); setlocale(LC_ALL, _M_name_timepunct); +#endif const size_t __len = strftime(__s, __maxlen, __format, __tm); +#ifndef __MINGW32CE__ setlocale(LC_ALL, __sav); delete [] __sav; +#endif // Make sure __s is null terminated. if (__len == 0) __s[0] = '\0'; @@ -132,14 +136,18 @@ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, const tm* __tm) const { +#ifndef __MINGW32CE__ char* __old = setlocale(LC_ALL, NULL); const size_t __llen = strlen(__old) + 1; char* __sav = new char[__llen]; memcpy(__sav, __old, __llen); setlocale(LC_ALL, _M_name_timepunct); +#endif const size_t __len = wcsftime(__s, __maxlen, __format, __tm); +#ifndef __MINGW32CE__ setlocale(LC_ALL, __sav); delete [] __sav; +#endif // Make sure __s is null terminated. if (__len == 0) __s[0] = L'\0'; Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/generic/runtimeopts.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/generic/runtimeopts.h (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/generic/runtimeopts.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,45 @@ +// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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. + + +#ifndef _GLIBCXX_RUNTIMEOPTS_H +#define _GLIBCXX_RUNTIMEOPTS_H 1 + +#pragma GCC system_header + +namespace __gnu_cxx +{ + namespace runtime_opts + { + inline bool force_new_p() + { + return getenv ("GLIBCXX_FORCE_NEW") != 0; + } + } // namespace runtime_opts +} // namespace __gnu_cxx + +#endif Property changes on: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/generic/runtimeopts.h ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_base.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_base.h (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_base.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,58 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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.1 Locales +// + +// Default information, may not be appropriate for specific host. + + struct ctype_base + { + // Non-standard typedefs. + typedef const int* __to_type; + + // NB: Offsets into ctype<char>::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. + typedef unsigned int mask; + static const mask upper = 1 << 0; + static const mask lower = 1 << 1; + static const mask alpha = 1 << 2; + static const mask digit = 1 << 3; + static const mask xdigit = 1 << 4; + static const mask space = 1 << 5; + static const mask print = 1 << 6; + static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct + static const mask cntrl = 1 << 8; + static const mask punct = 1 << 9; + static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit + }; + + + Property changes on: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_base.h ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_inline.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_inline.h (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_inline.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,161 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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.1 Locales +// + +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) +// functions go in ctype.cc + +// The following definitions are portable, but insanely slow. If one +// cares at all about performance, then specialized ctype +// functionality should be added for the native os in question: see +// the config/os/bits/ctype_*.h files. + +// Constructing a synthetic "C" table should be seriously considered... + + bool + ctype<char>:: + is(mask __m, char __c) const + { + if (_M_table) + return _M_table[static_cast<unsigned char>(__c)] & __m; + else + { + bool __ret = false; + const size_t __bitmasksize = 15; + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0 + for (; __bitcur <= __bitmasksize; ++__bitcur) + { + const mask __bit = static_cast<mask>(1 << __bitcur); + if (__m & __bit) + { + bool __testis; + switch (__bit) + { + case space: + __testis = isspace(__c); + break; + case print: + __testis = isprint(__c); + break; + case cntrl: + __testis = iscntrl(__c); + break; + case upper: + __testis = isupper(__c); + break; + case lower: + __testis = islower(__c); + break; + case alpha: + __testis = isalpha(__c); + break; + case digit: + __testis = isdigit(__c); + break; + case punct: + __testis = ispunct(__c); + break; + case xdigit: + __testis = isxdigit(__c); + break; + case alnum: + __testis = isalnum(__c); + break; + case graph: + __testis = isgraph(__c); + break; + default: + __testis = false; + break; + } + __ret |= __testis; + } + } + return __ret; + } + } + + const char* + ctype<char>:: + is(const char* __low, const char* __high, mask* __vec) const + { + if (_M_table) + while (__low < __high) + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; + else + { + // Highest bitmask in ctype_base == 10. + const size_t __bitmasksize = 15; + for (;__low < __high; ++__vec, ++__low) + { + mask __m = 0; + // Lowest bitmask in ctype_base == 0 + size_t __i = 0; + for (;__i <= __bitmasksize; ++__i) + { + const mask __bit = static_cast<mask>(1 << __i); + if (this->is(__bit, *__low)) + __m |= __bit; + } + *__vec = __m; + } + } + return __high; + } + + const char* + ctype<char>:: + scan_is(mask __m, const char* __low, const char* __high) const + { + if (_M_table) + while (__low < __high + && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) + ++__low; + else + while (__low < __high && !this->is(__m, *__low)) + ++__low; + return __low; + } + + const char* + ctype<char>:: + scan_not(mask __m, const char* __low, const char* __high) const + { + if (_M_table) + while (__low < __high + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) + ++__low; + else + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; + return __low; + } Property changes on: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_inline.h ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_noninline.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_noninline.h (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_noninline.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,92 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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.1 Locales +// + +// Information as gleaned from /usr/include/ctype.h + + const ctype_base::mask* + ctype<char>::classic_table() throw() + { return 0; } + + ctype<char>::ctype(__c_locale, const mask* __table, bool __del, + size_t __refs) + : facet(__refs), _M_del(__table != 0 && __del), + _M_toupper(NULL), _M_tolower(NULL), + _M_table(__table ? __table : classic_table()) + { + memset(_M_widen, 0, sizeof(_M_widen)); + _M_widen_ok = 0; + memset(_M_narrow, 0, sizeof(_M_narrow)); + _M_narrow_ok = 0; + } + + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) + : facet(__refs), _M_del(__table != 0 && __del), + _M_toupper(NULL), _M_tolower(NULL), + _M_table(__table ? __table : classic_table()) + { + memset(_M_widen, 0, sizeof(_M_widen)); + _M_widen_ok = 0; + memset(_M_narrow, 0, sizeof(_M_narrow)); + _M_narrow_ok = 0; + } + + char + ctype<char>::do_toupper(char __c) const + { return ::toupper((int) __c); } + + const char* + ctype<char>::do_toupper(char* __low, const char* __high) const + { + while (__low < __high) + { + *__low = ::toupper((int) *__low); + ++__low; + } + return __high; + } + + char + ctype<char>::do_tolower(char __c) const + { return ::tolower((int) __c); } + + const char* + ctype<char>::do_tolower(char* __low, const char* __high) const + { + while (__low < __high) + { + *__low = ::tolower((int) *__low); + ++__low; + } + return __high; + } Property changes on: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/ctype_noninline.h ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/os_defines.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/os_defines.h (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/os_defines.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,51 @@ +// Specific definitions for generic platforms -*- C++ -*- + +// Copyright (C) 2000, 2001, 2002, 2003, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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. + + +#ifndef _GLIBCXX_OS_DEFINES +# define _GLIBCXX_OS_DEFINES + +// System-specific #define, typedefs, corrections, etc, go here. This +// file will come before all others. + +// Define as 0, if you want, to enable inlining of gthread functions. +// By default, don't pollute libstdc++ with win32api names. +#if !defined (__GTHREAD_HIDE_WIN32API) +# define __GTHREAD_HIDE_WIN32API 1 +#endif + +// Don't let win32api windef.h define min and max as macros +// if included after stl_algobase.h. +#undef NOMINMAX +#define NOMINMAX 1 + +// See libstdc++/20806. +#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1 + +#endif Property changes on: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/os_defines.h ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/runtimeopts.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/runtimeopts.h (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/runtimeopts.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -0,0 +1,46 @@ +// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// 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. + + +#ifndef _GLIBCXX_RUNTIMEOPTS_H +#define _GLIBCXX_RUNTIMEOPTS_H 1 + +#pragma GCC system_header + +namespace __gnu_cxx +{ + namespace runtime_opts + { + inline bool force_new_p() + { + // Perhaps read key from registry. + return 0; + } + } // namespace runtime_opts +} // namespace __gnu_cxx + +#endif Property changes on: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/mingw32ce/runtimeopts.h ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/newlib/os_defines.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/newlib/os_defines.h 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config/os/newlib/os_defines.h 2008-03-25 13:57:00 UTC (rev 1152) @@ -38,7 +38,7 @@ // System-specific #define, typedefs, corrections, etc, go here. This // file will come before all others. -#ifdef __CYGWIN__ +#if defined __CYGWIN__ || defined UNDER_CE #define _GLIBCXX_GTHREAD_USE_WEAK 0 // See libstdc++/20806. Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config.h.in =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config.h.in 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/config.h.in 2008-03-25 13:57:00 UTC (rev 1152) @@ -63,6 +63,9 @@ /* Define to 1 if you have the <endian.h> header file. */ #undef HAVE_ENDIAN_H +/* Define to 1 if you have the <errno.h> header file. */ +#undef HAVE_ERRNO_H + /* Define to 1 if you have the `expf' function. */ #undef HAVE_EXPF @@ -75,6 +78,9 @@ /* Define to 1 if you have the `fabsl' function. */ #undef HAVE_FABSL +/* Define to 1 if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + /* Define to 1 if you have the <fenv.h> header file. */ #undef HAVE_FENV_H @@ -120,6 +126,9 @@ /* Define to 1 if you have the <gconv.h> header file. */ #undef HAVE_GCONV_H +/* Define to 1 if you have the `getenv' function. */ +#undef HAVE_GETENV + /* Define if _Unwind_GetIPInfo is available. */ #undef HAVE_GETIPINFO @@ -262,6 +271,9 @@ /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV +/* Define to 1 if you have the <signal.h> header file. */ +#undef HAVE_SIGNAL_H + /* Define if sigsetjmp is available. */ #undef HAVE_SIGSETJMP @@ -301,6 +313,9 @@ /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H +/* Defined if strcoll exists. */ +#undef HAVE_STRCOLL + /* Define if strerror_l is available in <string.h>. */ #undef HAVE_STRERROR_L @@ -319,6 +334,9 @@ /* Define to 1 if you have the `strtold' function. */ #undef HAVE_STRTOLD +/* Defined if strxfrm exists. */ +#undef HAVE_STRXFRM + /* Define if strxfrm_l is available in <string.h>. */ #undef HAVE_STRXFRM_L @@ -397,9 +415,15 @@ /* Define to 1 if you have the <wchar.h> header file. */ #undef HAVE_WCHAR_H +/* Defined if wcscoll exists. */ +#undef HAVE_WCSCOLL + /* Defined if wcstof exists. */ #undef HAVE_WCSTOF +/* Defined if wcsxfrm exists. */ +#undef HAVE_WCSXFRM + /* Define to 1 if you have the <wctype.h> header file. */ #undef HAVE_WCTYPE_H @@ -923,6 +947,11 @@ # define frexpl _frexpl #endif +#if defined (HAVE__GETENV) && ! defined (HAVE_GETENV) +# define HAVE_GETENV 1 +# define getenv _getenv +#endif + #if defined (HAVE__HYPOT) && ! defined (HAVE_HYPOT) # define HAVE_HYPOT 1 # define hypot _hypot Modified: trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/configure =================================================================== --- trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/configure 2008-03-22 14:36:11 UTC (rev 1151) +++ trunk/cegcc/src/gcc-4.3.0/libstdc++-v3/configure 2008-03-25 13:57:00 UTC (rev 1152) @@ -15318,7 +15318,6 @@ using ::wcscat; using ::wcschr; using ::wcscmp; - using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; @@ -15335,7 +15334,6 @@ using ::wcstok; using ::wcstol; using ::wcstoul; - using ::wcsxfrm; using ::wctob; using ::wmemchr; using ::wmemcmp; @@ -16736,6 +16734,207 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include <wchar.h> + namespace test { using ::wcscoll; } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCSCOLL 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <wchar.h> + namespace test { using ::wcsxfrm; } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCSXFRM 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + # The next two checks should probably be moved somewhere else. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + namespace test { using ::strcoll; } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRCOLL 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + namespace test { using ::strxfrm; } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRXFRM 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <wctype.h> int main () @@ -17014,7 +17213,7 @@ # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 17017 "configure" +#line 17216 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -37990,6 +38189,375 @@ + echo "$as_me:$LINENO: checking for getenv declaration" >&5 +echo $ECHO_N "checking for getenv declaration... $ECHO_C" >&6 + if test x${glibcxx_cv_func_getenv_use+set} != xset; then + if test "${glibcxx_cv_func_getenv_use+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ + getenv(0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + glibcxx_cv_func_getenv_use=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +glibcxx_cv_func_getenv_use=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + echo "$as_me:$LINENO: result: $glibcxx_cv_func_getenv_use" >&5 +echo "${ECHO_T}$glibcxx_cv_func_getenv_use" >&6 + if test x$glibcxx_cv_func_getenv_use = x"yes"; then + +for ac_func in getenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + + + + + + echo "$as_me:$LINENO: checking for setenv declaration" >&5 +echo $ECHO_N "checking for setenv declaration... $ECHO_C" >&6 + if test x${glibcxx_cv_func_setenv_use+set} != xset; then + if test "${glibcxx_cv_func_setenv_use+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ + setenv(0, 0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + glibcxx_cv_func_setenv_use=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +glibcxx_cv_func_setenv_use=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + echo "$as_me:$LINENO: result: $glibcxx_cv_func_setenv_use" >&5 +echo "${ECHO_T}$glibcxx_cv_func_setenv_use" >&6 + if test x$glibcxx_cv_func_setenv_use = x"yes"; then + +for ac_func in setenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + + CXXFLAGS="$ac_save_CXXFLAGS" @@ -62715,6 +63283,375 @@ + echo "$as_me:$LINENO: checking for getenv declaration" >&5 +echo $ECHO_N "checking for getenv declaration... $ECHO_C" >&6 + if test x${glibcxx_cv_func_getenv_use+set} != xset; then + if test "${glibcxx_cv_func_getenv_use+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ + getenv(0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile... [truncated message content] |
From: <dan...@us...> - 2008-03-22 14:36:14
|
Revision: 1151 http://cegcc.svn.sourceforge.net/cegcc/?rev=1151&view=rev Author: dannybackx Date: 2008-03-22 07:36:11 -0700 (Sat, 22 Mar 2008) Log Message: ----------- Remove binutils-2.18 Removed Paths: ------------- trunk/cegcc/src/binutils-2.18/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-03-22 14:29:42
|
Revision: 1150 http://cegcc.svn.sourceforge.net/cegcc/?rev=1150&view=rev Author: dannybackx Date: 2008-03-22 07:29:39 -0700 (Sat, 22 Mar 2008) Log Message: ----------- Import gcc-4.3.0 (already done, I blocked the really big SVN commit messages). Merge stuff from our older gcc tree. Right now this appears to work for C, but not yet for C++. Modified Paths: -------------- trunk/cegcc/src/gcc-4.3.0/config.sub trunk/cegcc/src/gcc-4.3.0/configure trunk/cegcc/src/gcc-4.3.0/configure.ac trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm-protos.h trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.h trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.opt trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-df.S trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-sf.S trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/lib1funcs.asm trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/pe.c trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/pe.h trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/pe.opt trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/t-pe trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/t-wince-pe trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/wince-pe.h trunk/cegcc/src/gcc-4.3.0/gcc/config.gcc trunk/cegcc/src/gcc-4.3.0/gcc/config.in trunk/cegcc/src/gcc-4.3.0/gcc/gthr-win32.h trunk/cegcc/src/gcc-4.3.0/libgcc/config.host Added Paths: ----------- trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc.opt trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc1.c trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cygming.opt trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/gthr-win32.c trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/mingw32.h trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/pe-cxx.c trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/pe-stubs.c trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/t-cygming trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/t-gthr-win32 trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/t-mingw32 trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/t-wince-cegcc trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/wince-cegcc.h trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/xm-mingw32.h Added: trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/ChangeLog.ce 2008-03-22 14:29:39 UTC (rev 1150) @@ -0,0 +1,23 @@ +2008-03-22 Danny Backx <dan...@us...> + + * Import gcc-4.3.0 source tree. + * ChangeLog.ce: Add. + * configure.ac, gcc/config.gcc, libgcc/config.host, gcc/config.in, + config.sub: Merge configuration for cegcc/mingw32ce into gcc-4.3.0 + source tree. + * gcc/config/arm/cygming.opt, gcc/config/arm/mingw32.h, + gcc/config/arm/t-mingw32, gcc/config/arm/pe-cxx.c, + gcc/config/arm/t-wince-cegcc, gcc/config/arm/pe-stubs.c, + gcc/config/arm/cegcc1.c, gcc/config/arm/t-cygming, + gcc/config/arm/xm-mingw32.h, gcc/config/arm/t-gthr-win32, + gcc/config/arm/gthr-win32.c, gcc/config/arm/wince-cegcc.h, + gcc/config/arm/cegcc.opt: Copy from older cegcc tree into gcc-4.3.0. + * gcc/config/arm/ieee754-sf.S, gcc/config/arm/pe.c, + gcc/config/arm/ieee754-df.S, gcc/config/arm/t-pe, + gcc/config/arm/pe.h, gcc/config/arm/arm-protos.h, + gcc/config/arm/arm.h, gcc/config/arm/arm.opt, + gcc/config/arm/arm.c, gcc/config/arm/wince-pe.h, + gcc/config/arm/t-wince-pe, gcc/config/arm/pe.opt, + gcc/config/arm/lib1funcs.asm, gcc/gthr-win32.h: Merge gcc-4.3.0 and + our older cegcc tree. + * gcc/configure: Regenerate. Modified: trunk/cegcc/src/gcc-4.3.0/config.sub =================================================================== --- trunk/cegcc/src/gcc-4.3.0/config.sub 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/config.sub 2008-03-22 14:29:39 UTC (rev 1150) @@ -703,6 +703,10 @@ basic_machine=i386-pc os=-mingw32 ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce @@ -1249,7 +1253,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* | -cegcc* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ Modified: trunk/cegcc/src/gcc-4.3.0/configure =================================================================== --- trunk/cegcc/src/gcc-4.3.0/configure 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/configure 2008-03-22 14:29:39 UTC (rev 1150) @@ -2220,15 +2220,15 @@ sh-*-linux*) noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) + sh*-*-pe|mips*-*-pe|*arm-wince-pe|*arm*-*-mingw*ce|*arm*-*-cegcc*) noconfigdirs="$noconfigdirs ${libgcj}" noconfigdirs="$noconfigdirs target-examples" noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr" noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" noconfigdirs="$noconfigdirs expect dejagnu" # the C++ libraries don't build on top of CE's C libraries - noconfigdirs="$noconfigdirs target-libstdc++-v3" - noconfigdirs="$noconfigdirs target-newlib" + # noconfigdirs="$noconfigdirs target-libstdc++-v3" + # noconfigdirs="$noconfigdirs target-newlib" case "${host}" in *-*-cygwin*) ;; # keep gdb and readline *) noconfigdirs="$noconfigdirs gdb readline" Modified: trunk/cegcc/src/gcc-4.3.0/configure.ac =================================================================== --- trunk/cegcc/src/gcc-4.3.0/configure.ac 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/configure.ac 2008-03-22 14:29:39 UTC (rev 1150) @@ -497,15 +497,15 @@ sh-*-linux*) noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) + sh*-*-pe|mips*-*-pe|*arm-wince-pe|*arm*-*-mingw*ce|*arm*-*-cegcc*) noconfigdirs="$noconfigdirs ${libgcj}" noconfigdirs="$noconfigdirs target-examples" noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr" noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" noconfigdirs="$noconfigdirs expect dejagnu" # the C++ libraries don't build on top of CE's C libraries - noconfigdirs="$noconfigdirs target-libstdc++-v3" - noconfigdirs="$noconfigdirs target-newlib" + # noconfigdirs="$noconfigdirs target-libstdc++-v3" + # noconfigdirs="$noconfigdirs target-newlib" case "${host}" in *-*-cygwin*) ;; # keep gdb and readline *) noconfigdirs="$noconfigdirs gdb readline" Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm-protos.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm-protos.h 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm-protos.h 2008-03-22 14:29:39 UTC (rev 1150) @@ -1,4 +1,5 @@ -/* Prototypes for exported functions defined in arm.c and pe.c +/* Prototypes for exported functions defined in arm.c, pe.c, + pe-cxx.c and pe-stubs.c. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rea...@ar...) @@ -40,8 +41,11 @@ unsigned int); extern unsigned int arm_dbx_register_number (unsigned int); extern void arm_output_fn_unwind (FILE *, bool); - +extern void arm_file_end (void); +int arm_major_arch (void); +bool arm_thumb_arch_p (void); + #ifdef TREE_CODE extern int arm_return_in_memory (const_tree); #endif @@ -191,9 +195,27 @@ #endif /* Defined in pe.c. */ -extern int arm_dllexport_name_p (const char *); -extern int arm_dllimport_name_p (const char *); +extern void arm_pe_asm_named_section (const char *, unsigned int, tree); +extern unsigned int arm_pe_section_type_flags (tree, const char *, int); +// extern const char *arm_pe_strip_name_encoding (const char *); +// extern void arm_pe_output_labelref (FILE *, const char *); +extern int arm_pe_dllexport_name_p (const char *); +extern int arm_pe_dllimport_name_p (const char *); +extern void arm_pe_record_external_function (tree, const char *); +extern void arm_pe_declare_function_type (FILE *, const char *, int); +extern void arm_pe_record_exported_symbol (const char *, int); +extern void arm_pe_file_end (void); +extern int arm_pe_dllexport_name_p (const char *); +extern int arm_pe_dllimport_name_p (const char *); +extern bool arm_pe_valid_dllimport_attribute_p (tree); +extern tree arm_pe_handle_selectany_attribute (tree *, tree, tree, int, bool *); +extern tree arm_pe_handle_shared_attribute (tree *, tree, tree, int, bool *); +/* In pe-cxx.c and pe-stubs.c */ +extern void arm_pe_adjust_class_at_definition (tree); +extern bool arm_pe_type_dllimport_p (tree); +extern bool arm_pe_type_dllexport_p (tree); + #ifdef TREE_CODE extern void arm_pe_unique_section (tree, int); extern void arm_pe_encode_section_info (tree, rtx, int); @@ -207,6 +229,14 @@ extern void arm_pr_no_long_calls (struct cpp_reader *); extern void arm_pr_long_calls_off (struct cpp_reader *); +tree arm_pe_handle_exception_handler_attribute (tree *node, + tree name, + tree args, + int ARG_UNUSED (flags), + bool *no_add_attrs); +const char * +arm_pe_exception_handler (FILE *fp, char *name, tree decl); + extern void arm_lang_object_attributes_init(void); extern const char *arm_mangle_type (const_tree); Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.c 2008-03-22 14:29:39 UTC (rev 1150) @@ -155,7 +155,6 @@ static void arm_encode_section_info (tree, rtx, int); #endif -static void arm_file_end (void); static void arm_file_start (void); static void arm_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, @@ -189,6 +188,8 @@ static bool arm_cannot_copy_insn_p (rtx); static bool arm_tls_symbol_p (rtx x); static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; +static tree arm_handle_struct_attribute (tree *, tree, tree, int, bool *); +static bool arm_ms_bitfield_layout_p (tree record_type); /* Initialize the GCC target structure. */ @@ -197,19 +198,25 @@ #define TARGET_MERGE_DECL_ATTRIBUTES merge_dllimport_decl_attributes #endif -#undef TARGET_ATTRIBUTE_TABLE -#define TARGET_ATTRIBUTE_TABLE arm_attribute_table - #undef TARGET_ASM_FILE_START #define TARGET_ASM_FILE_START arm_file_start -#undef TARGET_ASM_FILE_END -#define TARGET_ASM_FILE_END arm_file_end #undef TARGET_ASM_ALIGNED_SI_OP #define TARGET_ASM_ALIGNED_SI_OP NULL #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER arm_assemble_integer +#ifdef ARM_PE +#undef TARGET_ASM_UNALIGNED_HI_OP +#define TARGET_ASM_UNALIGNED_HI_OP "\t.2byte\t" +#undef TARGET_ASM_UNALIGNED_SI_OP +#define TARGET_ASM_UNALIGNED_SI_OP "\t.4byte\t" +#undef TARGET_ASM_UNALIGNED_DI_OP +#define TARGET_ASM_UNALIGNED_DI_OP "\t.8byte\t" +#undef TARGET_ASM_UNALIGNED_TI_OP +#define TARGET_ASM_UNALIGNED_TI_OP NULL +#endif + #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE arm_output_function_prologue @@ -218,6 +225,7 @@ #undef TARGET_DEFAULT_TARGET_FLAGS #define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | MASK_SCHED_PROLOG) + #undef TARGET_HANDLE_OPTION #define TARGET_HANDLE_OPTION arm_handle_option #undef TARGET_HELP @@ -232,16 +240,6 @@ #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST arm_adjust_cost -#undef TARGET_ENCODE_SECTION_INFO -#ifdef ARM_PE -#define TARGET_ENCODE_SECTION_INFO arm_pe_encode_section_info -#else -#define TARGET_ENCODE_SECTION_INFO arm_encode_section_info -#endif - -#undef TARGET_STRIP_NAME_ENCODING -#define TARGET_STRIP_NAME_ENCODING arm_strip_name_encoding - #undef TARGET_ASM_INTERNAL_LABEL #define TARGET_ASM_INTERNAL_LABEL arm_internal_label @@ -355,6 +353,9 @@ #define TARGET_HAVE_TLS true #endif +#undef TARGET_MS_BITFIELD_LAYOUT_P +#define TARGET_MS_BITFIELD_LAYOUT_P arm_ms_bitfield_layout_p + #undef TARGET_CANNOT_FORCE_CONST_MEM #define TARGET_CANNOT_FORCE_CONST_MEM arm_cannot_force_const_mem @@ -2757,9 +2758,11 @@ return (size < 0 || size > UNITS_PER_WORD); } - /* For the arm-wince targets we choose to be compatible with Microsoft's - ARM and Thumb compilers, which always return aggregates in memory. */ -#ifndef ARM_WINCE + if (TARGET_RETURN_AGGREGATES_IN_MEMORY + && (TREE_CODE (type) == RECORD_TYPE + || TREE_CODE (type) == UNION_TYPE)) + return 1; + /* All structures/unions bigger than one word are returned in memory. Also catch the case where int_size_in_bytes returns -1. In this case the aggregate is either huge or of variable size, and in either case @@ -2836,7 +2839,6 @@ return 0; } -#endif /* not ARM_WINCE */ /* Return all other types in memory. */ return 1; @@ -3031,28 +3033,29 @@ /* Whereas these functions are always known to reside within the 26 bit addressing range. */ { "short_call", 0, 0, false, true, true, NULL }, + /* Cdecl attribute says the callee is a normal C declaration + this is the default */ + { "cdecl", 0, 0, false, true, true, NULL }, /* Interrupt Service Routines have special prologue and epilogue requirements. */ { "isr", 0, 1, false, false, false, arm_handle_isr_attribute }, { "interrupt", 0, 1, false, false, false, arm_handle_isr_attribute }, { "naked", 0, 0, true, false, false, arm_handle_fndecl_attribute }, -#ifdef ARM_PE - /* ARM/PE has three new attributes: - interfacearm - ? - dllexport - for exporting a function/variable that will live in a dll - dllimport - for importing a function/variable from a dll - - Microsoft allows multiple declspecs in one __declspec, separating + { "interfacearm", 0, 0, true, false, false, arm_handle_fndecl_attribute }, +#if TARGET_DLLIMPORT_DECL_ATTRIBUTES + /* Microsoft allows multiple declspecs in one __declspec, separating them with spaces. We do NOT support this. Instead, use __declspec multiple times. */ - { "dllimport", 0, 0, true, false, false, NULL }, - { "dllexport", 0, 0, true, false, false, NULL }, - { "interfacearm", 0, 0, true, false, false, arm_handle_fndecl_attribute }, -#elif TARGET_DLLIMPORT_DECL_ATTRIBUTES { "dllimport", 0, 0, false, false, false, handle_dll_attribute }, { "dllexport", 0, 0, false, false, false, handle_dll_attribute }, { "notshared", 0, 0, false, true, false, arm_handle_notshared_attribute }, + { "shared", 0, 0, true, false, false, arm_pe_handle_shared_attribute }, #endif + { "ms_struct", 0, 0, false, false, false, arm_handle_struct_attribute }, + { "gcc_struct", 0, 0, false, false, false, arm_handle_struct_attribute }, +#ifdef SUBTARGET_ATTRIBUTE_TABLE + SUBTARGET_ATTRIBUTE_TABLE, +#endif { NULL, 0, 0, false, false, false, NULL } }; @@ -3335,6 +3338,12 @@ if (IS_STACKALIGN (func_type)) return false; +#if TARGET_DLLIMPORT_DECL_ATTRIBUTES + /* Dllimport'd functions are also called indirectly. */ + if (decl && DECL_DLLIMPORT_P (decl)) + return false; +#endif + /* Everything else is ok. */ return true; } @@ -13148,6 +13157,7 @@ return default_assemble_integer (x, size, aligned_p); } +#ifdef OBJECT_FORMAT_ELF static void arm_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) { @@ -13197,6 +13207,7 @@ { arm_elf_asm_cdtor (symbol, priority, /*is_ctor=*/false); } +#endif /* A finite state machine takes care of noticing whether or not instructions can be conditionally executed, and thus decrease execution time and code @@ -16929,8 +16940,8 @@ fprintf (f, "\t.code\t16\n"); #ifdef ARM_PE - if (arm_dllexport_name_p (name)) - name = arm_strip_name_encoding (name); + if (arm_pe_dllexport_name_p (name)) + name = arm_strip_name_encoding (name); #endif asm_fprintf (f, "\t.globl %s%U%s\n", STUB_NAME, name); fprintf (f, "\t.thumb_func\n"); @@ -17552,7 +17563,7 @@ default_file_start(); } -static void +void arm_file_end (void) { int regno; @@ -18714,4 +18725,175 @@ return NULL; } +/* Handle a "ms_struct" or "gcc_struct" attribute; arguments as in + struct attribute_spec.handler. */ +static tree +arm_handle_struct_attribute (tree *node, + tree name, + tree args ATTRIBUTE_UNUSED, + int flags ATTRIBUTE_UNUSED, + bool *no_add_attrs) +{ + tree *type = NULL; + if (DECL_P (*node)) + { + if (TREE_CODE (*node) == TYPE_DECL) + type = &TREE_TYPE (*node); + } + else + type = node; + + if (!(type && (TREE_CODE (*type) == RECORD_TYPE + || TREE_CODE (*type) == UNION_TYPE))) + { + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + else if ((is_attribute_p ("ms_struct", name) + && lookup_attribute ("gcc_struct", TYPE_ATTRIBUTES (*type))) + || ((is_attribute_p ("gcc_struct", name) + && lookup_attribute ("ms_struct", TYPE_ATTRIBUTES (*type))))) + { + warning (OPT_Wattributes, "%qs incompatible attribute ignored", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; +} + +static bool +arm_ms_bitfield_layout_p (tree record_type) +{ + return (TARGET_MS_BITFIELD_LAYOUT && + !lookup_attribute ("gcc_struct", TYPE_ATTRIBUTES (record_type))) + || lookup_attribute ("ms_struct", TYPE_ATTRIBUTES (record_type)); +} + +int +arm_major_arch (void) +{ + if ((insn_flags & FL_FOR_ARCH6) == FL_FOR_ARCH6) + return 6; + else if ((insn_flags & FL_FOR_ARCH5) == FL_FOR_ARCH5) + return 5; + else if ((insn_flags & FL_FOR_ARCH4) == FL_FOR_ARCH4) + return 4; + else if ((insn_flags & FL_FOR_ARCH3) == FL_FOR_ARCH3) + return 3; + else if ((insn_flags & FL_FOR_ARCH2) == FL_FOR_ARCH2) + return 2; + + /* This should gives us a nice ICE somewhere. */ + return -1; +} + +bool +arm_thumb_arch_p (void) +{ + return (insn_flags & FL_THUMB) == FL_THUMB; +} + +/* Called from ASM_DECLARE_FUNCTION_NAME in gcc/config/arm/wince-pe.h */ +const char * +arm_pe_exception_handler (FILE * ARG_UNUSED (fp), char *name, tree decl) +{ + tree attr, a2; + + attr = DECL_ATTRIBUTES (decl); + { +// tree format_num_expr = TREE_VALUE (TREE_CHAIN (attr)); +// tree format_num_expr = TREE_VALUE (attr); +// tree format_num_expr = (attr); + +// deze doet iets zinnig : +// tree format_num_expr = TREE_VALUE(decl); +// exarg.c: In function 'handler': +// exarg.c:13: internal compiler error: tree check: expected tree_list, have function_decl in arm_pe_exception_handler, at config/arm/arm.c:15568 +// + +// a2 = lookup_attribute ("__exception_handler__", decl); +// tree format_num_expr = TREE_VALUE(a2); + +// tree format_num_expr = TREE_VALUE(TREE_CHAIN(decl)); +// tree format_num_expr = TREE_VALUE(decl); + tree format_num_expr = decl; + +#if 0 + fprintf(stderr, "Yow arm_pe_exception_handler %p\n", format_num_expr); + if (TREE_CODE(format_num_expr) == STRING_CST) { + fprintf(stderr, "arm_pe_exception_handler : string\n"); + } else if (TREE_CODE(format_num_expr) == INTEGER_CST) { + fprintf(stderr, "arm_pe_exception_handler : integer\n"); + } else { + fprintf(stderr, "arm_pe_exception_handler : unknown\n"); + } +#endif + } + if (! attr) + return NULL; + a2 = lookup_attribute ("__exception_handler__", attr); + if (a2) + return IDENTIFIER_POINTER (TREE_VALUE (TREE_VALUE (a2))); + +// warning (0, "exception handler information not found for function %s", name); + return NULL; +} + +/* Handle a "exception_handler" attribute. + + One argument is required : the name of a function to call in case of exceptions. + Example syntax : + + int main(int argc, char *argv[]) + __attribute__((__exception_handler__(handler))); */ + +tree +arm_pe_handle_exception_handler_attribute (tree *node, tree name, + tree args, + int ARG_UNUSED (flags), + bool *no_add_attrs) +{ + if (TREE_CODE (*node) == FUNCTION_DECL) + { + tree a; + + /* We need to pass the name of the exception handler. The + right code then gets generated from config/arm/wince-pe.h + or similar, the assembler and linker will do the hard work. + + FIX ME We don't support passing data to the exception handler. + + This should be possible though, by using an additional argument + which needs to fit in the dword (e.g. a pointer) and storing that + in the right field as we do with the exception handler. */ + tree attr = NULL_TREE; + +// fprintf(stderr, "arm_pe_handle_exception_handler_attribute: arg %p no_add_attrs %d\n", +// flags, *no_add_attrs); + + tree format_num_expr = TREE_VALUE (TREE_CHAIN (args)); +#if 0 + if (TREE_CODE(format_num_expr) == STRING_CST) { + fprintf(stderr, "arm_pe_handle_exception_handler_attribute : string\n"); + } else if (TREE_CODE(format_num_expr) == INTEGER_CST) { + fprintf(stderr, "arm_pe_handle_exception_handler_attribute : integer\n"); + } else { + fprintf(stderr, "arm_pe_handle_exception_handler_attribute : unknown\n"); + } +#endif + attr = tree_cons (get_identifier ("exception_handler"), args, attr); + } + else + { + warning (OPT_Wattributes, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; +} + + #include "gt-arm.h" Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.h =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.h 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.h 2008-03-22 14:29:39 UTC (rev 1150) @@ -2416,6 +2416,11 @@ } \ while (0) +#define TARGET_ASM_FILE_END arm_file_end +#define TARGET_ATTRIBUTE_TABLE arm_attribute_table +#define TARGET_ENCODE_SECTION_INFO arm_encode_section_info +#define TARGET_STRIP_NAME_ENCODING arm_strip_name_encoding + #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN /* To support -falign-* switches we need to use .p2align so that alignment directives in code sections will be padded Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.opt =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.opt 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/arm.opt 2008-03-22 14:29:39 UTC (rev 1150) @@ -156,3 +156,7 @@ mvectorize-with-neon-quad Target Report Mask(NEON_VECTORIZE_QUAD) Use Neon quad-word (rather than double-word) registers for vectorization + +mreturn-aggregates-in-memory +Target Report Mask(RETURN_AGGREGATES_IN_MEMORY) +Return aggregates in memory Added: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc.opt =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc.opt (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc.opt 2008-03-22 14:29:39 UTC (rev 1150) @@ -0,0 +1,39 @@ +; cegcc specific options. + +; Copyright (C) 2006 Free Software Foundation, Inc. +; +; This file is part of GCC. +; +; GCC 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. +; +; GCC 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 GCC; see the file COPYING. If not, write to the Free +; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +; 02110-1301, USA. + +mcegcc +Target +Use the Cegcc interface + +mdll +Target RejectNegative +Generate code for a DLL + +mnop-fun-dllimport +Ignore dllimport for functions + +mthreads +Target RejectNegative +Use Cegcc-specific thread support + +mwin32 +Target +Set Windows defines Added: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc1.c =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc1.c (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc1.c 2008-03-22 14:29:39 UTC (rev 1150) @@ -0,0 +1,5 @@ +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include <string.h> Property changes on: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cegcc1.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cygming.opt =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cygming.opt (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/cygming.opt 2008-03-22 14:29:39 UTC (rev 1150) @@ -0,0 +1,37 @@ +; Cygwin- and MinGW-specific options. + +; Copyright (C) 2005 Free Software Foundation, Inc. +; +; This file is part of GCC. +; +; GCC 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. +; +; GCC 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 GCC; see the file COPYING. If not, write to the Free +; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +; 02110-1301, USA. + +mcygwin +Target +Use the Cygwin interface + +; ### TODO make this work. +; mnop-fun-dllimport +; Target Report Var(TARGET_NOP_FUN_DLLIMPORT) +; Ignore dllimport for functions + +mthreads +Target RejectNegative +Use Mingw-specific thread support + +mwin32 +Target +Set Windows defines Added: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/gthr-win32.c =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/gthr-win32.c (rev 0) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/gthr-win32.c 2008-03-22 14:29:39 UTC (rev 1150) @@ -0,0 +1,263 @@ +/* Implementation of W32-specific threads compatibility routines for + libgcc2. */ + +/* Copyright (C) 1999, 2000, 2002, 2004, 2006 Free Software Foundation, Inc. + Contributed by Mumit Khan <kh...@xr...>. + Modified and moved to separate file by Danny Smith + <dan...@us...>. + + Copied from config/i386 and adapted to wince + <ped...@po...>. + +This file is part of GCC. + +GCC 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. + +GCC 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 GCC; see the file COPYING. If not, write to the Free +Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library 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. */ + +#if defined __MINGW32__ +#include <_mingw.h> +#endif + +#include <windows.h> + +#ifndef __GTHREAD_HIDE_WIN32API +# define __GTHREAD_HIDE_WIN32API 1 +#endif +#undef __GTHREAD_I486_INLINE_LOCK_PRIMITIVES +#ifdef __i386__ +#define __GTHREAD_I486_INLINE_LOCK_PRIMITIVES +#endif +#include <gthr-win32.h> + +/* Windows32 threads specific definitions. The windows32 threading model + does not map well into pthread-inspired gcc's threading model, and so + there are caveats one needs to be aware of. + + 1. The destructor supplied to __gthread_key_create is ignored for + generic x86-win32 ports. This will certainly cause memory leaks + due to unreclaimed eh contexts (sizeof (eh_context) is at least + 24 bytes for x86 currently). + + This memory leak may be significant for long-running applications + that make heavy use of C++ EH. + + However, Mingw runtime (version 0.3 or newer) provides a mechanism + to emulate pthreads key dtors; the runtime provides a special DLL, + linked in if -mthreads option is specified, that runs the dtors in + the reverse order of registration when each thread exits. If + -mthreads option is not given, a stub is linked in instead of the + DLL, which results in memory leak. Other x86-win32 ports can use + the same technique of course to avoid the leak. + + 2. The error codes returned are non-POSIX like, and cast into ints. + This may cause incorrect error return due to truncation values on + hw where sizeof (DWORD) > sizeof (int). + + 3. We are currently using a special mutex instead of the Critical + Sections, since Win9x does not support TryEnterCriticalSection + (while NT does). + + The basic framework should work well enough. In the long term, GCC + needs to use Structured Exception Handling on Windows32. */ + +int +__gthr_win32_once (__gthread_once_t *once, void (*func) (void)) +{ + if (once == NULL || func == NULL) + return -1; + + if (! once->done) + { + if (InterlockedIncrement (&(once->started)) == 0) + { + (*func) (); + once->done = TRUE; + } + else + { + /* Another thread is currently executing the code, so wait for it + to finish; yield the CPU in the meantime. If performance + does become an issue, the solution is to use an Event that + we wait on here (and set above), but that implies a place to + create the event before this routine is called. */ + while (! once->done) + Sleep (0); + } + } + return 0; +} + +/* Windows32 thread local keys don't support destructors; this leads to + leaks, especially in threaded applications making extensive use of + C++ EH. Mingw uses a thread-support DLL to work-around this problem. */ + +int +__gthr_win32_key_create (__gthread_key_t *key, void (*dtor) (void *)) +{ + int status = 0; + DWORD tls_index = TlsAlloc (); + if (tls_index != 0xFFFFFFFF) + { + *key = tls_index; +#ifdef MINGW32_SUPPORTS_MT_EH + /* Mingw runtime will run the dtors in reverse order for each thread + when the thread exits. */ + status = __mingwthr_key_dtor (*key, dtor); +#endif + } + else + status = (int) GetLastError (); + return status; +} + +int +__gthr_win32_key_delete (__gthread_key_t key) +{ + return (TlsFree (key) != 0) ? 0 : (int) GetLastError (); +} + +void * +__gthr_win32_getspecific (__gthread_key_t key) +{ + DWORD lasterror; + void *ptr; + lasterror = GetLastError(); + ptr = TlsGetValue(key); + SetLastError( lasterror ); + return ptr; +} + +int +__gthr_win32_setspecific (__gthread_key_t key, const void *ptr) +{ + return (TlsSetValue (key, (void*) ptr) != 0) ? 0 : (int) GetLastError (); +} + +void +__gthr_win32_mutex_init_function (__gthread_mutex_t *mutex) +{ + mutex->counter = -1; + mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); +} + +int +__gthr_win32_mutex_lock (__gthread_mutex_t *mutex) +{ + if (InterlockedIncrement (&mutex->counter) == 0 || + WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0) + return 0; + else + { + /* WaitForSingleObject returns WAIT_FAILED, and we can only do + some best-effort cleanup here. */ + InterlockedDecrement (&mutex->counter); + return 1; + } +} + +int +__gthr_win32_mutex_trylock (__gthread_mutex_t *mutex) +{ + if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) + return 0; + else + return 1; +} + +int +__gthr_win32_mutex_unlock (__gthread_mutex_t *mutex) +{ + if (InterlockedDecrement (&mutex->counter) >= 0) + return ReleaseSemaphore (mutex->sema, 1, NULL) ? 0 : 1; + else + return 0; +} + +void +__gthr_win32_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex) +{ + mutex->counter = -1; + mutex->depth = 0; + mutex->owner = 0; + mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); +} + +int +__gthr_win32_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) +{ + DWORD me = GetCurrentThreadId(); + if (InterlockedIncrement (&mutex->counter) == 0) + { + mutex->depth = 1; + mutex->owner = me; + } + else if (mutex->owner == me) + { + InterlockedDecrement (&mutex->counter); + ++(mutex->depth); + } + else if (WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0) + { + mutex->depth = 1; + mutex->owner = me; + } + else + { + /* WaitForSingleObject returns WAIT_FAILED, and we can only do + some best-effort cleanup here. */ + InterlockedDecrement (&mutex->counter); + return 1; + } + return 0; +} + +int +__gthr_win32_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) +{ + DWORD me = GetCurrentThreadId(); + if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) + { + mutex->depth = 1; + mutex->owner = me; + } + else if (mutex->owner == me) + ++(mutex->depth); + else + return 1; + + return 0; +} + +int +__gthr_win32_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) +{ + --(mutex->depth); + if (mutex->depth == 0) + { + mutex->owner = 0; + + if (InterlockedDecrement (&mutex->counter) >= 0) + return ReleaseSemaphore (mutex->sema, 1, NULL) ? 0 : 1; + } + + return 0; +} Property changes on: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/gthr-win32.c ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-df.S =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-df.S 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-df.S 2008-03-22 14:29:39 UTC (rev 1150) @@ -101,7 +101,7 @@ COND(orr,s,ne) ip, r5, yl COND(mvn,s,ne) ip, r4, asr #21 COND(mvn,s,ne) ip, r5, asr #21 - beq LSYM(Lad_s) + beq LSYM(ad_s) @ Compute exponent difference. Make largest exponent in r4, @ corresponding arg in xh-xl, and positive exponent difference in r5. @@ -154,8 +154,8 @@ @ If exponent == difference, one or both args were denormalized. @ Since this is not common case, rescale them off line. teq r4, r5 - beq LSYM(Lad_d) -LSYM(Lad_x): + beq LSYM(ad_d) +LSYM(ad_x): @ Compensate for the exponent overlapping the mantissa MSB added later sub r4, r4, #1 @@ -181,7 +181,7 @@ @ We now have a result in xh-xl-ip. @ Keep absolute value in xh-xl-ip, sign in r5 (the n bit was set above) and r5, xh, #0x80000000 - bpl LSYM(Lad_p) + bpl LSYM(ad_p) #if defined(__thumb2__) mov lr, #0 negs ip, ip @@ -194,11 +194,11 @@ #endif @ Determine how to normalize the result. -LSYM(Lad_p): +LSYM(ad_p): cmp xh, #0x00100000 - bcc LSYM(Lad_a) + bcc LSYM(ad_a) cmp xh, #0x00200000 - bcc LSYM(Lad_e) + bcc LSYM(ad_e) @ Result needs to be shifted right. movs xh, xh, lsr #1 @@ -209,13 +209,13 @@ @ Make sure we did not bust our exponent. mov r2, r4, lsl #21 cmn r2, #(2 << 21) - bcs LSYM(Lad_o) + bcs LSYM(ad_o) @ Our result is now properly aligned into xh-xl, remaining bits in ip. @ Round with MSB of ip. If halfway between two numbers, round towards @ LSB of xl = 0. @ Pack final result together. -LSYM(Lad_e): +LSYM(ad_e): cmp ip, #0x80000000 do_it eq COND(mov,s,eq) ip, xl, lsr #1 @@ -225,16 +225,16 @@ RETLDM "r4, r5" @ Result must be shifted left and exponent adjusted. -LSYM(Lad_a): +LSYM(ad_a): movs ip, ip, lsl #1 adcs xl, xl, xl adc xh, xh, xh tst xh, #0x00100000 sub r4, r4, #1 - bne LSYM(Lad_e) + bne LSYM(ad_e) @ No rounding necessary since ip will always be 0 at this point. -LSYM(Lad_l): +LSYM(ad_l): #if __ARM_ARCH__ < 5 @@ -341,21 +341,21 @@ @ Adjust exponents for denormalized arguments. @ Note that r4 must not remain equal to 0. -LSYM(Lad_d): +LSYM(ad_d): teq r4, #0 eor yh, yh, #0x00100000 do_it eq, te eoreq xh, xh, #0x00100000 addeq r4, r4, #1 subne r5, r5, #1 - b LSYM(Lad_x) + b LSYM(ad_x) -LSYM(Lad_s): +LSYM(ad_s): mvns ip, r4, asr #21 do_it ne COND(mvn,s,ne) ip, r5, asr #21 - beq LSYM(Lad_i) + beq LSYM(ad_i) teq r4, r5 do_it eq @@ -392,7 +392,7 @@ and r5, xh, #0x80000000 @ Overflow: return INF. -LSYM(Lad_o): +LSYM(ad_o): orr xh, r5, #0x7f000000 orr xh, xh, #0x00f00000 mov xl, #0 @@ -404,7 +404,7 @@ @ if either is NAN: return NAN @ if opposite sign: return NAN @ otherwise return xh-xl (which is INF or -INF) -LSYM(Lad_i): +LSYM(ad_i): mvns ip, r4, asr #21 do_it ne, te movne xh, yh @@ -440,7 +440,7 @@ mov xl, r0 .endif mov xh, #0 - b LSYM(Lad_l) + b LSYM(ad_l) FUNC_END aeabi_ui2d FUNC_END floatunsidf @@ -462,7 +462,7 @@ mov xl, r0 .endif mov xh, #0 - b LSYM(Lad_l) + b LSYM(ad_l) FUNC_END aeabi_i2d FUNC_END floatsidf @@ -490,7 +490,7 @@ mov r4, #0x380 @ setup corresponding exponent and r5, xh, #0x80000000 @ move sign bit in r5 bic xh, xh, #0x80000000 - b LSYM(Lad_l) + b LSYM(ad_l) FUNC_END aeabi_f2d FUNC_END extendsfdf2 @@ -565,7 +565,7 @@ .endif movs ip, xh, lsr #22 - beq LSYM(Lad_p) + beq LSYM(ad_p) @ The value is too big. Scale it down a bit... mov r2, #3 @@ -583,7 +583,7 @@ shiftop orr xl xl xh lsl r3 lr shift1 lsr, xh, xh, r2 add r4, r4, r2 - b LSYM(Lad_p) + b LSYM(ad_p) #if !defined (__VFP_FP__) && !defined(__SOFTFP__) @@ -617,7 +617,7 @@ COND(and,s,ne) r5, ip, yh, lsr #20 teqne r4, ip teqne r5, ip - bleq LSYM(Lml_s) + bleq LSYM(ml_s) @ Add exponents together add r4, r4, r5 @@ -634,7 +634,7 @@ COND(orr,s,ne) r5, yl, yh, lsl #12 orr xh, xh, #0x00100000 orr yh, yh, #0x00100000 - beq LSYM(Lml_1) + beq LSYM(ml_1) #if __ARM_ARCH__ < 4 @@ -735,7 +735,7 @@ subs ip, r4, #(254 - 1) do_it hi cmphi ip, #0x700 - bhi LSYM(Lml_u) + bhi LSYM(ml_u) @ Round the result, merge final exponent. cmp lr, #0x80000000 @@ -746,7 +746,7 @@ RETLDM "r4, r5, r6" @ Multiplication by 0x1p*: let''s shortcut a lot of code. -LSYM(Lml_1): +LSYM(ml_1): and r6, r6, #0x80000000 orr xh, r6, xh orr xl, xl, yl @@ -762,9 +762,9 @@ mov lr, #0 subs r4, r4, #1 -LSYM(Lml_u): +LSYM(ml_u): @ Overflow? - bgt LSYM(Lml_o) + bgt LSYM(ml_o) @ Check if denormalized result is possible, otherwise return signed 0. cmn r4, #(53 + 1) @@ -827,7 +827,7 @@ @ One or both arguments are denormalized. @ Scale them leftwards and preserve sign bit. -LSYM(Lml_d): +LSYM(ml_d): teq r4, #0 bne 2f and r6, xh, #0x80000000 @@ -851,7 +851,7 @@ orr yh, yh, r6 mov pc, lr -LSYM(Lml_s): +LSYM(ml_s): @ Isolate the INF and NAN cases away teq r4, ip and r5, ip, yh, lsr #20 @@ -863,10 +863,10 @@ orrs r6, xl, xh, lsl #1 do_it ne COND(orr,s,ne) r6, yl, yh, lsl #1 - bne LSYM(Lml_d) + bne LSYM(ml_d) @ Result is 0, but determine sign anyway. -LSYM(Lml_z): +LSYM(ml_z): eor xh, xh, yh and xh, xh, #0x80000000 mov xl, #0 @@ -878,25 +878,25 @@ moveq xl, yl moveq xh, yh COND(orr,s,ne) r6, yl, yh, lsl #1 - beq LSYM(Lml_n) @ 0 * INF or INF * 0 -> NAN + beq LSYM(ml_n) @ 0 * INF or INF * 0 -> NAN teq r4, ip bne 1f orrs r6, xl, xh, lsl #12 - bne LSYM(Lml_n) @ NAN * <anything> -> NAN + bne LSYM(ml_n) @ NAN * <anything> -> NAN 1: teq r5, ip - bne LSYM(Lml_i) + bne LSYM(ml_i) orrs r6, yl, yh, lsl #12 do_it ne, t movne xl, yl movne xh, yh - bne LSYM(Lml_n) @ <anything> * NAN -> NAN + bne LSYM(ml_n) @ <anything> * NAN -> NAN @ Result is INF, but we need to determine its sign. -LSYM(Lml_i): +LSYM(ml_i): eor xh, xh, yh @ Overflow: return INF (sign already in xh). -LSYM(Lml_o): +LSYM(ml_o): and xh, xh, #0x80000000 orr xh, xh, #0x7f000000 orr xh, xh, #0x00f00000 @@ -904,7 +904,7 @@ RETLDM "r4, r5, r6" @ Return a quiet NAN. -LSYM(Lml_n): +LSYM(ml_n): orr xh, xh, #0x7f000000 orr xh, xh, #0x00f80000 RETLDM "r4, r5, r6" @@ -925,7 +925,7 @@ COND(and,s,ne) r5, ip, yh, lsr #20 teqne r4, ip teqne r5, ip - bleq LSYM(Ldv_s) + bleq LSYM(dv_s) @ Substract divisor exponent from dividend''s. sub r4, r4, r5 @@ -937,7 +937,7 @@ @ Dividend -> r5-r6, divisor -> yh-yl. orrs r5, yl, yh, lsl #12 mov xh, xh, lsl #12 - beq LSYM(Ldv_1) + beq LSYM(dv_1) mov yh, yh, lsl #12 mov r5, #0x10000000 orr yh, r5, yh, lsr #4 @@ -1031,7 +1031,7 @@ subs ip, r4, #(254 - 1) do_it hi cmphi ip, #0x700 - bhi LSYM(Lml_u) + bhi LSYM(ml_u) @ Round the result, merge final exponent. subs ip, r5, yh @@ -1043,7 +1043,7 @@ RETLDM "r4, r5, r6" @ Division by 0x1p*: shortcut a lot of code. -LSYM(Ldv_1): +LSYM(dv_1): and lr, lr, #0x80000000 orr xh, lr, xh, lsr #12 adds r4, r4, ip, lsr #1 @@ -1055,48 +1055,48 @@ orr xh, xh, #0x00100000 mov lr, #0 subs r4, r4, #1 - b LSYM(Lml_u) + b LSYM(ml_u) @ Result mightt need to be denormalized: put remainder bits @ in lr for rounding considerations. -LSYM(Ldv_u): +LSYM(dv_u): orr lr, r5, r6 - b LSYM(Lml_u) + b LSYM(ml_u) @ One or both arguments is either INF, NAN or zero. -LSYM(Ldv_s): +LSYM(dv_s): and r5, ip, yh, lsr #20 teq r4, ip do_it eq teqeq r5, ip - beq LSYM(Lml_n) @ INF/NAN / INF/NAN -> NAN + beq LSYM(ml_n) @ INF/NAN / INF/NAN -> NAN teq r4, ip bne 1f orrs r4, xl, xh, lsl #12 - bne LSYM(Lml_n) @ NAN / <anything> -> NAN + bne LSYM(ml_n) @ NAN / <anything> -> NAN teq r5, ip - bne LSYM(Lml_i) @ INF / <anything> -> INF + bne LSYM(ml_i) @ INF / <anything> -> INF mov xl, yl mov xh, yh - b LSYM(Lml_n) @ INF / (INF or NAN) -> NAN + b LSYM(ml_n) @ INF / (INF or NAN) -> NAN 1: teq r5, ip bne 2f orrs r5, yl, yh, lsl #12 - beq LSYM(Lml_z) @ <anything> / INF -> 0 + beq LSYM(ml_z) @ <anything> / INF -> 0 mov xl, yl mov xh, yh - b LSYM(Lml_n) @ <anything> / NAN -> NAN + b LSYM(ml_n) @ <anything> / NAN -> NAN 2: @ If both are nonzero, we need to normalize and resume above. orrs r6, xl, xh, lsl #1 do_it ne COND(orr,s,ne) r6, yl, yh, lsl #1 - bne LSYM(Lml_d) + bne LSYM(ml_d) @ One or both arguments are 0. orrs r4, xl, xh, lsl #1 - bne LSYM(Lml_i) @ <non_zero> / 0 -> INF + bne LSYM(ml_i) @ <non_zero> / 0 -> INF orrs r5, yl, yh, lsl #1 - bne LSYM(Lml_z) @ 0 / <non_zero> -> 0 - b LSYM(Lml_n) @ 0 / 0 -> NAN + bne LSYM(ml_z) @ 0 / <non_zero> -> 0 + b LSYM(ml_n) @ 0 / 0 -> NAN FUNC_END aeabi_ddiv FUNC_END divdf3 Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-sf.S =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-sf.S 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/ieee754-sf.S 2008-03-22 14:29:39 UTC (rev 1150) @@ -76,7 +76,7 @@ teqne r2, r3 COND(mvn,s,ne) ip, r2, asr #24 COND(mvn,s,ne) ip, r3, asr #24 - beq LSYM(Lad_s) + beq LSYM(ad_s) @ Compute exponent difference. Make largest exponent in r2, @ corresponding arg in r0, and positive exponent difference in r3. @@ -112,8 +112,8 @@ @ If exponent == difference, one or both args were denormalized. @ Since this is not common case, rescale them off line. teq r2, r3 - beq LSYM(Lad_d) -LSYM(Lad_x): + beq LSYM(ad_d) +LSYM(ad_x): @ Compensate for the exponent overlapping the mantissa MSB added later sub r2, r2, #1 @@ -126,7 +126,7 @@ @ Keep absolute value in r0-r1, sign in r3 (the n bit was set above) and r3, r0, #0x80000000 - bpl LSYM(Lad_p) + bpl LSYM(ad_p) #if defined(__thumb2__) negs r1, r1 sbc r0, r0, r0, lsl #1 @@ -136,11 +136,11 @@ #endif @ Determine how to normalize the result. -LSYM(Lad_p): +LSYM(ad_p): cmp r0, #0x00800000 - bcc LSYM(Lad_a) + bcc LSYM(ad_a) cmp r0, #0x01000000 - bcc LSYM(Lad_e) + bcc LSYM(ad_e) @ Result needs to be shifted right. movs r0, r0, lsr #1 @@ -149,13 +149,13 @@ @ Make sure we did not bust our exponent. cmp r2, #254 - bhs LSYM(Lad_o) + bhs LSYM(ad_o) @ Our result is now properly aligned into r0, remaining bits in r1. @ Pack final result together. @ Round with MSB of r1. If halfway between two numbers, round towards @ LSB of r0 = 0. -LSYM(Lad_e): +LSYM(ad_e): cmp r1, #0x80000000 adc r0, r0, r2, lsl #23 do_it eq @@ -164,15 +164,15 @@ RET @ Result must be shifted left and exponent adjusted. -LSYM(Lad_a): +LSYM(ad_a): movs r1, r1, lsl #1 adc r0, r0, r0 tst r0, #0x00800000 sub r2, r2, #1 - bne LSYM(Lad_e) + bne LSYM(ad_e) @ No rounding necessary since r1 will always be 0 at this point. -LSYM(Lad_l): +LSYM(ad_l): #if __ARM_ARCH__ < 5 @@ -218,22 +218,22 @@ @ Fixup and adjust bit position for denormalized arguments. @ Note that r2 must not remain equal to 0. -LSYM(Lad_d): +LSYM(ad_d): teq r2, #0 eor r1, r1, #0x00800000 do_it eq, te eoreq r0, r0, #0x00800000 addeq r2, r2, #1 subne r3, r3, #1 - b LSYM(Lad_x) + b LSYM(ad_x) -LSYM(Lad_s): +LSYM(ad_s): mov r3, r1, lsl #1 mvns ip, r2, asr #24 do_it ne COND(mvn,s,ne) ip, r3, asr #24 - beq LSYM(Lad_i) + beq LSYM(ad_i) teq r2, r3 beq 1f @@ -265,7 +265,7 @@ and r3, r0, #0x80000000 @ Overflow: return INF. -LSYM(Lad_o): +LSYM(ad_o): orr r0, r3, #0x7f000000 orr r0, r0, #0x00800000 RET @@ -276,7 +276,7 @@ @ if r0 or r1 is NAN: return NAN @ if opposite sign: return NAN @ otherwise return r0 (which is INF or -INF) -LSYM(Lad_i): +LSYM(ad_i): mvns r2, r2, asr #24 do_it ne, et movne r0, r1 @@ -460,8 +460,8 @@ COND(and,s,ne) r3, ip, r1, lsr #23 teqne r2, ip teqne r3, ip - beq LSYM(Lml_s) -LSYM(Lml_x): + beq LSYM(ml_s) +LSYM(ml_x): @ Add exponents together add r2, r2, r3 @@ -475,7 +475,7 @@ movs r0, r0, lsl #9 do_it ne COND(mov,s,ne) r1, r1, lsl #9 - beq LSYM(Lml_1) + beq LSYM(ml_1) mov r3, #0x08000000 orr r0, r3, r0, lsr #5 orr r1, r3, r1, lsr #5 @@ -522,7 +522,7 @@ @ Apply exponent bias, check for under/overflow. sbc r2, r2, #127 cmp r2, #(254 - 1) - bhi LSYM(Lml_u) + bhi LSYM(ml_u) @ Round the result, merge final exponent. cmp r3, #0x80000000 @@ -532,7 +532,7 @@ RET @ Multiplication by 0x1p*: let''s shortcut a lot of code. -LSYM(Lml_1): +LSYM(ml_1): teq r0, #0 and ip, ip, #0x80000000 do_it eq @@ -550,9 +550,9 @@ mov r3, #0 subs r2, r2, #1 -LSYM(Lml_u): +LSYM(ml_u): @ Overflow? - bgt LSYM(Lml_o) + bgt LSYM(ml_o) @ Check if denormalized result is possible, otherwise return signed 0. cmn r2, #(24 + 1) @@ -575,7 +575,7 @@ @ One or both arguments are denormalized. @ Scale them leftwards and preserve sign bit. -LSYM(Lml_d): +LSYM(ml_d): teq r2, #0 and ip, r0, #0x80000000 1: do_it eq, tt @@ -592,9 +592,9 @@ subeq r3, r3, #1 beq 2b orr r1, r1, ip - b LSYM(Lml_x) + b LSYM(ml_x) -LSYM(Lml_s): +LSYM(ml_s): @ Isolate the INF and NAN cases away and r3, ip, r1, lsr #23 teq r2, ip @@ -606,10 +606,10 @@ bics ip, r0, #0x80000000 do_it ne COND(bic,s,ne) ip, r1, #0x80000000 - bne LSYM(Lml_d) + bne LSYM(ml_d) @ Result is 0, but determine sign anyway. -LSYM(Lml_z): +LSYM(ml_z): eor r0, r0, r1 bic r0, r0, #0x7fffffff RET @@ -621,31 +621,31 @@ moveq r0, r1 teqne r1, #0x0 teqne r1, #0x80000000 - beq LSYM(Lml_n) @ 0 * INF or INF * 0 -> NAN + beq LSYM(ml_n) @ 0 * INF or INF * 0 -> NAN teq r2, ip bne 1f movs r2, r0, lsl #9 - bne LSYM(Lml_n) @ NAN * <anything> -> NAN + bne LSYM(ml_n) @ NAN * <anything> -> NAN 1: teq r3, ip - bne LSYM(Lml_i) + bne LSYM(ml_i) movs r3, r1, lsl #9 do_it ne movne r0, r1 - bne LSYM(Lml_n) @ <anything> * NAN -> NAN + bne LSYM(ml_n) @ <anything> * NAN -> NAN @ Result is INF, but we need to determine its sign. -LSYM(Lml_i): +LSYM(ml_i): eor r0, r0, r1 @ Overflow: return INF (sign already in r0). -LSYM(Lml_o): +LSYM(ml_o): and r0, r0, #0x80000000 orr r0, r0, #0x7f000000 orr r0, r0, #0x00800000 RET @ Return a quiet NAN. -LSYM(Lml_n): +LSYM(ml_n): orr r0, r0, #0x7f000000 orr r0, r0, #0x00c00000 RET @@ -663,8 +663,8 @@ COND(and,s,ne) r3, ip, r1, lsr #23 teqne r2, ip teqne r3, ip - beq LSYM(Ldv_s) -LSYM(Ldv_x): + beq LSYM(dv_s) +LSYM(dv_x): @ Substract divisor exponent from dividend''s sub r2, r2, r3 @@ -676,7 +676,7 @@ @ Dividend -> r3, divisor -> r1. movs r1, r1, lsl #9 mov r0, r0, lsl #9 - beq LSYM(Ldv_1) + beq LSYM(dv_1) mov r3, #0x10000000 orr r1, r3, r1, lsr #4 orr r3, r3, r0, lsr #4 @@ -716,7 +716,7 @@ @ Check exponent for under/overflow. cmp r2, #(254 - 1) - bhi LSYM(Lml_u) + bhi LSYM(ml_u) @ Round the result, merge final exponent. cmp r3, r1 @@ -726,7 +726,7 @@ RET @ Division by 0x1p*: let''s shortcut a lot of code. -LSYM(Ldv_1): +LSYM(dv_1): and ip, ip, #0x80000000 orr r0, ip, r0, lsr #9 adds r2, r2, #127 @@ -738,11 +738,11 @@ orr r0, r0, #0x00800000 mov r3, #0 subs r2, r2, #1 - b LSYM(Lml_u) + b LSYM(ml_u) @ One or both arguments are denormalized. @ Scale them leftwards and preserve sign bit. -LSYM(Ldv_d): +LSYM(dv_d): teq r2, #0 and ip, r0, #0x80000000 1: do_it eq, tt @@ -759,36 +759,36 @@ subeq r3, r3, #1 beq 2b orr r1, r1, ip - b LSYM(Ldv_x) + b LSYM(dv_x) @ One or both arguments are either INF, NAN, zero or denormalized. -LSYM(Ldv_s): +LSYM(dv_s): and r3, ip, r1, lsr #23 teq r2, ip bne 1f movs r2, r0, lsl #9 - bne LSYM(Lml_n) @ NAN / <anything> -> NAN + bne LSYM(ml_n) @ NAN / <anything> -> NAN teq r3, ip - bne LSYM(Lml_i) @ INF / <anything> -> INF + bne LSYM(ml_i) @ INF / <anything> -> INF mov r0, r1 - b LSYM(Lml_n) @ INF / (INF or NAN) -> NAN + b LSYM(ml_n) @ INF / (INF or NAN) -> NAN 1: teq r3, ip bne 2f movs r3, r1, lsl #9 - beq LSYM(Lml_z) @ <anything> / INF -> 0 + beq LSYM(ml_z) @ <anything> / INF -> 0 mov r0, r1 - b LSYM(Lml_n) @ <anything> / NAN -> NAN + b LSYM(ml_n) @ <anything> / NAN -> NAN 2: @ If both are nonzero, we need to normalize and resume above. bics ip, r0, #0x80000000 do_it ne COND(bic,s,ne) ip, r1, #0x80000000 - bne LSYM(Ldv_d) + bne LSYM(dv_d) @ One or both arguments are zero. bics r2, r0, #0x80000000 - bne LSYM(Lml_i) @ <non_zero> / 0 -> INF + bne LSYM(ml_i) @ <non_zero> / 0 -> INF bics r3, r1, #0x80000000 - bne LSYM(Lml_z) @ 0 / <non_zero> -> 0 - b LSYM(Lml_n) @ 0 / 0 -> NAN + bne LSYM(ml_z) @ 0 / <non_zero> -> 0 + b LSYM(ml_n) @ 0 / 0 -> NAN FUNC_END aeabi_fdiv FUNC_END divsf3 Modified: trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/lib1funcs.asm =================================================================== --- trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/lib1funcs.asm 2008-03-22 09:04:58 UTC (rev 1149) +++ trunk/cegcc/src/gcc-4.3.0/gcc/config/arm/lib1funcs.asm 2008-03-22 14:29:39 UTC (rev 1150) @@ -52,22 +52,22 @@ #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) #ifdef __ELF__ -#ifdef __thumb__ -#define __PLT__ /* Not supported in Thumb assembler (for now). */ -#elif defined __vxworks && !defined __PIC__ -#define __PLT__ /* Not supported by the kernel loader. */ +# ifdef __thumb__ +# define __PLT__ /* Not supported in Thumb assembler (for now). */ +# elif defined __vxworks && !defined __PIC__ +# define __PLT__ /* Not supported by the kernel loader. */ +# else +# define __PLT__ (PLT) +# endif +# define TYPE(x) .type SYM(x),function +# define SIZE(x) .size SYM(x), . - SYM(x) +# define LSYM(x) .x #else -#define __PLT__ (PLT) +# define __PLT__ +# define TYPE(x) .def SYM(x); .scl 2; .type 32; .endef +# define SIZE(x) +# define LSYM(x) CONCAT1 (__LPREFIX__, x) #endif -#define TYPE(x) .type SYM(x),function -#define SIZE(x) .size SYM(x), . - SYM(x) -#define LSYM(x) .x -#else -#define __PLT__ -#define TYPE(x) -#define SIZE(x) -#define LSYM(x) x -#endif /* Function end macros. Variants for interworking. */ @@ -162,9 +162,9 @@ .macro cfi_start start_label, end_label #ifdef __ELF__ .pushsection .debug_frame -LSYM(Lstart_frame): - .4byte LSYM(Lend_cie) - LSYM(Lstart_cie) @ Length of CIE -LSYM(Lstart_cie): +LSYM(start_frame): + .4byte LSYM(end_cie) - LSYM(start_cie) @ Length of CIE +LSYM(start_cie): .4byte 0xffffffff @ CIE Identifier Tag .byte 0x1 @ CIE Version .ascii "\0" @ CIE Augmentation @@ -176,10 +176,10 @@ .uleb128 0x0 .align 2 -LSYM(Lend_cie): - .4byte LSYM(Lend_fde)-LSYM(Lstart_fde) @ FDE Length -LSYM(Lstart_fde): - .4byte LSYM(Lstart_frame) @ FDE CIE offset +LSYM(end_cie): + .4byte LSYM(end_fde)-LSYM(start_fde) @ FDE Length +LSYM(start_fde): + .4byte LSYM(start_frame) @ FDE CIE offset .4byte \start_label @ FDE initial location .4byte \end_label-\start_label @ FDE address range .popsection @@ -189,7 +189,7 @@ #ifdef __ELF__ .pushsection .debug_frame .align 2 -LSYM(Lend_fde): +LSYM(end_fde): .popsection \end_label: #endif @@ -287,14 +287,14 @@ .endm .macro DIV_FUNC_END name - cfi_start __\name, LSYM(Lend_div0) -LSYM(Ldiv0): + cfi_start __\name, LSYM(end_div0) +LSYM(div0): #ifdef __thumb__ THUMB_LDIV0 \name #else ARM_LDIV0 \name #endif - cfi_end LSYM(Lend_div0) + cfi_end LSYM(end_div0) FUNC_END \name .endm @@ -384,6 +384,7 @@ .macro FUNC_ALIAS new old .globl SYM (__\new) + TYPE (__\new) #if defined (__thumb__) .thumb_set SYM (__\new), SYM (__\old) #else @@ -393,6 +394,7 @@ .macro ARM_FUNC_ALIAS new old .globl SYM (__\new) + TYPE (__\new) EQUIV SYM (__\new), SYM (__\old) #if defined(__INTERWORKING_STUBS__) .set SYM (_L__\new), SYM (_L__\old) @@ -628,32 +630,32 @@ @ Load the constant 0x10000000 into our work register. mov work, #1 lsl work, #28 -LSYM(Loop1): +LSYM(oop1): @ Unless the divisor is very big, shift it up in multiples of @ four bits, since this is the amount of unwinding in the main @ division loop. Continue shifting until the divisor is @ larger than the dividend. cmp divisor, work - bhs LSYM(Lbignum) + bhs LSYM(bignum) cmp divisor, dividend - bhs LSYM(Lbignum) + bhs LSYM(bignum) lsl divisor, #4 lsl curbit, #4 - b LSYM(Loop1) -LSYM(Lbignum): + b LSYM(oop1) +LSYM(bignum): @ Set work to 0x80000000 lsl work, #3 -LSYM(Loop2): +LSYM(oop2): @ For very big divisors, we must shift it a bit at a time, or @ we will be in danger of overflowing. cmp divisor, work - bhs LSYM(Loop3) + bhs LSYM(oop3) cmp divisor, dividend - bhs LSYM(Loop3) + bhs LSYM(oop3) lsl divisor, #1 lsl curbit, #1 - b LSYM(Loop2) -LSYM(Loop3): + b LSYM(oop2) +LSYM(oop3): @ Test for possible subtractions ... .if \modulo @ ... On the final pass, this may subtract too much from the dividend, @@ -661,79 +663,79 @@ @ afterwards. mov overdone, #0 cmp dividend, divisor - blo LSYM(Lover1) + blo LSYM(over1) sub dividend, dividend, divisor -LSYM(Lover1): +LSYM(over1): lsr work, divisor, #1 cmp dividend, work - blo LSYM(Lover2) + blo LSYM(over2) sub dividend, dividend, work mov ip, curbit mov work, #1 ror curbit, work orr overdone, curbit mov curbit, ip -LSYM(Lover2): +LSYM(over2): lsr work, divisor, #2 cmp dividend, work - blo LSYM(Lover3) + blo LSYM(over3) sub dividend, dividend, work mov ip, curbit mov work, #2 ror curbit, work orr overdone, curbit mov curbit, ip -LSYM(Lover3): +LSYM(over3): lsr work, divisor, #3 cmp dividend, work - blo LSYM(Lover4) + blo LSYM(over4) sub dividend, dividend, work mov ip, curbit mov work, #3 ror curbit, work orr overdone, curbit mov curbit, ip -LSYM(Lover4): +LSYM(over4): mov ip, curbit .else @ ... and note which bits are done in the result. On the final pass, @ this may subtract too much from the dividend, but the result will be ok, @ since the "bit" will have been shifted out at the bottom. cmp dividend, divisor - blo LSYM(Lover1) + blo LSYM(over1) sub dividend, dividend, divisor orr result, result, curbit -LSYM(Lover1): +LSYM(over1): lsr work, divisor, #1 cmp dividend, work - blo LSYM(Lover2) + blo LSYM(over2) sub dividend, dividend, work lsr work, curbit, #1 orr result, work -LSYM(Lover2): +LSYM(over2): lsr work, divisor, #2 cmp dividend, work - blo LSYM(Lover3) + blo LSYM(over3) sub dividend, dividend, work lsr work, curbit, #2 orr result, work -LSYM(Lover3): +LSYM(over3): lsr work, divisor, #3 cmp dividend, work - blo LSYM(Lover4) + blo LSYM(over4) sub dividend, dividend, work lsr work, curbit, #3 orr result, work -LSYM(Lover4): +LSYM(over4): .endif cmp dividend, #0 @ Early termination? - beq LSYM(Lover5) + beq LSYM(over5) lsr curbit, #4 @ No, any more bits to do? - beq LSYM(Lover5) + beq LSYM(over5) lsr divisor, #4 - b LSYM(Loop3) -LSYM(Lover5): + b LSYM(oop3) +LSYM(over5): .if \modulo @ Any subtractions that we should not have done will be recorded in @ the top three bits of "overdone". Exactly which were not needed @@ -741,7 +743,7 @@ mov work, #0xe lsl work, #28 and overdone, work - beq LSYM(Lgot_result) + beq LSYM(got_result) @ If we terminated early, because dividend became zero, then the @ bit in ip will not be in the bottom nibble, and we should not @@ -752,33 +754,33 @@ mov curbit, ip mov work, #0x7 tst curbit, work - beq LSYM(Lgot_result) + beq LSYM(got_result) mov curbit, ip mov work, #3 ror curbit, work tst overdone, curbit - beq LSYM(Lover6) + beq LSYM(over6) lsr work, divisor, #3 add dividend, work -LSYM(Lover6): +LSYM(over6): mov curbit, ip mov work, #2 ror curbit, work tst overdone, curbit - beq LSYM(Lover7) + beq LSYM(over7) lsr work, divisor, #2 add dividend, work -LSYM(Lover7): +LSYM(over7): mov curbit, ip mov work, #1 ror curbit, work tst overdone, curbit - beq LSYM(Lgot_result) + beq LSYM(got_result) lsr work, divisor, #1 add dividend, work .endif -LSYM(Lgot_result): +LSYM(got_result): .endm /* ------------------------------------------------------------------------ */ /* Start of the Real Functions */ @@ -791,13 +793,13 @@ #ifdef __thumb__ cmp divisor, #0 - beq LSYM(Ldiv0) + beq LSYM(div0) mov curbit, #1 mov result, #0 push { work } cmp dividend, divisor - blo LSYM(Lgot_result) + blo LSYM(got_result) THUMB_DIV_MOD_BODY 0 @@ -809,7 +811,7 @@ subs r2, r1, #1 RETc(eq) - bcc LSYM(Ldiv0) + bcc LSYM(div0) cmp r0, r1 bls 11f tst r1, r2 @@ -860,13 +862,13 @@ #ifdef __thumb__ cmp divisor, #0 - beq LSYM(Ldiv0) + beq LSYM(div0) mov curbit, #1 cmp dividend, divisor - bhs LSYM(Lover10) + bhs LSYM(over10) RET -LSYM(Lover10): +LSYM(over10): push { work } THUMB_DIV_MOD_BODY 1 @@ -877,7 +879,7 @@ #else /* ARM version. */ subs r2, r1, #1 @ compare divisor with 1 - bcc LSYM(Ldiv0) + bcc LSYM(div0) cmpne r0, r1 @ compare dividend with divisor moveq r0, #0 tsthi r1, r2 @ see if divisor is power of 2 @@ -901,7 +903,7 @@ #ifdef __thumb__ cmp divisor, #0 - beq LSYM(Ldiv0) + beq LSYM(div0) push { work } mov work, dividend @@ -910,24 +912,24 @@ mov curbit, #1 mov result, #0 cmp divisor, #0 - bpl LSYM(Lover10) + bpl LSYM(over10) neg divisor, divisor @ Loops below use unsigned. -LSYM(Lover10): +LSYM(over10): cmp dividend, #0 - bpl LSYM(Lover11) + bpl LSYM(over11) neg dividend, dividend -LSYM(Lover11): +LSYM(over11): cmp dividend, divisor - blo LSYM(Lgot_result) + blo LSYM(got_result) THUMB_DIV_MOD_BODY 0 mov r0, result mov work, ip cmp work, #0 - bpl LSYM(Lover12) + bpl LSYM(over12) neg r0, r0 -LSYM(Lover12): +LSYM(over12): pop { work } RET @@ -935,7 +937,7 @@ cmp r1, #0 eor ip, r0, r1 @ save th... [truncated message content] |
From: <dan...@us...> - 2008-02-27 21:58:54
|
Revision: 1142 http://cegcc.svn.sourceforge.net/cegcc/?rev=1142&view=rev Author: dannybackx Date: 2008-02-27 12:41:35 -0800 (Wed, 27 Feb 2008) Log Message: ----------- Add roadmap. Modified Paths: -------------- trunk/cegcc/website/software-that-works.html Modified: trunk/cegcc/website/software-that-works.html =================================================================== --- trunk/cegcc/website/software-that-works.html 2008-02-21 20:14:24 UTC (rev 1141) +++ trunk/cegcc/website/software-that-works.html 2008-02-27 20:41:35 UTC (rev 1142) @@ -82,6 +82,11 @@ <td>Works with CeGCC ?</td> </tr> <tr> +<td class="project"> <a href="http://sourceforge.net/projects/roadmap">roadmap</a> </td> +<td class="description"> A navigation system that displays street maps and tracks a vehicle using GPS. Specific locations can be selected by street address. Routes and tracks can be created, edited, and saved in GPX format. Runs on most POSIX systems, the iPAQ, and the Zaurus.</td> +<td class="works">?</td> +</tr> +<tr> <td class="project"> <a href="http://sourceforge.net/projects/navit">navit</a> </td> <td class="description"> Modular, touch screen friendly car navigation systm with GPS tracking, realtime routing engine and support for various vector map formats. There's a GTK+ and a SDL user interface and also a GL accelerated 3d view.</td> <td class="works">?</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-02-21 20:18:47
|
Revision: 1141 http://cegcc.svn.sourceforge.net/cegcc/?rev=1141&view=rev Author: dannybackx Date: 2008-02-21 12:14:24 -0800 (Thu, 21 Feb 2008) Log Message: ----------- Add VER_PLATFORM_WIN32_CE Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/winnt.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2008-02-17 17:00:23 UTC (rev 1140) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2008-02-21 20:14:24 UTC (rev 1141) @@ -1,3 +1,7 @@ +2008-02-21 Danny Backx <dan...@us...> + + * include/winnt.h (VER_PLATFORM_WIN32_CE): Define. + 2008-02-17 Danny Backx <dan...@us...> * include/aygshell.h (SHInitExtraControls): Move into the extern "C" Modified: trunk/cegcc/src/w32api/include/winnt.h =================================================================== --- trunk/cegcc/src/w32api/include/winnt.h 2008-02-17 17:00:23 UTC (rev 1140) +++ trunk/cegcc/src/w32api/include/winnt.h 2008-02-21 20:14:24 UTC (rev 1141) @@ -1664,6 +1664,7 @@ #define VER_PLATFORM_WIN32s 0 #define VER_PLATFORM_WIN32_WINDOWS 1 #define VER_PLATFORM_WIN32_NT 2 +#define VER_PLATFORM_WIN32_CE 3 #define VER_NT_WORKSTATION 1 #define VER_NT_DOMAIN_CONTROLLER 2 #define VER_NT_SERVER 3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-02-17 17:00:40
|
Revision: 1140 http://cegcc.svn.sourceforge.net/cegcc/?rev=1140&view=rev Author: dannybackx Date: 2008-02-17 09:00:23 -0800 (Sun, 17 Feb 2008) Log Message: ----------- * include/aygshell.h (SHInitExtraControls): Move into the extern "C" construction. * include/aygshell.h (SHDoneButton, WS_NONAVDONEBUTTON, SHDB_SHOW, SHDB_HIDE): Define. Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/aygshell.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2008-02-08 22:28:01 UTC (rev 1139) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2008-02-17 17:00:23 UTC (rev 1140) @@ -1,3 +1,10 @@ +2008-02-17 Danny Backx <dan...@us...> + + * include/aygshell.h (SHInitExtraControls): Move into the extern "C" + construction. + * include/aygshell.h (SHDoneButton, WS_NONAVDONEBUTTON, SHDB_SHOW, + SHDB_HIDE): Define. + 2008-01-09 Danny Backx <dan...@us...> * include/aygshell.h (SIPINFO): Remove, this was a duplicate. Modified: trunk/cegcc/src/w32api/include/aygshell.h =================================================================== --- trunk/cegcc/src/w32api/include/aygshell.h 2008-02-08 22:28:01 UTC (rev 1139) +++ trunk/cegcc/src/w32api/include/aygshell.h 2008-02-17 17:00:23 UTC (rev 1140) @@ -5,16 +5,16 @@ #pragma GCC system_header #endif +#ifdef __cplusplus +extern "C" { +#endif + #if _WIN32_WCE >= 400 #include <windows.h> #include <basetyps.h> /* Make sure we have a CLSID definition */ #include <shellapi.h> /* for WINSHELLAPI */ -#ifdef __cplusplus -extern "C" { -#endif - /* * Menu Bar */ @@ -229,14 +229,21 @@ HBITMAP SHLoadImageResource(HINSTANCE hinst, UINT uIdImageFile); #endif /* _WIN32_WCE >= 0x0300 */ -#ifdef __cplusplus -} -#endif - #endif /* _WIN32_WCE >= 400 */ #if (_WIN32_WCE >= 0x0300) BOOL SHInitExtraControls(void); + +#define WS_NONAVDONEBUTTON WS_MINIMIZEBOX + +BOOL SHDoneButton(HWND, DWORD); +#define SHDB_SHOW 1 +#define SHDB_HIDE 2 + +#endif /* _WIN32_WCE >= 0x0300 */ + +#ifdef __cplusplus +} #endif #endif /* _AYGSHELL_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2008-02-08 23:00:07
|
Revision: 1139 http://cegcc.svn.sourceforge.net/cegcc/?rev=1139&view=rev Author: pedroalves Date: 2008-02-08 14:28:01 -0800 (Fri, 08 Feb 2008) Log Message: ----------- Move into component's top dir Added Paths: ----------- trunk/cegcc/src/gdb/ChangeLog.ce Removed Paths: ------------- trunk/cegcc/src/gdb/gdb/ChangeLog.ce Copied: trunk/cegcc/src/gdb/ChangeLog.ce (from rev 1138, trunk/cegcc/src/gdb/gdb/ChangeLog.ce) =================================================================== --- trunk/cegcc/src/gdb/ChangeLog.ce (rev 0) +++ trunk/cegcc/src/gdb/ChangeLog.ce 2008-02-08 22:28:01 UTC (rev 1139) @@ -0,0 +1,3 @@ +2007-12-21 Danny Backx <dan...@us...> + + * configure.tgt : Add arm-*-mingw32ce* and arm-*-cegcc* . Deleted: trunk/cegcc/src/gdb/gdb/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gdb/gdb/ChangeLog.ce 2008-01-29 19:46:17 UTC (rev 1138) +++ trunk/cegcc/src/gdb/gdb/ChangeLog.ce 2008-02-08 22:28:01 UTC (rev 1139) @@ -1,3 +0,0 @@ -2007-12-21 Danny Backx <dan...@us...> - - * configure.tgt : Add arm-*-mingw32ce* and arm-*-cegcc* . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-29 19:46:31
|
Revision: 1138 http://cegcc.svn.sourceforge.net/cegcc/?rev=1138&view=rev Author: dannybackx Date: 2008-01-29 11:46:17 -0800 (Tue, 29 Jan 2008) Log Message: ----------- Add navit Modified Paths: -------------- trunk/cegcc/website/software-that-works.html Modified: trunk/cegcc/website/software-that-works.html =================================================================== --- trunk/cegcc/website/software-that-works.html 2008-01-27 14:40:52 UTC (rev 1137) +++ trunk/cegcc/website/software-that-works.html 2008-01-29 19:46:17 UTC (rev 1138) @@ -82,6 +82,11 @@ <td>Works with CeGCC ?</td> </tr> <tr> +<td class="project"> <a href="http://sourceforge.net/projects/navit">navit</a> </td> +<td class="description"> Modular, touch screen friendly car navigation systm with GPS tracking, realtime routing engine and support for various vector map formats. There's a GTK+ and a SDL user interface and also a GL accelerated 3d view.</td> +<td class="works">?</td> +</tr> +<tr> <td class="project"> <a href="http://sourceforge.net/projects/cmusphinx">CMU Sphinx</a> </td> <td class="description"> Sphinx is a speaker-independent large vocabulary continuous speech recognizer released under a BSD style license. It is also a collection of open source tools and resources that allows researchers and developers to build speech recognition systems.</td> <td class="works">?</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-27 14:40:55
|
Revision: 1137 http://cegcc.svn.sourceforge.net/cegcc/?rev=1137&view=rev Author: dannybackx Date: 2008-01-27 06:40:52 -0800 (Sun, 27 Jan 2008) Log Message: ----------- Add a few more links. Modified Paths: -------------- trunk/cegcc/docs/exception.html Modified: trunk/cegcc/docs/exception.html =================================================================== --- trunk/cegcc/docs/exception.html 2008-01-27 14:21:31 UTC (rev 1136) +++ trunk/cegcc/docs/exception.html 2008-01-27 14:40:52 UTC (rev 1137) @@ -79,7 +79,7 @@ This technology is not mature in cegcc, we know that applications that use stdio based I/O combined with an exception handler - don't work. + don't work reliably. <p> Also no effort has been spent yet to integrate this into the <i>arm-cegcc</i> (formerly <i>arm-wince-cegcc</i>) target, @@ -112,6 +112,8 @@ <ul> <li> <a href"http://www.howzatt.demon.co.uk/articles/oct04.html">Microsoft Visual C++ and Win32 structured exception handling</a> </li> <li> <a href="http://pisoft.ru/verstak/insider/cw_seh.htm">Win32 Structured Exception Handling (or, How to handle a GPF programmatically)</a> </li> + <li> <a href="http://www.microsoft.com/msj/0197/exception/exception.aspx">A Crash Course on the Depths of Win32™ Structured Exception Handling</a> </li> + <li> <a href="http://msdn.microsoft.com/msdnmag/issues/01/09/hood/">New Vectored Exception Handling in Windows XP</a> </li> <li> <a href="http://blogs.msdn.com/david_leblanc/archive/2007/04/03/exception-handlers-are-baaad.aspx">Exception handlers are baaad</a> </li> </ul> </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-27 14:21:36
|
Revision: 1136 http://cegcc.svn.sourceforge.net/cegcc/?rev=1136&view=rev Author: dannybackx Date: 2008-01-27 06:21:31 -0800 (Sun, 27 Jan 2008) Log Message: ----------- A beginning of documentation for exception handling. Added Paths: ----------- trunk/cegcc/docs/exception.html Added: trunk/cegcc/docs/exception.html =================================================================== --- trunk/cegcc/docs/exception.html (rev 0) +++ trunk/cegcc/docs/exception.html 2008-01-27 14:21:31 UTC (rev 1136) @@ -0,0 +1,139 @@ +<html> + <head> + <title>Exception Handling</title> + <meta name="vs_showGrid" content="True"> + </head> + <body> + <img src="../images/banner1.png" alt="CeGCC cross compiler for PocketPC"> + <h2>Exception Handling with CeGCC</h2> + <p> + <h3>Overview</h3> + <p> + When an application on our target platform performs + an illegal action trapped by the operating system, + a predefined exception handling scenario is executed. + <p> + On a Linux or UNIX system, the process gets a signal. + This behaviour is well known and documented, you can trap most signals with a signal handler. + On a Windows CE device, either your application installs an exception handler, + or it silently dies. + <p> + This is where our exception handling fits in. + <a href="http://msdn2.microsoft.com/en-us/visualc/default.aspx">That other CE development tool</a> + is rumoured to install a default exception handler. + <h3>How to use</h3> + <p> + We've extended gcc so you can say which function is the exception handler for another function. + An example : + <pre> +#include <windows.h> +#include <excpt.h> + +void handler(void) +{ + MessageBoxW(0, L"Crash !", L"Handler : error", 0); +} + +<i>int main(int argc, char *argv[]) + __attribute__((__exception_handler__(handler)));</i> + +int main(int argc, char *argv[]) +{ + int *i = 0; + *i = 1; +} + </pre> + <p> + The separate declaration of <i>main</i> basically says that exceptions that occur + in <i>main</i> will be handled by the <i>handler</i> function. + Note that this handler function is overly simplified for the sake of clarity. + <p> + A correctly declared handler should have four parameters, + and return the correct value. + A more correct and interesting example of the handler function is + <pre> +int handler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + static wchar_t msg[256]; + static int i = 0; + + wsprintf(msg, L"Crash, count %d\nExc Code %x Addr %x Nparams %d\n", + i, + ExceptionRecord->ExceptionCode, + ExceptionRecord->ExceptionAddress, + ExceptionRecord->NumberParameters); + MessageBoxW(0, msg, L"WinCE Exception", 0); + i++; + return EXCEPTION_EXECUTE_HANDLER; +} + </pre> + <p> + Please note that use of EXCEPTION_CONTINUE_SEARCH as a return value for this function + is dangerous : it should be used with extreme care, + it will likely cause infinite recursion problems. + <h3>Current limitations</h3> + <p> + This technology is not mature in cegcc, + we know that applications that use stdio based I/O + combined with an exception handler + don't work. + <p> + Also no effort has been spent yet to integrate this into the <i>arm-cegcc</i> + (formerly <i>arm-wince-cegcc</i>) target, + only the <i>arm-mingw32ce</i> (formerly <i>arm-wince-mingw32ce</i>) target + is supported. + <h3>Technical detail</h3> + <h4>Augmenting the C syntax</h4> + <h4>ARM specifics</h4> + <h4>arm-mingw32ce runtime</h4> + <h4>arm-cegcc runtime</h4> + <p> + Exception handling has not been implemented yet in the arm-cegcc runtime. + <h3>Reference material</h3> + <p> + This is not specific to Windows CE or ARM, + this behaviour is documented in the reference material by + <a href="http://www.arm.com">ARM Ltd</a>, + see e.g. <a href="http://www.arm.com/documentation/White_Papers/index.html">White Papers</a>. + <p> + The <a href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf"> + Exception handling ABI for the ARM architecture</a> + contains a the most accurate description I could find. + <p> + Also several sources point to the + <a href="http://www.codesourcery.com/cxx-abi/abi-eh.html">Intel Itanium reference material</a> + which is said to be very generic in nature. + <p> + Also there are a lot of articles on forum sites which describe how to deal with + exception in similar environments, usually Windows on x86 : + <ul> + <li> <a href"http://www.howzatt.demon.co.uk/articles/oct04.html">Microsoft Visual C++ and Win32 structured exception handling</a> </li> + <li> <a href="http://pisoft.ru/verstak/insider/cw_seh.htm">Win32 Structured Exception Handling (or, How to handle a GPF programmatically)</a> </li> + <li> <a href="http://blogs.msdn.com/david_leblanc/archive/2007/04/03/exception-handlers-are-baaad.aspx">Exception handlers are baaad</a> </li> + </ul> + </p> + </body> +<table border=0 cellspacing=10 width="100%"> <tr> + <td align=left valign=top bgcolor="#ededed" width="50%"> + <h2 align=center>Information</h2> + <ul> + <li> <a href="http://cegcc.sourceforge.net"> CeGCC Home Page on SourceForge </a> + <li> <a href="index.html"> CeGCC Documentation </a> + <li> <a href="http://sourceforge.net/projects/cegcc"> Project page on SourceForge </a> + <li> <a href="http://cegcc.wiki.sourceforge.net"> CeGCC wiki </a> + </ul> + </td> + <td align=left valign=top bgcolor="#ededed" width="50%"> + <h2 align=center>Support</h2> + <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. + <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. + <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> + <li><a href="reporting.html">Information to including when asking help or when reporting problems</a></li> + </ul> + </td> +</tr></table> +</html> Property changes on: trunk/cegcc/docs/exception.html ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-24 20:15:08
|
Revision: 1135 http://cegcc.svn.sourceforge.net/cegcc/?rev=1135&view=rev Author: dannybackx Date: 2008-01-24 12:14:46 -0800 (Thu, 24 Jan 2008) Log Message: ----------- Get rid of the private file which I didn't want to import, instead the missing definition should go in the mingw includes, see a proposal on the mailing list. Modified Paths: -------------- trunk/cegcc/test/exception/dialog1.c trunk/cegcc/test/exception/exrecord.c trunk/cegcc/test/exception/file.c trunk/cegcc/test/exception/stdio.c trunk/cegcc/test/exception/twohandlers.c Modified: trunk/cegcc/test/exception/dialog1.c =================================================================== --- trunk/cegcc/test/exception/dialog1.c 2008-01-24 18:43:47 UTC (rev 1134) +++ trunk/cegcc/test/exception/dialog1.c 2008-01-24 20:14:46 UTC (rev 1135) @@ -2,7 +2,7 @@ #include <stdio.h> #include <stdlib.h> -#include "myexcpt.h" +#include <excpt.h> void handler(struct _EXCEPTION_RECORD *ExceptionRecord, void *EstablisherFrame, Modified: trunk/cegcc/test/exception/exrecord.c =================================================================== --- trunk/cegcc/test/exception/exrecord.c 2008-01-24 18:43:47 UTC (rev 1134) +++ trunk/cegcc/test/exception/exrecord.c 2008-01-24 20:14:46 UTC (rev 1135) @@ -2,7 +2,7 @@ #include <stdio.h> #include <stdlib.h> -#include "myexcpt.h" +#include <excpt.h> wchar_t msg[256]; int i = 0; Modified: trunk/cegcc/test/exception/file.c =================================================================== --- trunk/cegcc/test/exception/file.c 2008-01-24 18:43:47 UTC (rev 1134) +++ trunk/cegcc/test/exception/file.c 2008-01-24 20:14:46 UTC (rev 1135) @@ -2,7 +2,7 @@ #include <stdio.h> #include <stdlib.h> -#include "myexcpt.h" +#include <excpt.h> HANDLE h = 0; Modified: trunk/cegcc/test/exception/stdio.c =================================================================== --- trunk/cegcc/test/exception/stdio.c 2008-01-24 18:43:47 UTC (rev 1134) +++ trunk/cegcc/test/exception/stdio.c 2008-01-24 20:14:46 UTC (rev 1135) @@ -2,7 +2,7 @@ #include <stdio.h> #include <stdlib.h> -#include "myexcpt.h" +#include <excpt.h> int i = 0; FILE *f = NULL; Modified: trunk/cegcc/test/exception/twohandlers.c =================================================================== --- trunk/cegcc/test/exception/twohandlers.c 2008-01-24 18:43:47 UTC (rev 1134) +++ trunk/cegcc/test/exception/twohandlers.c 2008-01-24 20:14:46 UTC (rev 1135) @@ -2,7 +2,7 @@ #include <stdio.h> #include <stdlib.h> -// #include "myexcpt.h" +// #include <excpt.h> struct _DISPATCHER_CONTEXT; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-24 18:43:55
|
Revision: 1134 http://cegcc.svn.sourceforge.net/cegcc/?rev=1134&view=rev Author: dannybackx Date: 2008-01-24 10:43:47 -0800 (Thu, 24 Jan 2008) Log Message: ----------- Add some test files for exception handling. Work in progress. This is meant to be a mixture between example and test. Added Paths: ----------- trunk/cegcc/test/exception/ trunk/cegcc/test/exception/Makefile trunk/cegcc/test/exception/dialog1.c trunk/cegcc/test/exception/exrecord.c trunk/cegcc/test/exception/file.c trunk/cegcc/test/exception/stdio.c trunk/cegcc/test/exception/twohandlers.c Added: trunk/cegcc/test/exception/Makefile =================================================================== --- trunk/cegcc/test/exception/Makefile (rev 0) +++ trunk/cegcc/test/exception/Makefile 2008-01-24 18:43:47 UTC (rev 1134) @@ -0,0 +1,62 @@ +.SUFFIXES: .exe .c .h .rc .rsc .C .od .o + +DIR="/storage card/e" + +ARCH= arm-mingw32ce +# +# Note - exception handling doesn't work with cegcc yet, +# only with mingw32ce +# +# ARCH= arm-cegcc + +CC= ${ARCH}-gcc ${CFLAGS} +WINDRES= ${ARCH}-windres + +CFLAGS= -g -D_WIN32_IE=0x0400 -D_WIN32_WCE=0x0400 \ + -DDATAPATH='"'$(DIR)'"' + +.rc.rsc: + ${ARCH}-windres $? $@ + +.o.exe: + ${ARCH}-gcc ${CFLAGS} -o $@ $? + +.c.exe: + ${ARCH}-gcc ${CFLAGS} -o $@ $? + +.C.exe: + ${ARCH}-g++ ${CFLAGS} -o $@ $? + +.exe.od: + ${ARCH}-objdump -p $? >$@ + +CSRC= dialog1.c exrecord.c stdio.c twohandlers.c file.c +# CSRC= ex1.c ex2.c ex3.c syntax.c stdio.c ex8.c ex9.c ex8b.c +CPPSRC= # hello.C + +CEXE= ${CSRC:.c=.exe} +COBJ= ${CSRC:.c=.o} +COBJDUMP= ${CSRC:.c=.od} + +CPPEXE= ${CPPSRC:.C=.exe} +CPPOBJ= ${CPPSRC:.C=.o} +CPPOBJDUMP= ${CPPSRC:.C=.od} + +all:: ${CEXE} ${CPPEXE} + +# all:: ${COBJDUMP} ${CPPOBJDUMP} + +clean:: + -rm -f ${CEXE} ${CPPEXE} + -rm -f ${COBJ} ${CPPOBJ} + -rm -f ${COBJDUMP} ${CPPOBJDUMP} + +dist: ${CEXE} ${CPPEXE} + for i in ${CEXE} ${CPPEXE} ; \ + do \ + pcp $$i :${DIR}/$$i ; \ + done + +clean:: + -rm -f *.exe + -rm -f *.od Property changes on: trunk/cegcc/test/exception/Makefile ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/test/exception/dialog1.c =================================================================== --- trunk/cegcc/test/exception/dialog1.c (rev 0) +++ trunk/cegcc/test/exception/dialog1.c 2008-01-24 18:43:47 UTC (rev 1134) @@ -0,0 +1,26 @@ +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> + +#include "myexcpt.h" + +void handler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + MessageBoxW(0, L" ? ", L"Handler : error", 0); + exit(0); +} + +int main(int argc, char *argv[]) + __attribute__((__exception_handler__(handler))); + +int main(int argc, char *argv[]) +{ + int *i; + + i = 0; + *i = 1; + exit(0); +} Property changes on: trunk/cegcc/test/exception/dialog1.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/test/exception/exrecord.c =================================================================== --- trunk/cegcc/test/exception/exrecord.c (rev 0) +++ trunk/cegcc/test/exception/exrecord.c 2008-01-24 18:43:47 UTC (rev 1134) @@ -0,0 +1,46 @@ +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> + +#include "myexcpt.h" + +wchar_t msg[256]; +int i = 0; + +int handler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + wsprintf(msg, L"Crash, count %d", i); + fprintf(stderr, "Crash, count %d\nExc Code %x Addr %x Nparams %d\n", + i, + ExceptionRecord->ExceptionCode, + ExceptionRecord->ExceptionAddress, + ExceptionRecord->NumberParameters); + MessageBoxW(0, msg, L"WinCE Exception", 0); + i++; +#if 1 + return EXCEPTION_EXECUTE_HANDLER; + return EXCEPTION_CONTINUE_EXECUTION; +#else +#warning This will cause a near-infinite loop + if (i < 5) + return EXCEPTION_CONTINUE_SEARCH; // Don't do this, infinite loop. + return EXCEPTION_CONTINUE_EXECUTION; +#endif +} + +int main(int argc, char *argv[]) + __attribute__((__exception_handler__(handler))); + +int main(int argc, char *argv[]) +{ + volatile int *i; + + i = 0; + *i = 1; + MessageBoxW(0, L"Main", L"Survived", 0); + fprintf(stderr, "Main: survived\n"); + exit(0); +} Property changes on: trunk/cegcc/test/exception/exrecord.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/test/exception/file.c =================================================================== --- trunk/cegcc/test/exception/file.c (rev 0) +++ trunk/cegcc/test/exception/file.c 2008-01-24 18:43:47 UTC (rev 1134) @@ -0,0 +1,37 @@ +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> + +#include "myexcpt.h" + +HANDLE h = 0; + +void handler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + DWORD w; + WriteFile(h, "Handler\r\n", 9, &w, NULL); + (void)CloseHandle(h); + exit(0); +} + +int main(int argc, char *argv[]) + __attribute__((__exception_handler__(handler))); + +int main(int argc, char *argv[]) +{ + int *i; + DWORD w; + + h = CreateFile(L"" DATAPATH "/ex8log.txt", GENERIC_WRITE, + 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + + i = 0; + WriteFile(h, "Main : start\r\n", 14, &w, NULL); + *i = 1; + WriteFile(h, "Main : end\r\n", 12, &w, NULL); + (void)CloseHandle(h); + exit(0); +} Property changes on: trunk/cegcc/test/exception/file.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/test/exception/stdio.c =================================================================== --- trunk/cegcc/test/exception/stdio.c (rev 0) +++ trunk/cegcc/test/exception/stdio.c 2008-01-24 18:43:47 UTC (rev 1134) @@ -0,0 +1,45 @@ +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> + +#include "myexcpt.h" + +int i = 0; +FILE *f = NULL; + +int handler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + fprintf(stderr, "Crash, count %d\nExc Code %x Addr %x Nparams %d\n", + i, + ExceptionRecord->ExceptionCode, + ExceptionRecord->ExceptionAddress, + ExceptionRecord->NumberParameters); + i++; + return EXCEPTION_EXECUTE_HANDLER; +} + +#define FN DATAPATH "/exc-log.txt" + +int main(int argc, char *argv[]) + __attribute__((__exception_handler__(handler))); + +int main(int argc, char *argv[]) +{ + volatile int *i; + + f = fopen(FN, "w"); + if (f == NULL) { + fprintf(stderr, "File " FN " not open\n"); + exit(0); + } + + i = 0; + fprintf(stderr, "Start\n"); + *i = 1; + fprintf(stderr, "Main: survived\n"); + fclose(f); + exit(0); +} Property changes on: trunk/cegcc/test/exception/stdio.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/test/exception/twohandlers.c =================================================================== --- trunk/cegcc/test/exception/twohandlers.c (rev 0) +++ trunk/cegcc/test/exception/twohandlers.c 2008-01-24 18:43:47 UTC (rev 1134) @@ -0,0 +1,60 @@ +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> + +// #include "myexcpt.h" + +struct _DISPATCHER_CONTEXT; + +FILE *f = NULL; + +int mhandler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + + MessageBoxW(0, L"Crash", L"Handler-main", 0); +// fprintf(stderr, "Crash Handler-main\n"); + return EXCEPTION_EXECUTE_HANDLER; +} + +int chandler(struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext) +{ + + MessageBoxW(0, L"Crash", L"Handler-crash", 0); +// fprintf(stderr, "Crash Handler-crash\n"); + return EXCEPTION_EXECUTE_HANDLER; +} + +int main(int argc, char *argv[]) + __attribute__((__exception_handler__(mhandler))); +void crash(void) + __attribute__((__exception_handler__(chandler))); + +void crash(void) +{ + int *i; + + i = 0; +// fprintf(stderr, "Crash : started\n"); + *i = 1; +// fprintf(stderr, "Crash : end\n"); +} + +int main(int argc, char *argv[]) +{ + int *i; + +// f = fopen(DATAPATH "/ex1log.txt", "w"); +// if (f == NULL) +// fprintf(stderr, "NULL file\n"); + +// fprintf(stderr, "Main : start\n"); + crash(); +// fprintf(stderr, "Main : survived\n"); + exit(0); +} Property changes on: trunk/cegcc/test/exception/twohandlers.c ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-21 16:19:20
|
Revision: 1133 http://cegcc.svn.sourceforge.net/cegcc/?rev=1133&view=rev Author: dannybackx Date: 2008-01-21 08:19:11 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Add this file in the state that I sent it on the mailing list. Added Paths: ----------- trunk/cegcc/docs/test.html Added: trunk/cegcc/docs/test.html =================================================================== --- trunk/cegcc/docs/test.html (rev 0) +++ trunk/cegcc/docs/test.html 2008-01-21 16:19:11 UTC (rev 1133) @@ -0,0 +1,95 @@ +<HTML> + <HEAD> + <TITLE>Tests on CeGCC</TITLE> + </HEAD> + <BODY> + <H1>Overview</H1> + <P> + The goal of this file is twofold : + <UL> + <LI>to outline a test plan</LI> + <LI>to keep track of what's been verified for some release</LI> + </UL> + + <H1>Test plan</H1> + <TABLE BORDER=1> + <TR> + <TD></TD> + <TD>arm-mingw32ce</TD> + <TD>arm-cegcc</TD> + </TR> + <TR> + <TD>binutils</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>binutils/windres</TD> + <TD>ok Pedro 10/1/2008</TD> + <TD>ok Pedro 10/1/2008</TD> + </TR> + <TR> + <TD>gcc</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>gcc/abicheck</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>gcc/coverage</TD> + <TD>ok Danny 16/1/2008</TD> + <TD></TD> + </TR> + <TR> + <TD>gcc/profile</TD> + <TD>fails</TD> + <TD>fails</TD> + </TR> + <TR> + <TD>gcc/Create DLLs</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>gcc/exception handling</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>g++</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>gdb</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>tools/PipeLib</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>tools/libcwd</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>tools/rsh,rshd</TD> + <TD></TD> + <TD></TD> + </TR> + <TR> + <TD>tools/rcp</TD> + <TD></TD> + <TD></TD> + </TR> + </TABLE> + <H1>Status per release</H1> + <H2>Release 0.55</H2> + </BODY> +</HTML> Property changes on: trunk/cegcc/docs/test.html ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-16 07:38:09
|
Revision: 1132 http://cegcc.svn.sourceforge.net/cegcc/?rev=1132&view=rev Author: dannybackx Date: 2008-01-15 23:38:06 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Remove non-source files. Small patch to make fibo.c portable and adapt the Makefile to new targets. Modified Paths: -------------- trunk/cegcc/docs/examples/coverage/Makefile trunk/cegcc/docs/examples/coverage/fibo.c Removed Paths: ------------- trunk/cegcc/docs/examples/coverage/a.gcno trunk/cegcc/docs/examples/coverage/b.gcno trunk/cegcc/docs/examples/coverage/fibo.c.gcov trunk/cegcc/docs/examples/coverage/fibo.exe trunk/cegcc/docs/examples/coverage/fibo.gcda trunk/cegcc/docs/examples/coverage/fibo.gcno trunk/cegcc/docs/examples/coverage/m1.exe trunk/cegcc/docs/examples/coverage/m1.gcno Modified: trunk/cegcc/docs/examples/coverage/Makefile =================================================================== --- trunk/cegcc/docs/examples/coverage/Makefile 2008-01-13 13:07:17 UTC (rev 1131) +++ trunk/cegcc/docs/examples/coverage/Makefile 2008-01-16 07:38:06 UTC (rev 1132) @@ -1,10 +1,11 @@ .SUFFIXES: .exe .c .h .rc .rsc .C -ARCH= arm-wince-cegcc +ARCH= arm-mingw32ce CC= ${ARCH}-gcc ${CFLAGS} EXECS= fibo.exe m1.exe -CFLAGS= -g -D_WIN32_IE=0x0400 --coverage +CFLAGS= -g -D_WIN32_IE=0x0400 --coverage \ + -fcoverage-base="/storage card/devel" .o.exe: ${ARCH}-gcc ${CFLAGS} -o $@ $? Deleted: trunk/cegcc/docs/examples/coverage/a.gcno =================================================================== (Binary files differ) Deleted: trunk/cegcc/docs/examples/coverage/b.gcno =================================================================== (Binary files differ) Modified: trunk/cegcc/docs/examples/coverage/fibo.c =================================================================== --- trunk/cegcc/docs/examples/coverage/fibo.c 2008-01-13 13:07:17 UTC (rev 1131) +++ trunk/cegcc/docs/examples/coverage/fibo.c 2008-01-16 07:38:06 UTC (rev 1132) @@ -16,11 +16,11 @@ { FILE *f; int i, r, len; - wchar_t *ws, buf[MAXPATHLEN]; + wchar_t *ws, buf[MAX_PATH]; char *s; f = fopen(FN, "w"); - len = GetModuleFileNameW(NULL, buf, MAXPATHLEN); + len = GetModuleFileNameW(NULL, buf, MAX_PATH); s = malloc(len+1); wcstombs(s, buf, len+1); fprintf(f, "Command [%s] ", s); Deleted: trunk/cegcc/docs/examples/coverage/fibo.c.gcov =================================================================== --- trunk/cegcc/docs/examples/coverage/fibo.c.gcov 2008-01-13 13:07:17 UTC (rev 1131) +++ trunk/cegcc/docs/examples/coverage/fibo.c.gcov 2008-01-16 07:38:06 UTC (rev 1132) @@ -1,52 +0,0 @@ - -: 0:Source:fibo.c - -: 0:Graph:fibo.gcno - -: 0:Data:fibo.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:#include <windows.h> - -: 2:#include <stdio.h> - -: 3:#include <stdlib.h> - -: 4:#include <unistd.h> - -: 5: - -: 6:#define FN "/storage card/devel/fibo.txt" - -: 7: - -: 8:int fibo(int n) - 21871: 9:{ - 21871: 10: if (n < 3) - 21871: 10-block 0 - 10945: 11: return 1; - 10945: 11-block 0 - 21871: 12: return fibo(n-1) + fibo(n-2); - 10926: 12-block 0 - 21871: 12-block 1 - -: 13:} - -: 14: - -: 15:int APIENTRY WinMain(HINSTANCE a,HINSTANCE b,LPWSTR c,int d) - 1: 16:{ - -: 17: FILE *f; - -: 18: int i, r, len; - -: 19: wchar_t *ws, buf[MAXPATHLEN]; - -: 20: char *s; - -: 21: - 1: 22: f = fopen(FN, "w"); - 1: 22-block 0 - 1: 23: len = GetModuleFileNameW(NULL, buf, MAXPATHLEN); - 1: 24: s = malloc(len+1); - 1: 25: wcstombs(s, buf, len+1); - 1: 26: fprintf(f, "Command [%s] ", s); - 1: 27: ws = GetCommandLineW(); - 1: 28: len = wcslen(ws); - 1: 29: s = malloc(len+1); - 1: 30: wcstombs(s, ws, len+1); - 1: 31: fprintf(f, "param [%s]\r\n", s); - -: 32: - 20: 33: for (i=1; i<20; i++) { - 20: 33-block 0 - 19: 34: r = fibo(i); - 19: 34-block 0 - 19: 35: fprintf(f, "fibo(%d) = %d\r\n", i, r); - -: 36: } - 1: 37: fclose(f); - 1: 37-block 0 - 1: 38: exit(0); - -: 39:} Deleted: trunk/cegcc/docs/examples/coverage/fibo.exe =================================================================== (Binary files differ) Deleted: trunk/cegcc/docs/examples/coverage/fibo.gcda =================================================================== (Binary files differ) Deleted: trunk/cegcc/docs/examples/coverage/fibo.gcno =================================================================== (Binary files differ) Deleted: trunk/cegcc/docs/examples/coverage/m1.exe =================================================================== (Binary files differ) Deleted: trunk/cegcc/docs/examples/coverage/m1.gcno =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2008-01-13 13:07:20
|
Revision: 1131 http://cegcc.svn.sourceforge.net/cegcc/?rev=1131&view=rev Author: dannybackx Date: 2008-01-13 05:07:17 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Adjustments so arm-mingw32ce and arm-cegcc will also work Modified Paths: -------------- trunk/cegcc/src/profile/ChangeLog.mingw32ce trunk/cegcc/src/profile/Makefile.in trunk/cegcc/src/profile/config.sub Modified: trunk/cegcc/src/profile/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/profile/ChangeLog.mingw32ce 2008-01-10 00:54:30 UTC (rev 1130) +++ trunk/cegcc/src/profile/ChangeLog.mingw32ce 2008-01-13 13:07:17 UTC (rev 1131) @@ -1,3 +1,8 @@ +2008-01-13 Danny Backx <dan...@us...> + + * profile/config.sub profile/Makefile.in : Adjust so arm-cegcc and + arm-mingw32ce will also work. + 2006-12-30 Danny Backx <dan...@us...> * configure.in profile/Makefile.in profile/configure.in : Avoid use of Modified: trunk/cegcc/src/profile/Makefile.in =================================================================== --- trunk/cegcc/src/profile/Makefile.in 2008-01-10 00:54:30 UTC (rev 1130) +++ trunk/cegcc/src/profile/Makefile.in 2008-01-13 13:07:17 UTC (rev 1131) @@ -53,18 +53,25 @@ inst_libdir:=$(tooldir)/lib/mingw inst_docdir:=$(tooldir)/share/doc/mingw-runtime else -ifneq (,$(findstring wince,$(target_alias))) -inst_bindir:=$(tooldir)/bin -inst_includedir:=$(tooldir)/include +ifeq (,$(findstring cegcc,$(target_alias))) +inst_bindir:=$(bindir) +inst_includedir:=$(includedir) inst_libdir:=$(tooldir)/lib -inst_docdir:=$(prefix)/share/doc/mingw-runtime +inst_docdir:=$(prefix)/doc/mingw-runtime else +ifeq (,$(findstring mingw32ce,$(target_alias))) inst_bindir:=$(bindir) inst_includedir:=$(includedir) -inst_libdir:=$(libdir) +inst_libdir:=$(tooldir)/lib inst_docdir:=$(prefix)/doc/mingw-runtime +else +inst_bindir:=$(tooldir)/bin +inst_includedir:=$(tooldir)/include +inst_libdir:=$(tooldir)/lib +inst_docdir:=$(prefix)/share/doc/mingw-runtime endif endif +endif # The Mingw headers are installed under a subdirectory of # $(tooldir)/include when configuring in Cygwin. Modified: trunk/cegcc/src/profile/config.sub =================================================================== --- trunk/cegcc/src/profile/config.sub 2008-01-10 00:54:30 UTC (rev 1130) +++ trunk/cegcc/src/profile/config.sub 2008-01-13 13:07:17 UTC (rev 1131) @@ -624,6 +624,14 @@ basic_machine=ns32k-utek os=-sysv ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1140,7 +1148,8 @@ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* \ + | -cegcc* | -mingw32ce* ) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2008-01-10 00:54:31
|
Revision: 1130 http://cegcc.svn.sourceforge.net/cegcc/?rev=1130&view=rev Author: pedroalves Date: 2008-01-09 16:54:30 -0800 (Wed, 09 Jan 2008) Log Message: ----------- * testsuite/binutils-all/windres/windres.c: Enable testing on *-*-mingw*. * windres.c (set_endianess): Better extract the target's architecture from the bfd target name. Modified Paths: -------------- trunk/cegcc/src/binutils/ChangeLog.ce trunk/cegcc/src/binutils/binutils/testsuite/binutils-all/windres/windres.exp trunk/cegcc/src/binutils/binutils/windres.c Modified: trunk/cegcc/src/binutils/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/ChangeLog.ce 2008-01-10 00:40:58 UTC (rev 1129) +++ trunk/cegcc/src/binutils/ChangeLog.ce 2008-01-10 00:54:30 UTC (rev 1130) @@ -1,3 +1,11 @@ +2008-01-10 Pedro Alves <ped...@po...> + + binutils/ + * testsuite/binutils-all/windres/windres.c: Enable testing on + *-*-mingw*. + * windres.c (set_endianess): Better extract the target's + architecture from the bfd target name. + 2007-12-25 Pedro Alves <ped...@po...> bfd/ Modified: trunk/cegcc/src/binutils/binutils/testsuite/binutils-all/windres/windres.exp =================================================================== --- trunk/cegcc/src/binutils/binutils/testsuite/binutils-all/windres/windres.exp 2008-01-10 00:40:58 UTC (rev 1129) +++ trunk/cegcc/src/binutils/binutils/testsuite/binutils-all/windres/windres.exp 2008-01-10 00:54:30 UTC (rev 1130) @@ -19,7 +19,7 @@ # Written by DJ Delorie <dj...@re...> -if {![istarget "i*86-*-*"] && ![istarget "x86_64-*-mingw*"] } { +if {![istarget "i*86-*-*"] && ![istarget "*-*-mingw*"] } { return } Modified: trunk/cegcc/src/binutils/binutils/windres.c =================================================================== --- trunk/cegcc/src/binutils/binutils/windres.c 2008-01-10 00:40:58 UTC (rev 1129) +++ trunk/cegcc/src/binutils/binutils/windres.c 2008-01-10 00:54:30 UTC (rev 1130) @@ -1076,8 +1076,20 @@ const char **arch = bfd_arch_list(); if (arch && tname) { - if (strchr (tname, '-') != NULL) - tname = strchr (tname, '-') + 1; + char *hyp = strchr (tname, '-'); + if (hyp != NULL) + { + tname = hyp + 1; + hyp = strchr (tname, '-'); + if (hyp != NULL) + { + size_t l = hyp - tname; + char *n = alloca (l + 1); + memcpy (n, tname, l); + n[l] = '\0'; + tname = n; + } + } while (*arch != NULL) { const char *in_a = strstr (*arch, tname); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2008-01-10 00:41:33
|
Revision: 1129 http://cegcc.svn.sourceforge.net/cegcc/?rev=1129&view=rev Author: pedroalves Date: 2008-01-09 16:40:58 -0800 (Wed, 09 Jan 2008) Log Message: ----------- Merge all the sub-changelogs into the component's top level one. Modified Paths: -------------- trunk/cegcc/src/binutils/ChangeLog.ce Removed Paths: ------------- trunk/cegcc/src/binutils/bfd/ChangeLog.ce trunk/cegcc/src/binutils/binutils/ChangeLog.ce trunk/cegcc/src/binutils/gas/ChangeLog.ce trunk/cegcc/src/binutils/ld/ChangeLog.ce Modified: trunk/cegcc/src/binutils/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/ChangeLog.ce 2008-01-10 00:31:13 UTC (rev 1128) +++ trunk/cegcc/src/binutils/ChangeLog.ce 2008-01-10 00:40:58 UTC (rev 1129) @@ -0,0 +1,52 @@ +2007-12-25 Pedro Alves <ped...@po...> + + bfd/ + * config.bfd: Add arm*-*-cegcc* target. + +2007-12-25 Pedro Alves <ped...@po...> + + binutils/ + * configure.in: Add arm*-*-cegcc* and arm*-*-mingw32ce* targets. + * configure: Regenerate. + +2007-12-25 Pedro Alves <ped...@po...> + + gas/ + * configure.tgt: Add arm*-*-cegcc* target. + +2007-12-25 Pedro Alves <ped...@po...> + + ld/ + * configure.tgt: Add arm*-*-cegcc* target. + +2007-12-17 Pedro Alves <ped...@po...> + + bfd/ + * config.bfd: Add arm-*-mingw32ce* target. + +2007-12-17 Pedro Alves <ped...@po...> + + gas/ + * configure.tgt: Add arm-*-mingw32ce* target. + +2007-12-17 Pedro Alves <ped...@po...> + + ld/ + * configure.tgt: Add arm-*-mingw32ce* target. + +2006-11-27 Pedro Alves <ped...@po...> + + ld/ + * pe-dll.c (autofilter_objlist) : Add crt3.o and dllcrt3.o. + +2006-10-31 Pedro Alves <ped...@po...> + + gas/ + * config/te-wince-pe-h (CPU_DEFAULT): Define to ARM_ARCH_V4. + (FPU_DEFAULT) Default to FPU_ARCH_VFP. + +2006-10-17 Pedro Alves <ped...@po...> + + ld/ + * pe-dll.c (autofilter_objlist) : Add gcrt3.o. + * ChangeLog.ce : New file. Deleted: trunk/cegcc/src/binutils/bfd/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/bfd/ChangeLog.ce 2008-01-10 00:31:13 UTC (rev 1128) +++ trunk/cegcc/src/binutils/bfd/ChangeLog.ce 2008-01-10 00:40:58 UTC (rev 1129) @@ -1,7 +0,0 @@ -2007-12-25 Pedro Alves <ped...@po...> - - * config.bfd: Add arm*-*-cegcc* target. - -2007-12-17 Pedro Alves <ped...@po...> - - * config.bfd: Add arm-*-mingw32ce* target. Deleted: trunk/cegcc/src/binutils/binutils/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/binutils/ChangeLog.ce 2008-01-10 00:31:13 UTC (rev 1128) +++ trunk/cegcc/src/binutils/binutils/ChangeLog.ce 2008-01-10 00:40:58 UTC (rev 1129) @@ -1,4 +0,0 @@ -2007-12-25 Pedro Alves <ped...@po...> - - * configure.in: Add arm*-*-cegcc* and arm*-*-mingw32ce* targets. - * configure: Regenerate. Deleted: trunk/cegcc/src/binutils/gas/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/gas/ChangeLog.ce 2008-01-10 00:31:13 UTC (rev 1128) +++ trunk/cegcc/src/binutils/gas/ChangeLog.ce 2008-01-10 00:40:58 UTC (rev 1129) @@ -1,12 +0,0 @@ -2007-12-25 Pedro Alves <ped...@po...> - - * configure.tgt: Add arm*-*-cegcc* target. - -2007-12-17 Pedro Alves <ped...@po...> - - * configure.tgt: Add arm-*-mingw32ce* target. - -2006-10-31 Pedro Alves <ped...@po...> - - * config/te-wince-pe-h (CPU_DEFAULT): Define to ARM_ARCH_V4. - (FPU_DEFAULT) Default to FPU_ARCH_VFP. Deleted: trunk/cegcc/src/binutils/ld/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/ld/ChangeLog.ce 2008-01-10 00:31:13 UTC (rev 1128) +++ trunk/cegcc/src/binutils/ld/ChangeLog.ce 2008-01-10 00:40:58 UTC (rev 1129) @@ -1,16 +0,0 @@ -2007-12-25 Pedro Alves <ped...@po...> - - * configure.tgt: Add arm*-*-cegcc* target. - -2007-12-17 Pedro Alves <ped...@po...> - - * configure.tgt: Add arm-*-mingw32ce* target. - -2006-11-27 Pedro Alves <ped...@po...> - - * pe-dll.c (autofilter_objlist) : Add crt3.o and dllcrt3.o. - -2006-10-17 Pedro Alves <ped...@po...> - - * pe-dll.c (autofilter_objlist) : Add gcrt3.o. - * ChangeLog.ce : New file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |