From 395fd11d2e8b706adc34e76c4679973fff752abe Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 21 Jul 2011 20:52:27 +0000 Subject: 2011-07-21 Jorge Lopez PR 1766/bsps * clock/ckinit.c: Add missing read of Timer_Counter_1. --- c/src/lib/libbsp/sparc/leon2/ChangeLog | 5 +++++ c/src/lib/libbsp/sparc/leon2/clock/ckinit.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/c/src/lib/libbsp/sparc/leon2/ChangeLog b/c/src/lib/libbsp/sparc/leon2/ChangeLog index 98571ad2fe..98d4d91726 100644 --- a/c/src/lib/libbsp/sparc/leon2/ChangeLog +++ b/c/src/lib/libbsp/sparc/leon2/ChangeLog @@ -1,3 +1,8 @@ +2011-07-21 Jorge Lopez + + PR 1766/bsps + * clock/ckinit.c: Add missing read of Timer_Counter_1. + 2011-04-25 Jennifer Averett PR 1783/bsps diff --git a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c index 0648b89d62..6bd7918aaa 100644 --- a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c +++ b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c @@ -64,6 +64,8 @@ uint32_t bsp_clock_nanoseconds_since_last_tick(void) uint32_t clicks; uint32_t usecs; + clicks = LEON_REG.Timer_Counter_1; + if ( LEON_Is_interrupt_pending( LEON_INTERRUPT_TIMER1 ) ) { clicks = LEON_REG.Timer_Counter_1; usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks); -- cgit v1.2.3 From ca356b5d3a04f34dd83ac88ec8c9415dd05110db Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 22 Jul 2011 13:12:26 +0000 Subject: 2011-07-22 Joel Sherrill PR 1845/bsps * make/custom/rtl22xx_t.cfg: Remove unused line with what is now invalid syntax. --- c/src/lib/libbsp/arm/rtl22xx/ChangeLog | 6 ++++++ c/src/lib/libbsp/arm/rtl22xx/make/custom/rtl22xx_t.cfg | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/c/src/lib/libbsp/arm/rtl22xx/ChangeLog b/c/src/lib/libbsp/arm/rtl22xx/ChangeLog index 3af83ae0db..841ee2d015 100644 --- a/c/src/lib/libbsp/arm/rtl22xx/ChangeLog +++ b/c/src/lib/libbsp/arm/rtl22xx/ChangeLog @@ -1,3 +1,9 @@ +2011-07-22 Joel Sherrill + + PR 1845/bsps + * make/custom/rtl22xx_t.cfg: Remove unused line with what is now + invalid syntax. + 2011-02-02 Ralf Corsépius * configure.ac: Require autoconf-2.68, automake-1.11.1. diff --git a/c/src/lib/libbsp/arm/rtl22xx/make/custom/rtl22xx_t.cfg b/c/src/lib/libbsp/arm/rtl22xx/make/custom/rtl22xx_t.cfg index c9d2722650..e57c06610d 100644 --- a/c/src/lib/libbsp/arm/rtl22xx/make/custom/rtl22xx_t.cfg +++ b/c/src/lib/libbsp/arm/rtl22xx/make/custom/rtl22xx_t.cfg @@ -3,16 +3,13 @@ # # $Id$ # -set USE_THUMB_MODE=YES - # This contains the compiler options necessary to select the CPU model # and (hopefully) optimize for it. # include $(RTEMS_ROOT)/make/custom/rtl22xx.cfg -CPU_CFLAGS += -mthumb \ - -fno-schedule-insns2 +CPU_CFLAGS += -mthumb -fno-schedule-insns2 #CFLAG: -mthumb-interwork can add veneer between ARM and Thumb code. #CPU_CFLAGS += -mthumb-interwork -D __THUMB_INTERWORK__ -mthumb -- cgit v1.2.3 From c2f26f0d5e273e40eeaaf236d969d21b635f19fc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 26 Jul 2011 14:13:33 +0000 Subject: 2011-07-26 Joel Sherrill PR 1851/doc * user/conf.t: Fix typo in CONFIGURE_MESSAGE_BUFFER_MEMORY example. --- doc/ChangeLog | 5 +++++ doc/user/conf.t | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 2f448d2478..75e890c3a5 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-26 Joel Sherrill + + PR 1851/doc + * user/conf.t: Fix typo in CONFIGURE_MESSAGE_BUFFER_MEMORY example. + 2011-03-04 Joel Sherrill PR 1744/doc diff --git a/doc/user/conf.t b/doc/user/conf.t index 00571dc33d..eb06be06cb 100644 --- a/doc/user/conf.t +++ b/doc/user/conf.t @@ -328,7 +328,7 @@ by the type @code{other_message_type}. @example -#define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE \ +#define CONFIGURE_MESSAGE_BUFFER_MEMORY \ (CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \ 24, sizeof(one_message_type) + \ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \ -- cgit v1.2.3 From 5691dc6d5d6079cf63d98b5561391dc1a5ec83b4 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 29 Jul 2011 19:50:32 +0000 Subject: 2011-07-29 Joel Sherrill PR 1864/doc * user/conf.t: Add missing documentation for CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS, CONFIGURE_MAXIMUM_POSIX_BARRIERS , CONFIGURE_MAXIMUM_POSIX_SPINLOCKS, CONFIGURE_MAXIMUM_POSIX_RWLOCKS. --- doc/ChangeLog | 8 ++++++++ doc/user/conf.t | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 75e890c3a5..e05b97135a 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2011-07-29 Joel Sherrill + + PR 1864/doc + * user/conf.t: Add missing documentation for + CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS, + CONFIGURE_MAXIMUM_POSIX_BARRIERS , CONFIGURE_MAXIMUM_POSIX_SPINLOCKS, + CONFIGURE_MAXIMUM_POSIX_RWLOCKS. + 2011-07-26 Joel Sherrill PR 1851/doc diff --git a/doc/user/conf.t b/doc/user/conf.t index eb06be06cb..d9030e1eed 100644 --- a/doc/user/conf.t +++ b/doc/user/conf.t @@ -719,11 +719,34 @@ The default is 0. POSIX API message queues that can be concurrently active. The default is 0. +@findex CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS +@item @code{CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS} +is the maximum number of POSIX API message +queue descriptors that can be concurrently +active. @code{CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS} +should be greater than or equal to +@code{CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES}. The default is 0. + @findex CONFIGURE_MAXIMUM_POSIX_SEMAPHORES @item @code{CONFIGURE_MAXIMUM_POSIX_SEMAPHORES} is the maximum number of POSIX API semaphores that can be concurrently active. The default is 0. +@findex CONFIGURE_MAXIMUM_POSIX_BARRIERS +@item @code{CONFIGURE_MAXIMUM_POSIX_BARRIERS} is the maximum number of +POSIX API barriers that can be concurrently active. +The default is 0. + +@findex CONFIGURE_MAXIMUM_POSIX_SPINLOCKS +@item @code{CONFIGURE_MAXIMUM_POSIX_SPINLOCKS} is the maximum number of +POSIX API spinlocks that can be concurrently active. +The default is 0. + +@findex CONFIGURE_MAXIMUM_POSIX_RWLOCKS +@item @code{CONFIGURE_MAXIMUM_POSIX_RWLOCKS} is the maximum number of +POSIX API read-write locks that can be concurrently active. +The default is 0. + @end itemize @subsection POSIX Initialization Threads Table Configuration -- cgit v1.2.3 From a9ed9230c63b917bf01daaaff17d731be2604416 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jul 2011 14:12:29 +0000 Subject: 2011-07-31 Joel Sherrill PR 1839/filesystem * libcsupport/include/rtems/libio_.h, libcsupport/src/fchdir.c, libcsupport/src/fdatasync.c, libcsupport/src/fpathconf.c, libcsupport/src/fsync.c, libcsupport/src/ftruncate.c, libcsupport/src/read.c, libcsupport/src/readv.c, libcsupport/src/write.c, libcsupport/src/writev.c: Some calls did not return proper status for permission errors or incorrectly permissions at all. --- cpukit/ChangeLog | 11 +++++++++++ cpukit/libcsupport/include/rtems/libio_.h | 17 ++++++++++++++--- cpukit/libcsupport/src/fchdir.c | 8 +------- cpukit/libcsupport/src/fdatasync.c | 4 ++-- cpukit/libcsupport/src/fpathconf.c | 3 +-- cpukit/libcsupport/src/fsync.c | 3 +-- cpukit/libcsupport/src/ftruncate.c | 1 + cpukit/libcsupport/src/read.c | 2 +- cpukit/libcsupport/src/readv.c | 4 ++-- cpukit/libcsupport/src/write.c | 2 +- cpukit/libcsupport/src/writev.c | 4 ++-- 11 files changed, 37 insertions(+), 22 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e11a32862f..6258481572 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,14 @@ +2011-07-31 Joel Sherrill + + PR 1839/filesystem + * libcsupport/include/rtems/libio_.h, libcsupport/src/fchdir.c, + libcsupport/src/fdatasync.c, libcsupport/src/fpathconf.c, + libcsupport/src/fsync.c, libcsupport/src/ftruncate.c, + libcsupport/src/read.c, libcsupport/src/readv.c, + libcsupport/src/write.c, libcsupport/src/writev.c: Some calls did not + return proper status for permission errors or incorrectly permissions + at all. + 2011-07-19 Joel Sherrill PR 1838/filesystem diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h index a0bc0aa47b..6e1776e413 100644 --- a/cpukit/libcsupport/include/rtems/libio_.h +++ b/cpukit/libcsupport/include/rtems/libio_.h @@ -124,19 +124,30 @@ extern rtems_libio_t *rtems_libio_iop_freelist; } while (0) /* - * rtems_libio_check_permissions + * rtems_libio_check_permissions_with_error * * Macro to check if a file descriptor is open for this operation. + * On failure, return the user specified error. */ -#define rtems_libio_check_permissions(_iop, _flag) \ +#define rtems_libio_check_permissions_with_error(_iop, _flag, _errno) \ do { \ if (((_iop)->flags & (_flag)) == 0) { \ - rtems_set_errno_and_return_minus_one( EINVAL ); \ + rtems_set_errno_and_return_minus_one( _errno ); \ return -1; \ } \ } while (0) +/* + * rtems_libio_check_permissions + * + * Macro to check if a file descriptor is open for this operation. + * On failure, return EINVAL + */ + +#define rtems_libio_check_permissions(_iop, _flag) \ + rtems_libio_check_permissions_with_error(_iop, _flag, EINVAL ) + /* * rtems_filesystem_freenode * diff --git a/cpukit/libcsupport/src/fchdir.c b/cpukit/libcsupport/src/fchdir.c index 0f3cf9ebb3..8ecb44ff59 100644 --- a/cpukit/libcsupport/src/fchdir.c +++ b/cpukit/libcsupport/src/fchdir.c @@ -1,7 +1,7 @@ /* * fchdir() - compatible with SVr4, 4.4BSD and X/OPEN - Change Directory * - * COPYRIGHT (c) 1989-2000. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -35,12 +35,6 @@ int fchdir( iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); - /* - * Now process the fchmod(). - */ - - rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); - /* * Verify you can change directory into this node. */ diff --git a/cpukit/libcsupport/src/fdatasync.c b/cpukit/libcsupport/src/fdatasync.c index c2b4db43ae..5a7ba4244a 100644 --- a/cpukit/libcsupport/src/fdatasync.c +++ b/cpukit/libcsupport/src/fdatasync.c @@ -1,7 +1,7 @@ /* * fdatasync() - POSIX 1003.1b 6.6.2 - Synchronize the Data of a File * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -29,7 +29,7 @@ int fdatasync( rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); + rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); /* * Now process the fdatasync(). diff --git a/cpukit/libcsupport/src/fpathconf.c b/cpukit/libcsupport/src/fpathconf.c index accaae1585..71edaf6ce9 100644 --- a/cpukit/libcsupport/src/fpathconf.c +++ b/cpukit/libcsupport/src/fpathconf.c @@ -1,7 +1,7 @@ /* * fpathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -33,7 +33,6 @@ long fpathconf( rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); - rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); /* * Now process the information request. diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c index cfd8e8d49b..c7a7745859 100644 --- a/cpukit/libcsupport/src/fsync.c +++ b/cpukit/libcsupport/src/fsync.c @@ -1,7 +1,7 @@ /* * fsync() - POSIX 1003.1b 6.6.1 - Synchronize the State of a File * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -29,7 +29,6 @@ int fsync( rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); /* * Now process the fsync(). diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c index 6619ca5f74..42026ef123 100644 --- a/cpukit/libcsupport/src/ftruncate.c +++ b/cpukit/libcsupport/src/ftruncate.c @@ -32,6 +32,7 @@ int ftruncate( rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); + rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); /* * Now process the ftruncate() request. diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c index 4e44eec4ff..80a5e49435 100644 --- a/cpukit/libcsupport/src/read.c +++ b/cpukit/libcsupport/src/read.c @@ -32,7 +32,7 @@ ssize_t read( rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); + rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); /* * Now process the read(). diff --git a/cpukit/libcsupport/src/readv.c b/cpukit/libcsupport/src/readv.c index cb64797d8d..33e9df3782 100644 --- a/cpukit/libcsupport/src/readv.c +++ b/cpukit/libcsupport/src/readv.c @@ -5,7 +5,7 @@ * * http://www.opengroup.org/onlinepubs/009695399/functions/readv.html * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -40,7 +40,7 @@ ssize_t readv( rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); + rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); /* * Argument validation on IO vector diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c index 3bda204015..468dffb036 100644 --- a/cpukit/libcsupport/src/write.c +++ b/cpukit/libcsupport/src/write.c @@ -39,7 +39,7 @@ ssize_t write( rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); + rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); /* * Now process the write() request. diff --git a/cpukit/libcsupport/src/writev.c b/cpukit/libcsupport/src/writev.c index a453209d87..d00c0a071b 100644 --- a/cpukit/libcsupport/src/writev.c +++ b/cpukit/libcsupport/src/writev.c @@ -5,7 +5,7 @@ * * http://www.opengroup.org/onlinepubs/009695399/functions/writev.html * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -41,7 +41,7 @@ ssize_t writev( rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); + rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); /* * Argument validation on IO vector -- cgit v1.2.3 From 13893343187f4cbbcc132db3c1663dab5f6729d1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jul 2011 16:16:30 +0000 Subject: 2011-07-31 Joel Sherrill PR 1867/cpukit * posix/src/pthreadexit.c, posix/src/pthreadjoin.c: Correct implementation of pthread_exit() and pthread_join() to support the case where a thread is joinable but calls pthread_exit() before a thread has attempted to join. --- cpukit/ChangeLog | 8 ++++++++ cpukit/posix/src/pthreadexit.c | 35 +++++++++++++++++++++++++++++++++-- cpukit/posix/src/pthreadjoin.c | 18 ++++++++++++------ 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 6258481572..5b74ec5834 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,11 @@ +2011-07-31 Joel Sherrill + + PR 1867/cpukit + * posix/src/pthreadexit.c, posix/src/pthreadjoin.c: Correct + implementation of pthread_exit() and pthread_join() to support the + case where a thread is joinable but calls pthread_exit() before a + thread has attempted to join. + 2011-07-31 Joel Sherrill PR 1839/filesystem diff --git a/cpukit/posix/src/pthreadexit.c b/cpukit/posix/src/pthreadexit.c index 9efe9d9a47..3bfec10b80 100644 --- a/cpukit/posix/src/pthreadexit.c +++ b/cpukit/posix/src/pthreadexit.c @@ -3,7 +3,7 @@ * * NOTE: Key destructors are executed in the POSIX api delete extension. * - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -25,15 +25,21 @@ #include #include + void _POSIX_Thread_Exit( Thread_Control *the_thread, void *value_ptr ) { - Objects_Information *the_information; + Objects_Information *the_information; + Thread_Control *unblocked; + POSIX_API_Control *api; the_information = _Objects_Get_information_id( the_thread->Object.id ); + api = the_thread->API_Extensions[ THREAD_API_POSIX ]; + + /* * The_information has to be non-NULL. Otherwise, we couldn't be * running in a thread of this API and class. @@ -51,6 +57,31 @@ void _POSIX_Thread_Exit( the_thread->Wait.return_argument = value_ptr; + /* + * Process join + */ + if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { + unblocked = _Thread_queue_Dequeue( &api->Join_List ); + if ( unblocked ) { + do { + *(void **)unblocked->Wait.return_argument = value_ptr; + } while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) ); + } else { + _Thread_Set_state( + the_thread, + STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT + ); + _RTEMS_Unlock_allocator(); + _Thread_Enable_dispatch(); + /* now waiting for thread to arrive */ + _RTEMS_Lock_allocator(); + _Thread_Disable_dispatch(); + } + } + + /* + * Now shut down the thread + */ _Thread_Close( the_information, the_thread ); _POSIX_Threads_Free( the_thread ); diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c index 8ee9888b94..26d53285dc 100644 --- a/cpukit/posix/src/pthreadjoin.c +++ b/cpukit/posix/src/pthreadjoin.c @@ -52,12 +52,18 @@ int pthread_join( * Put ourself on the threads join list */ - _Thread_Executing->Wait.return_argument = &return_pointer; - - _Thread_queue_Enter_critical_section( &api->Join_List ); - - _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); - + if ( the_thread->current_state == + (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) ) { + return_pointer = the_thread->Wait.return_argument; + _Thread_Clear_state( + the_thread, + (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) + ); + } else { + _Thread_Executing->Wait.return_argument = &return_pointer; + _Thread_queue_Enter_critical_section( &api->Join_List ); + _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); + } _Thread_Enable_dispatch(); if ( value_ptr ) -- cgit v1.2.3 From 0126591e0ade5fe3a7a237078458c6988091ee46 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jul 2011 16:16:43 +0000 Subject: 2011-07-31 Joel Sherrill PR 1867/cpukit * Makefile.am, configure.ac, psx12/task.c, psxkey03/init.c, psxrwlock01/test.c: Correct implementation of pthread_exit() and pthread_join() to support the case where a thread is joinable but calls pthread_exit() before a thread has attempted to join. * psx16/.cvsignore, psx16/Makefile.am, psx16/init.c, psx16/psx16.doc, psx16/psx16.scn: New files. --- testsuites/psxtests/ChangeLog | 66 ++++++++++++++++------------ testsuites/psxtests/Makefile.am | 2 +- testsuites/psxtests/configure.ac | 1 + testsuites/psxtests/psx12/task.c | 5 +++ testsuites/psxtests/psx16/.cvsignore | 2 + testsuites/psxtests/psx16/Makefile.am | 25 +++++++++++ testsuites/psxtests/psx16/init.c | 78 ++++++++++++++++++++++++++++++++++ testsuites/psxtests/psx16/psx16.doc | 24 +++++++++++ testsuites/psxtests/psx16/psx16.scn | 6 +++ testsuites/psxtests/psxkey03/init.c | 5 +++ testsuites/psxtests/psxrwlock01/test.c | 10 +++++ 11 files changed, 195 insertions(+), 29 deletions(-) create mode 100644 testsuites/psxtests/psx16/.cvsignore create mode 100644 testsuites/psxtests/psx16/Makefile.am create mode 100644 testsuites/psxtests/psx16/init.c create mode 100644 testsuites/psxtests/psx16/psx16.doc create mode 100644 testsuites/psxtests/psx16/psx16.scn diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 6bd7ebfbcf..36625b52ec 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,14 +1,24 @@ -2011-02-08 Ralf Corsépius +2011-07-31 Joel Sherrill + + PR 1867/cpukit + * Makefile.am, configure.ac, psx12/task.c, psxkey03/init.c, + psxrwlock01/test.c: Correct implementation of pthread_exit() and + pthread_join() to support the case where a thread is joinable but + calls pthread_exit() before a thread has attempted to join. + * psx16/.cvsignore, psx16/Makefile.am, psx16/init.c, psx16/psx16.doc, + psx16/psx16.scn: New files. + +2011-02-08 Ralf Corsépius * include/pmacros.h: Add PRIxblksize_t, PRIxblkcnt_t. * configure.ac: Add AC_CHECK_SIZEOF([blksize_t]), AC_CHECK_SIZEOF([blkcnt_t]). -2011-02-02 Ralf Corsépius +2011-02-02 Ralf Corsépius * configure.ac: Require autoconf-2.68, automake-1.11.1. -2010-10-01 Ralf Corsépius +2010-10-01 Ralf Corsépius * configure.ac: Check for pthread_attr_{get,set}cputime instead of pthread_pthread_attr_{get,set}cputime (Typo). @@ -18,7 +28,7 @@ * psxfile01/test.c, psxmount/test.c, psxreaddir/test.c, psxstat/test.c: Update to the new mount API. -2010-05-29 Ralf Corsépius +2010-05-29 Ralf Corsépius * configure.ac: Add AC_CHECK_SIZEOF(off_t). * include/pmacros.h: Add PRIdoff_t. @@ -55,7 +65,7 @@ psxhdrs/pthread22.c, psxhdrs/sched01.c, psxhdrs/sched03.c: Reflect POSIX changes to sched_param. -2010-04-02 Ralf Corsépius +2010-04-02 Ralf Corsépius * psxhdrs/proc01.c, psxhdrs/proc02.c, psxhdrs/proc07.c, psxhdrs/proc08.c, psxhdrs/proc09.c, psxhdrs/proc10.c, @@ -136,28 +146,28 @@ * psxenosys/Makefile.am: Add documentation file. * psxenosys/psxenosys.doc: New file. -2009-01-02 Ralf Corsépius +2009-01-02 Ralf Corsépius * psxsignal03/init.c: Print sigval.sival_ptr instead of "union sigval". -2009-01-01 Ralf Corsépius +2009-01-01 Ralf Corsépius * psxstat/test.c: Apply PRI* macros to print struct stat fields. * psxreaddir/test.c: Apply PRI* macros to print struct stat fields. * psxfile01/test.c: Remove obsure #ifdef's. Apply PRI* macros to print struct stat fields. -2009-10-31 Ralf Corsépius +2009-10-31 Ralf Corsépius * include/pmacros.h: Change TM_OCTOBER to 9, TM_NOVEMBER to 10, TM_DECEMBER to 11 (tm_mon months start with JAN = 0). -2009-10-31 Ralf Corsépius +2009-10-31 Ralf Corsépius * include/pmacros.h: November is the 11th month. -2009-10-30 Ralf Corsépius +2009-10-30 Ralf Corsépius * psxstat/test.c: Remove #ifdef's. * psxmount/test.c, psxreaddir/test.c: Remove __P (unused anachronism). @@ -169,7 +179,7 @@ rtems_object_api_minimum_class, rtems_object_api_maximum_class. Reflect the prototypes having been missing to printf's. -2009-10-29 Ralf Corsépius +2009-10-29 Ralf Corsépius * psxsysconf/init.c: Comment out sysconf(LONG_MAX) check (not useful). @@ -179,11 +189,11 @@ * psx10/init.c: Pass 0x7FFF instead of 0xFFFFFF as invalid pshared attribute to pthread_condattr_setpshared for 16bit target compliance. -2009-10-28 Ralf Corsépius +2009-10-28 Ralf Corsépius * psxbarrier01/test.c: Include -2009-10-27 Ralf Corsépius +2009-10-27 Ralf Corsépius * psx01/init.c, psx01/task.c, psx02/init.c, psx03/init.c, psx04/init.c, psx05/init.c, psx06/init.c, psx07/init.c, @@ -193,7 +203,7 @@ psxmsgq02/init.c, psxsignal01/init.c, psxualarm/init.c: Use PRIxpthread_t to print pthread_t's. -2009-10-27 Ralf Corsépius +2009-10-27 Ralf Corsépius * psxmsgq02/init.c: Remove cast in call to fatal_posix_service_status_errno. @@ -206,14 +216,14 @@ * configure.ac: Add AC_CHECK_DECLS pthread_attr_getcputime, pthread_attr_setcputime. -2009-10-27 Ralf Corsépius +2009-10-27 Ralf Corsépius * psxtimer01/psxtimer.c: Use %ld to print *.tv_nsec. * psxsysconf/init.c: Use %ld to print *.tv_nsec. * psxclock/init.c: Use %ld to print *.tv_nsec. * psx06/init.c, psx06/system.h: Misc. warning fixes. -2009-10-26 Ralf Corsépius +2009-10-26 Ralf Corsépius * psxsignal03/init.c: Add missing argument to printf. * psxfile01/test.c: Use %zu instead of %d to print size_t's. @@ -222,7 +232,7 @@ * configure.ac: Add AC_CHECK_HEADERS sys/mman.h. Add AC_CHECK_DECLS pthread_atfork, adjtime, mprotect. -2009-10-25 Ralf Corsépius +2009-10-25 Ralf Corsépius * psxtime/test.c: Include . Conditionally add local prototype for adjtime() @@ -236,27 +246,27 @@ if pthread.h doesn't supply it. * psxkey01/init.c: Include "test_support.h". -2009-10-25 Ralf Corsépius +2009-10-25 Ralf Corsépius * configure.ac: Check for pthread_atfork in pthread.h. * psxrwlock01/test.c: Conditionally add local prototype for pthread_atfork() if pthread.h doesn't supply it. Include . -2009-10-25 Ralf Corsépius +2009-10-25 Ralf Corsépius * configure.ac: Check for sys/mman.h. Check for mprotect in sys/mman.h. * psxenosys/init.c: Conditionally add local prototype for mprotect() if sys/mman.h doesn't supply it. -2009-10-25 Ralf Corsépius +2009-10-25 Ralf Corsépius * configure.ac: Check for pthread_rwlock_unlock in pthread.h. * psxrwlock01/test.c: Conditionally add local prototype for pthread_rwlock_unlock() if pthread.h doesn't supply it. -2009-10-25 Ralf Corsépius +2009-10-25 Ralf Corsépius * psx01/init.c, psxalarm01/init.c, psxbarrier01/test.c, psxclock/init.c, psxfatal01/testcase.h, psxfatal02/testcase.h, @@ -273,7 +283,7 @@ * Makefile.am: Build file IO related tests even with POSIX threading is disabled. -2009-10-20 Ralf Corsépius +2009-10-20 Ralf Corsépius * configure.ac: Don't add -ansi -fasm to CFLAGS. @@ -768,7 +778,7 @@ * psxfile01/test.c: Change from int to size_t. -2009-04-03 Ralf Corsépius +2009-04-03 Ralf Corsépius * psx01/Makefile.am, psx02/Makefile.am, psx03/Makefile.am, psx04/Makefile.am, psx05/Makefile.am, psx06/Makefile.am, @@ -816,7 +826,7 @@ * psx01/psx01.scn: Bump version to 4.9.99.0 -2008-09-06 Ralf Corsépius +2008-09-06 Ralf Corsépius * psxcleanup/psxcleanup.c, psxfatal_support/init.c, psxfatal_support/system.h: Convert to "bool". @@ -1044,7 +1054,7 @@ * psxrwlock01/main.c, psxrwlock01/test.c: Improve rwlock test to include normal blocking and unblocking on timeout. -2006-12-02 Ralf Corsépius +2006-12-02 Ralf Corsépius * configure.ac: New BUG-REPORT address. @@ -1078,11 +1088,11 @@ * psxsem01/init.c: Make sem_timedwait more conformant to Open Group specification. -2006-10-17 Ralf Corsépius +2006-10-17 Ralf Corsépius * configure.ac: Require autoconf-2.60. Require automake-1.10. -2006-07-11 Ralf Corsépius +2006-07-11 Ralf Corsépius * psx01/Makefile.am, psx02/Makefile.am, psx03/Makefile.am, psx04/Makefile.am, psx05/Makefile.am, psx06/Makefile.am, @@ -1268,7 +1278,7 @@ * psxfile01/test.c, psxmsgq01/init.c, psxstat/test.c, psxtimer/psxtimer.c: Eliminate warnings and typos. -2004-02-26 Sébastien Barré +2004-02-26 Sébastien Barré PR 582/core * psxmsgq01/init.c, psxmsgq01/psxmsgq01.scn: Fix the POSIX message diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index fd7450e2d9..5acb1789f1 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal SUBDIRS = psxclock if HAS_POSIX SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \ - psx10 psx11 psx12 psx13 psx14 psxalarm01 \ + psx10 psx11 psx12 psx13 psx14 psx16 psxalarm01 \ psxautoinit01 psxautoinit02 psxbarrier01 \ psxcancel psxcancel01 psxcleanup psxcleanup01 \ psxcond01 psxenosys psxkey01 psxkey02 \ diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index c001e74bca..bf527e1980 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -74,6 +74,7 @@ psx11/Makefile psx12/Makefile psx13/Makefile psx14/Makefile +psx16/Makefile psxalarm01/Makefile psxautoinit01/Makefile psxautoinit02/Makefile diff --git a/testsuites/psxtests/psx12/task.c b/testsuites/psxtests/psx12/task.c index 67e5a68e40..1d3804da4f 100644 --- a/testsuites/psxtests/psx12/task.c +++ b/testsuites/psxtests/psx12/task.c @@ -26,6 +26,11 @@ void *Task_1( void *argument ) { + /* + * Detach ourselves so we don't wait for a join that won't happen. + */ + pthread_detach( pthread_self() ); + puts( "Task_1: exitting" ); pthread_exit( NULL ); diff --git a/testsuites/psxtests/psx16/.cvsignore b/testsuites/psxtests/psx16/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/psxtests/psx16/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/psxtests/psx16/Makefile.am b/testsuites/psxtests/psx16/Makefile.am new file mode 100644 index 0000000000..048d896440 --- /dev/null +++ b/testsuites/psxtests/psx16/Makefile.am @@ -0,0 +1,25 @@ +## +## $Id$ +## + +rtems_tests_PROGRAMS = psx16 +psx16_SOURCES = init.c + +dist_rtems_tests_DATA = psx16.scn +dist_rtems_tests_DATA += psx16.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/include +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(psx16_OBJECTS) $(psx16_LDADD) +LINK_LIBS = $(psx16_LDLIBS) + +psx16$(EXEEXT): $(psx16_OBJECTS) $(psx16_DEPENDENCIES) + @rm -f psx16$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/psxtests/psx16/init.c b/testsuites/psxtests/psx16/init.c new file mode 100644 index 0000000000..c829d9aadd --- /dev/null +++ b/testsuites/psxtests/psx16/init.c @@ -0,0 +1,78 @@ +/* + * COPYRIGHT (c) 1989-2011. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include +#include "test_support.h" +#include + +int Index; + +void *TestThread( + void *argument +) +{ + int *index = (int *)argument; + + *index = 7; + + puts( "TestThread exiting" ); + return argument; +} + +void *POSIX_Init( + rtems_task_argument argument +) +{ + int status; + pthread_t id; + pthread_attr_t attr; + void *join_return; + + puts( "\n\n*** POSIX TEST PSX16 ***" ); + + Index = 5; + + /* Initialize and set thread detached attribute */ + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + + puts( "Creating TestThread" ); + status = pthread_create( &id, &attr, TestThread, (void *)&Index ); + rtems_test_assert( status == 0 ); + + /* let test thread run and exit */ + puts( "Let TestThread run and exit before we attempt to join" ); + sleep( 2 ); + + join_return = NULL; + status = pthread_join( id, &join_return ); + rtems_test_assert( status == 0 ); + rtems_test_assert( join_return == &Index ); + rtems_test_assert( *(int *)join_return == 7 ); + puts( "Successfully joined with TestThread" ); + + puts( "*** END OF POSIX TEST PSX16 ***" ); + + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_INIT +#include +/* end of file */ diff --git a/testsuites/psxtests/psx16/psx16.doc b/testsuites/psxtests/psx16/psx16.doc new file mode 100644 index 0000000000..e646efae52 --- /dev/null +++ b/testsuites/psxtests/psx16/psx16.doc @@ -0,0 +1,24 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2011. +# On-Line Applications Research Corporation (OAR). +# +# The license and distribution terms for this file may be +# found in the file LICENSE in this distribution or at +# http://www.rtems.com/license/LICENSE. +# + +This file describes the directives and concepts tested by this test set. + +test set name: psx16 + +directives: + + pthread_join + pthread_exit + +concepts: + ++ Ensure that if a joinable thread exits before it has been joined, +that it waits for a thread to call pthread_join. diff --git a/testsuites/psxtests/psx16/psx16.scn b/testsuites/psxtests/psx16/psx16.scn new file mode 100644 index 0000000000..d01e954a57 --- /dev/null +++ b/testsuites/psxtests/psx16/psx16.scn @@ -0,0 +1,6 @@ +*** POSIX TEST PSX16 *** +Creating TestThread +Let TestThread run and exit before we attempt to join +TestThread exiting +Successfully joined with TestThread +*** END OF POSIX TEST PSX16 *** diff --git a/testsuites/psxtests/psxkey03/init.c b/testsuites/psxtests/psxkey03/init.c index d551a444c2..12088e4e98 100644 --- a/testsuites/psxtests/psxkey03/init.c +++ b/testsuites/psxtests/psxkey03/init.c @@ -28,6 +28,11 @@ void *Test_Thread( { int sc; + /* + * Detach ourselves so we don't wait for a join that won't happen. + */ + pthread_detach( pthread_self() ); + puts( "Test_Thread - pthread_setspecific - OK" ); sc = pthread_setspecific( Key, key_value ); rtems_test_assert( !sc ); diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c index af17da1abe..c58b880fb5 100644 --- a/testsuites/psxtests/psxrwlock01/test.c +++ b/testsuites/psxtests/psxrwlock01/test.c @@ -35,6 +35,11 @@ void *ReadLockThread(void *arg) { int status; + /* + * Detach ourselves so we don't wait for a join that won't happen. + */ + pthread_detach( pthread_self() ); + puts( "ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK" ); status = pthread_rwlock_rdlock(&RWLock); rtems_test_assert( !status ); @@ -52,6 +57,11 @@ void *WriteLockThread(void *arg) { int status; + /* + * Detach ourselves so we don't wait for a join that won't happen. + */ + pthread_detach( pthread_self() ); + puts( "WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK" ); status = pthread_rwlock_wrlock(&RWLock); rtems_test_assert( !status ); -- cgit v1.2.3 From 426eb35f03997f983b0fed547b6e4b2750840292 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jul 2011 22:40:43 +0000 Subject: 2011-07-31 Joel Sherrill PR 1855/cpukit * posix/src/psignal.c, posix/src/psignalunblockthread.c, posix/src/pthread.c, posix/src/pthreadjoin.c: Correct signal processing during pthread_join. We are supposed to unblock the thread waiting on a pthread_join(), dispatch the signal handler, account for it potentially overwriting errno, and then have the thread return to blocking within pthread_join(). --- cpukit/ChangeLog | 10 ++++++++++ cpukit/posix/src/psignal.c | 9 +++++++++ cpukit/posix/src/psignalunblockthread.c | 27 +++++++++++---------------- cpukit/posix/src/pthread.c | 2 +- cpukit/posix/src/pthreadjoin.c | 6 +++++- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 5b74ec5834..7cd189174a 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,13 @@ +2011-07-31 Joel Sherrill + + PR 1855/cpukit + * posix/src/psignal.c, posix/src/psignalunblockthread.c, + posix/src/pthread.c, posix/src/pthreadjoin.c: Correct signal + processing during pthread_join. We are supposed to unblock the thread + waiting on a pthread_join(), dispatch the signal handler, account for + it potentially overwriting errno, and then have the thread return to + blocking within pthread_join(). + 2011-07-31 Joel Sherrill PR 1867/cpukit diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index 3040718874..5c756dc327 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -113,9 +113,16 @@ void _POSIX_signals_Post_switch_extension( POSIX_API_Control *api; int signo; ISR_Level level; + int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; + /* + * We need to ensure that if the signal handler executes a call + * which overwrites the unblocking status, we restore it. + */ + hold_errno = _Thread_Executing->Wait.return_code; + /* * api may be NULL in case of a thread close in progress */ @@ -150,6 +157,8 @@ void _POSIX_signals_Post_switch_extension( _POSIX_signals_Check_signal( api, signo, true ); } } + + _Thread_Executing->Wait.return_code = hold_errno; } /*PAGE diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c index fdba79a00c..203e28ff2b 100644 --- a/cpukit/posix/src/psignalunblockthread.c +++ b/cpukit/posix/src/psignalunblockthread.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -100,24 +100,19 @@ bool _POSIX_signals_Unblock_thread( the_thread->do_post_task_switch_extension = true; - if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { + if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; /* - * At this time, there is no RTEMS API object which lets a task - * block on a thread queue and be interruptible by a POSIX signal. - * If an object class with that requirement is ever added, enable - * this code. + * In pthread_cond_wait, a thread will be blocking on a thread + * queue, but is also interruptible by a POSIX signal. */ - #if 0 - if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) - _Thread_queue_Extract_with_proxy( the_thread ); - else - #endif - if ( _States_Is_delaying(the_thread->current_state) ){ - if ( _Watchdog_Is_active( &the_thread->Timer ) ) - (void) _Watchdog_Remove( &the_thread->Timer ); - _Thread_Unblock( the_thread ); - } + if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) + _Thread_queue_Extract_with_proxy( the_thread ); + else if ( _States_Is_delaying(the_thread->current_state) ){ + (void) _Watchdog_Remove( &the_thread->Timer ); + _Thread_Unblock( the_thread ); + } + } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 45d0ff18fd..e335ec0e63 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -214,7 +214,7 @@ bool _POSIX_Threads_Create_extension( _Thread_queue_Initialize( &api->Join_List, THREAD_QUEUE_DISCIPLINE_FIFO, - STATES_WAITING_FOR_JOIN_AT_EXIT, + STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_INTERRUPTIBLE_BY_SIGNAL, 0 ); diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c index 26d53285dc..0b7e103614 100644 --- a/cpukit/posix/src/pthreadjoin.c +++ b/cpukit/posix/src/pthreadjoin.c @@ -1,7 +1,7 @@ /* * 16.1.3 Wait for Thread Termination, P1003.1c/Draft 10, p. 147 * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -32,6 +32,7 @@ int pthread_join( Objects_Locations location; void *return_pointer; +on_EINTR: the_thread = _Thread_Get( thread, &location ); switch ( location ) { @@ -66,6 +67,9 @@ int pthread_join( } _Thread_Enable_dispatch(); + if ( _Thread_Executing->Wait.return_code == EINTR ) + goto on_EINTR; + if ( value_ptr ) *value_ptr = return_pointer; return 0; -- cgit v1.2.3 From eaad7ce07840beb7882dc3057fd44c0e5c5c9c08 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jul 2011 22:40:53 +0000 Subject: 2011-07-31 Joel Sherrill PR 1855/cpukit * Makefile.am, configure.ac: Correct signal processing during pthread_join. We are supposed to unblock the thread waiting on a pthread_join(), dispatch the signal handler, account for it potentially overwriting errno, and then have the thread return to blocking within pthread_join(). * psxeintr_join/.cvsignore, psxeintr_join/Makefile.am, psxeintr_join/init.c, psxeintr_join/psxeintr_join.doc, psxeintr_join/psxeintr_join.scn: New files. --- testsuites/psxtests/ChangeLog | 12 ++ testsuites/psxtests/Makefile.am | 2 +- testsuites/psxtests/configure.ac | 1 + testsuites/psxtests/psxeintr_join/.cvsignore | 2 + testsuites/psxtests/psxeintr_join/Makefile.am | 25 +++++ testsuites/psxtests/psxeintr_join/init.c | 125 +++++++++++++++++++++ .../psxtests/psxeintr_join/psxeintr_join.doc | 24 ++++ .../psxtests/psxeintr_join/psxeintr_join.scn | 9 ++ 8 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 testsuites/psxtests/psxeintr_join/.cvsignore create mode 100644 testsuites/psxtests/psxeintr_join/Makefile.am create mode 100644 testsuites/psxtests/psxeintr_join/init.c create mode 100644 testsuites/psxtests/psxeintr_join/psxeintr_join.doc create mode 100644 testsuites/psxtests/psxeintr_join/psxeintr_join.scn diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 36625b52ec..6c583d8082 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,15 @@ +2011-07-31 Joel Sherrill + + PR 1855/cpukit + * Makefile.am, configure.ac: Correct signal processing during + pthread_join. We are supposed to unblock the thread waiting on a + pthread_join(), dispatch the signal handler, account for it + potentially overwriting errno, and then have the thread return to + blocking within pthread_join(). + * psxeintr_join/.cvsignore, psxeintr_join/Makefile.am, + psxeintr_join/init.c, psxeintr_join/psxeintr_join.doc, + psxeintr_join/psxeintr_join.scn: New files. + 2011-07-31 Joel Sherrill PR 1867/cpukit diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index 5acb1789f1..b2bfb87c98 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -15,7 +15,7 @@ SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \ psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \ psxsignal03 psxsignal04 psxsignal05 psxspin01 psxspin02 psxsysconf \ psxtime psxtimer01 psxtimer02 psxualarm psxusleep psxfatal01 psxfatal02 \ - psxintrcritical01 psxstack01 + psxintrcritical01 psxstack01 psxeintr_join endif ## File IO tests diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index bf527e1980..d4ea0810b6 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -86,6 +86,7 @@ psxcleanup/Makefile psxcleanup01/Makefile psxclock/Makefile psxcond01/Makefile +psxeintr_join/Makefile psxenosys/Makefile psxfatal01/Makefile psxfatal02/Makefile diff --git a/testsuites/psxtests/psxeintr_join/.cvsignore b/testsuites/psxtests/psxeintr_join/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/psxtests/psxeintr_join/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/psxtests/psxeintr_join/Makefile.am b/testsuites/psxtests/psxeintr_join/Makefile.am new file mode 100644 index 0000000000..cb1e0f171c --- /dev/null +++ b/testsuites/psxtests/psxeintr_join/Makefile.am @@ -0,0 +1,25 @@ +## +## $Id$ +## + +rtems_tests_PROGRAMS = psxeintr_join +psxeintr_join_SOURCES = init.c + +dist_rtems_tests_DATA = psxeintr_join.scn +dist_rtems_tests_DATA += psxeintr_join.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/include +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(psxeintr_join_OBJECTS) $(psxeintr_join_LDADD) +LINK_LIBS = $(psxeintr_join_LDLIBS) + +psxeintr_join$(EXEEXT): $(psxeintr_join_OBJECTS) $(psxeintr_join_DEPENDENCIES) + @rm -f psxeintr_join$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/psxtests/psxeintr_join/init.c b/testsuites/psxtests/psxeintr_join/init.c new file mode 100644 index 0000000000..9bf3c2a882 --- /dev/null +++ b/testsuites/psxtests/psxeintr_join/init.c @@ -0,0 +1,125 @@ +/* + * COPYRIGHT (c) 1989-2011. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include +#include +#include +#include + +#include +#include +#include "test_support.h" + +#define SIG_SUSPEND SIGUSR1 +#define SIG_THR_RESTART SIGUSR2 + +sem_t GC_suspend_ack_sem; + +static void print_sig_mask( const char * str ) +{ + sigset_t blocked; + int i; + int status; + + status = pthread_sigmask( SIG_BLOCK, NULL, &blocked ); + rtems_test_assert( status == 0 ); + + printf( "%s blocked:\n", str ); + for ( i = 1; i < NSIG; i++) { + if ( sigismember( &blocked, i ) ) + printf( "%d ", i ); + } + printf( "\n" ); +} + +void GC_suspend_handler( int sig ) +{ + puts( "run in GC_suspend_handler" ); + sem_post( &GC_suspend_ack_sem ); +} + +void GC_restart_handler( int sig ) +{ + puts( "run in GC_restart_handler" ); +} + +void* run( void *arg ) +{ + int status; + pthread_t id = *(pthread_t *)arg; + + print_sig_mask( "New Thread" ); + + status = pthread_kill( id, SIG_SUSPEND ); + rtems_test_assert( status == 0 ); + + puts( "New Thread: after pthread_kill" ); + status = sem_wait( &GC_suspend_ack_sem ); + rtems_test_assert( status == 0 ); + + puts( "New Thread over!" ); + return NULL; +} + +void *POSIX_Init( void *arg ) +{ + struct sigaction act; + pthread_t newThread; + pthread_t mainThread; + int status; + + puts( "*** POSIX TEST PSXEINTR_JOIN ***" ); + status = sem_init( &GC_suspend_ack_sem, 0, 0); + rtems_test_assert( status == 0 ); + + status = sigemptyset( &act.sa_mask ); + rtems_test_assert( status == 0 ); + + status = sigaddset( &act.sa_mask, SIG_SUSPEND ); + rtems_test_assert( status == 0 ); + + status = pthread_sigmask( SIG_UNBLOCK, &act.sa_mask, NULL ); + rtems_test_assert( status == 0 ); + + act.sa_handler = GC_suspend_handler; + + status = sigaction( SIG_SUSPEND, &act, NULL ); + rtems_test_assert( status == 0 ); + + act.sa_handler = GC_restart_handler; + + print_sig_mask( "Main Thread" ); + + mainThread = pthread_self(); + status = pthread_create( &newThread, NULL, run, &mainThread ); + rtems_test_assert( status == 0 ); + + pthread_join( newThread, NULL ); + puts( "Back from pthread_join" ); + + puts( "*** END OF POSIX TEST PSXEINTR_JOIN ***" ); + rtems_test_exit( 0 ); + + return NULL; +} + +/* configuration information */ +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE +#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 +#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1 + +#define CONFIGURE_INIT +#include +/* end of file */ + diff --git a/testsuites/psxtests/psxeintr_join/psxeintr_join.doc b/testsuites/psxtests/psxeintr_join/psxeintr_join.doc new file mode 100644 index 0000000000..92702eada3 --- /dev/null +++ b/testsuites/psxtests/psxeintr_join/psxeintr_join.doc @@ -0,0 +1,24 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2011. +# On-Line Applications Research Corporation (OAR). +# +# The license and distribution terms for this file may be +# found in the file LICENSE in this distribution or at +# http://www.rtems.com/license/LICENSE. +# + +This file describes the directives and concepts tested by this test set. + +test set name: psxeintr_join + +directives: + + + pthread_join + + pthread_kill + +concepts: + ++ Verify that a signal sent during a blocking pthread_join() call is properly + processed. diff --git a/testsuites/psxtests/psxeintr_join/psxeintr_join.scn b/testsuites/psxtests/psxeintr_join/psxeintr_join.scn new file mode 100644 index 0000000000..d6e182054e --- /dev/null +++ b/testsuites/psxtests/psxeintr_join/psxeintr_join.scn @@ -0,0 +1,9 @@ +*** POSIX TEST PSXEINTR_JOIN *** +Main Thread blocked: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 27 28 29 30 31 +New Thread blocked: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 27 28 29 30 31 +New Thread: after pthread_kill +run in GC_suspend_handler +New Thread over! +Back from pthread_join +*** END OF POSIX TEST PSXEINTR_JOIN *** + -- cgit v1.2.3 From ded0bfa42bd3245ac323d365b0e18c1709e4ba86 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 4 Aug 2011 04:57:46 +0000 Subject: Abandon fedora-13. --- contrib/crossrpms/gcc/gccnewlib.add | 7 ------- 1 file changed, 7 deletions(-) diff --git a/contrib/crossrpms/gcc/gccnewlib.add b/contrib/crossrpms/gcc/gccnewlib.add index 0e636cd821..bb38a7f62f 100644 --- a/contrib/crossrpms/gcc/gccnewlib.add +++ b/contrib/crossrpms/gcc/gccnewlib.add @@ -62,12 +62,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -168,7 +162,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} -- cgit v1.2.3 From 391f35c8ffd95a9610a490ea868bd3e58fae3cd6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 15 Aug 2011 08:14:31 +0000 Subject: 2011-08-15 Julien Delange * irq/irq.c: Removed printk() before the interrupt initialization because it somehow destroys the interrupt context. * make/custom/nds.cfg: Enable Thumb interwork. * startup/bspstart.c: Set default exception handler. --- c/src/lib/libbsp/arm/nds/ChangeLog | 7 +++++++ c/src/lib/libbsp/arm/nds/irq/irq.c | 2 -- c/src/lib/libbsp/arm/nds/make/custom/nds.cfg | 2 +- c/src/lib/libbsp/arm/nds/startup/bspstart.c | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/c/src/lib/libbsp/arm/nds/ChangeLog b/c/src/lib/libbsp/arm/nds/ChangeLog index d86fe455a1..7c96fd1c70 100644 --- a/c/src/lib/libbsp/arm/nds/ChangeLog +++ b/c/src/lib/libbsp/arm/nds/ChangeLog @@ -1,3 +1,10 @@ +2011-08-15 Julien Delange + + * irq/irq.c: Removed printk() before the interrupt initialization + because it somehow destroys the interrupt context. + * make/custom/nds.cfg: Enable Thumb interwork. + * startup/bspstart.c: Set default exception handler. + 2011-02-02 Ralf Corsépius * configure.ac: Require autoconf-2.68, automake-1.11.1. diff --git a/c/src/lib/libbsp/arm/nds/irq/irq.c b/c/src/lib/libbsp/arm/nds/irq/irq.c index 17755c2b59..1222953b8f 100644 --- a/c/src/lib/libbsp/arm/nds/irq/irq.c +++ b/c/src/lib/libbsp/arm/nds/irq/irq.c @@ -34,8 +34,6 @@ isValidInterrupt (int irq) void BSP_rtems_irq_mngt_init (void) { - printk ("[+] irq manager started\n"); - irqInit (); REG_IME = IME_ENABLE; diff --git a/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg b/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg index cd4de466c9..c5c7c4bec4 100644 --- a/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg +++ b/c/src/lib/libbsp/arm/nds/make/custom/nds.cfg @@ -13,7 +13,7 @@ RTEMS_CPU_MODEL=arm9tdmi # and (hopefully) optimize for it. # CPU_CFLAGS = -mstructure-size-boundary=8 -mcpu=$(RTEMS_CPU_MODEL) -mfpu=vfp -mfloat-abi=soft -# CPU_CFLAGS += -mthumb-interwork ## -D __THUMB_INTERWORK__ -mthumb +CPU_CFLAGS += -mthumb-interwork ## -D __THUMB_INTERWORK__ -mthumb # optimize flag: typically -O2 #CFLAGS_OPTIMIZE_V = -O0 -ggdb diff --git a/c/src/lib/libbsp/arm/nds/startup/bspstart.c b/c/src/lib/libbsp/arm/nds/startup/bspstart.c index 5fefe0785a..b3d9f69aaa 100644 --- a/c/src/lib/libbsp/arm/nds/startup/bspstart.c +++ b/c/src/lib/libbsp/arm/nds/startup/bspstart.c @@ -15,6 +15,7 @@ #include #include +extern void defaultExceptionHandler (); extern void BSP_rtems_irq_mngt_init (void); /* * start the platform. @@ -44,6 +45,8 @@ void bsp_start (void) /* configure clock period */ Configuration.microseconds_per_tick = 10000; /* us */ + + defaultExceptionHandler (); } /* -- cgit v1.2.3 From 0b10f44e2d979f32746b92c1832c96e988d517a1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 21 Aug 2011 19:59:56 +0000 Subject: 2011-08-21 Joel Sherrill PR 1890/cpukit * psxmsgq01/init.c: POSIX says msg_prio is allowed to be NULL. --- testsuites/psxtests/ChangeLog | 5 +++++ testsuites/psxtests/psxmsgq01/init.c | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 6c583d8082..e85471fd18 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,8 @@ +2011-08-21 Joel Sherrill + + PR 1890/cpukit + * psxmsgq01/init.c: POSIX says msg_prio is allowed to be NULL. + 2011-07-31 Joel Sherrill PR 1855/cpukit diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c index 8bd1abb14b..beaa1149a8 100644 --- a/testsuites/psxtests/psxmsgq01/init.c +++ b/testsuites/psxtests/psxmsgq01/init.c @@ -1137,11 +1137,10 @@ void verify_timedout_mq_timedreceive( int is_blocking ) { - char message[ 100 ]; - unsigned int priority; - struct timespec tm; - struct timeval tv1, tv2, tv3; - struct timezone tz1, tz2; + char message[ 100 ]; + struct timespec tm; + struct timeval tv1, tv2, tv3; + struct timezone tz1, tz2; int status; printf( @@ -1154,7 +1153,7 @@ void verify_timedout_mq_timedreceive( tm.tv_sec = tv1.tv_sec - 1; tm.tv_nsec = tv1.tv_usec * 1000; - status = mq_timedreceive( Test_q[ que ].mq, message, 100, &priority, &tm ); + status = mq_timedreceive( Test_q[ que ].mq, message, 100, NULL, &tm ); gettimeofday( &tv2, &tz2 ); tv3.tv_sec = tv2.tv_sec - tv1.tv_sec; -- cgit v1.2.3 From 089ab39484ba5b676f09b5b07cfc3a01e91f692c Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Aug 2011 05:32:49 +0000 Subject: New (Address OS X 10.7.1 build breakdowns). --- .../patches/gcc-core-4.4.6-rtems4.10-20110829.diff | 4958 ++++++++++++++++++++ .../patches/gcc-g++-4.4.6-rtems4.10-20110829.diff | 454 ++ 2 files changed, 5412 insertions(+) create mode 100644 contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff create mode 100644 contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff diff --git a/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff b/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff new file mode 100644 index 0000000000..c3a2c22ff3 --- /dev/null +++ b/contrib/crossrpms/patches/gcc-core-4.4.6-rtems4.10-20110829.diff @@ -0,0 +1,4958 @@ +diff -Naur gcc-4.4.6.orig/ChangeLog.rtems gcc-4.4.6/ChangeLog.rtems +--- gcc-4.4.6.orig/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/ChangeLog.rtems 2011-08-29 07:16:18.126123562 +0200 +@@ -0,0 +1,9 @@ ++2011-04-20 Ralf Corsépius ++ ++ * configure, configure.ac (PPL): Merge gcc-4.6.0's ppl detection ++ (Work-around build breakdown on fedora 15). ++ ++ Ralf Corsépius ++ ++ * configure, configure.ac (skipdirs): Add target-libiberty. ++ +diff -Naur gcc-4.4.6.orig/configure gcc-4.4.6/configure +--- gcc-4.4.6.orig/configure 2010-10-02 13:40:32.000000000 +0200 ++++ gcc-4.4.6/configure 2011-08-29 07:16:18.130123715 +0200 +@@ -935,7 +935,8 @@ + --enable-gold use gold instead of ld + --enable-libada build libada directory + --enable-libssp build libssp directory +- --disable-ppl-version-check disable check for PPL version ++ --disable-ppl-version-check ++ disable check for PPL version + --disable-cloog-version-check disable check for CLooG version + --enable-stage1-languages[=all] choose additional languages to build during + stage1. Mostly useful for compiler development. +@@ -971,11 +972,12 @@ + --with-gmp-lib=PATH specify directory for the installed GMP library + --with-host-libstdcxx=L Use linker arguments L to link with libstdc++ + when linking with PPL +- --with-ppl=PATH Specify prefix directory for the installed PPL package +- Equivalent to --with-ppl-include=PATH/include +- plus --with-ppl-lib=PATH/lib +- --with-ppl-include=PATH Specify directory for installed PPL include files +- --with-ppl-lib=PATH Specify the directory for the installed PPL library ++ --with-ppl=PATH specify prefix directory for the installed PPL ++ package. Equivalent to ++ --with-ppl-include=PATH/include plus ++ --with-ppl-lib=PATH/lib ++ --with-ppl-include=PATH specify directory for installed PPL include files ++ --with-ppl-lib=PATH specify directory for the installed PPL library + --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package + Equivalent to --with-cloog-include=PATH/include + plus --with-cloog-lib=PATH/lib +@@ -2267,6 +2269,7 @@ + noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap" + ;; + *-*-rtems*) ++ skipdirs="$skipdirs target-libiberty" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" + ;; + # The tpf target doesn't support gdb yet. +@@ -4829,10 +4832,9 @@ + esac + + # Check for PPL +-ppl_major_version=0 +-ppl_minor_version=10 +-ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx " ++ppllibs= + pplinc= ++pwllib= + + + # Check whether --with-ppl or --without-ppl was given. +@@ -4841,55 +4843,143 @@ + + fi; + +-# Check whether --with-ppl_include or --without-ppl_include was given. ++# Check whether --with-ppl-include or --without-ppl-include was given. + if test "${with_ppl_include+set}" = set; then + withval="$with_ppl_include" + + fi; + +-# Check whether --with-ppl_lib or --without-ppl_lib was given. ++# Check whether --with-ppl-lib or --without-ppl-lib was given. + if test "${with_ppl_lib+set}" = set; then + withval="$with_ppl_lib" + + fi; + ++# Check whether --enable-ppl-version-check or --disable-ppl-version-check was given. ++if test "${enable_ppl_version_check+set}" = set; then ++ enableval="$enable_ppl_version_check" ++ ++fi; ++ + case $with_ppl in +- no) +- ppllibs= ++ yes | no | "") + ;; + *) +- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx" ++ ppllibs="-L$with_ppl/lib" + pplinc="-I$with_ppl/include $pplinc" +- LIBS="$ppllibs $LIBS" ++ if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then ++ with_ppl=yes ++ else ++ { { echo "$as_me:$LINENO: error: cannot find directories \"$with_ppl/lib\" or \"$with_ppl/include\"" >&5 ++echo "$as_me: error: cannot find directories \"$with_ppl/lib\" or \"$with_ppl/include\"" >&2;} ++ { (exit 1); exit 1; }; } ++ fi + ;; + esac +-if test "x$with_ppl_include" != x; then ++ ++if test x"$with_ppl_include" != x; then + pplinc="-I$with_ppl_include $pplinc" ++ with_ppl=yes + fi ++ + if test "x$with_ppl_lib" != x; then +- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx" +- LIBS="$ppllibs $LIBS" ++ ppllibs="-L$with_ppl_lib" ++ with_ppl=yes + fi +-if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then +- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx " +- pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include ' +- LIBS="$ppllibs $LIBS" ++ ++if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then ++ if test x"$enable_watchdog" = xyes; then ++ pwllib="-lpwl" ++ fi ++ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir" ++ pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' ++ enable_ppl_version_check=no ++ with_ppl=yes + fi + +-# Check whether --enable-ppl-version-check or --disable-ppl-version-check was given. +-if test "${enable_ppl_version_check+set}" = set; then +- enableval="$enable_ppl_version_check" +- ENABLE_PPL_CHECK=$enableval ++if test "x$with_ppl" != xno; then ++ if test "x$pwllib" = x; then ++ saved_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS $ppllibs" ++ echo "$as_me:$LINENO: checking for PWL_handle_timeout in -lpwl" >&5 ++echo $ECHO_N "checking for PWL_handle_timeout in -lpwl... $ECHO_C" >&6 ++if test "${ac_cv_lib_pwl_PWL_handle_timeout+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ENABLE_PPL_CHECK=yes +-fi; ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lpwl $LIBS" ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ + +-if test "${ENABLE_PPL_CHECK}" = "yes"; then +- saved_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $pplinc $gmpinc" +- echo "$as_me:$LINENO: checking for version $ppl_major_version.$ppl_minor_version of PPL" >&5 +-echo $ECHO_N "checking for version $ppl_major_version.$ppl_minor_version of PPL... $ECHO_C" >&6 +- cat >conftest.$ac_ext <<_ACEOF ++/* 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 PWL_handle_timeout (); ++int ++main () ++{ ++PWL_handle_timeout (); ++ ; ++ 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 ++ ac_cv_lib_pwl_PWL_handle_timeout=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_lib_pwl_PWL_handle_timeout=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:$LINENO: result: $ac_cv_lib_pwl_PWL_handle_timeout" >&5 ++echo "${ECHO_T}$ac_cv_lib_pwl_PWL_handle_timeout" >&6 ++if test $ac_cv_lib_pwl_PWL_handle_timeout = yes; then ++ pwllib="-lpwl" ++fi ++ ++ LDFLAGS="$saved_LDFLAGS" ++ fi ++ ++ ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx" ++ ++ if test "$enable_ppl_version_check" != no; then ++ saved_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $pplinc $gmpinc" ++ echo "$as_me:$LINENO: checking for version 0.10 (revision 0 or later) of PPL" >&5 ++echo $ECHO_N "checking for version 0.10 (revision 0 or later) of PPL... $ECHO_C" >&6 ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4900,9 +4990,9 @@ + main () + { + +- #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version +- choke me +- #endif ++ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 ++ choke me ++ #endif + + ; + return 0; +@@ -4937,10 +5027,11 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; ppllibs= ; pplinc= ++echo "${ECHO_T}no" >&6; ppllibs= ; pplinc= ; with_ppl=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$saved_CFLAGS" ++ CFLAGS="$saved_CFLAGS" ++ fi + fi + + # Flags needed for PPL +@@ -6259,7 +6350,7 @@ + # to it. This is right: we don't want to search that directory + # for binaries, but we want the header files in there, so add + # them explicitly. +- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include' ++ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed' + + # Someone might think of using the pre-installed headers on + # Canadian crosses, in case the installed compiler is not fully +diff -Naur gcc-4.4.6.orig/configure.ac gcc-4.4.6/configure.ac +--- gcc-4.4.6.orig/configure.ac 2010-10-02 13:40:32.000000000 +0200 ++++ gcc-4.4.6/configure.ac 2011-08-29 07:16:18.131123743 +0200 +@@ -502,6 +502,7 @@ + noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap" + ;; + *-*-rtems*) ++ skipdirs="$skipdirs target-libiberty" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" + ;; + # The tpf target doesn't support gdb yet. +@@ -1328,55 +1329,81 @@ + esac + + # Check for PPL +-ppl_major_version=0 +-ppl_minor_version=10 +-ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx " ++ppllibs= + pplinc= ++pwllib= + +-AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package +- Equivalent to --with-ppl-include=PATH/include +- plus --with-ppl-lib=PATH/lib]) +-AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files]) +-AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library]) ++AC_ARG_WITH(ppl, ++[AS_HELP_STRING([--with-ppl=PATH], ++ [specify prefix directory for the installed PPL package. ++ Equivalent to --with-ppl-include=PATH/include ++ plus --with-ppl-lib=PATH/lib])]) ++AC_ARG_WITH(ppl-include, ++[AS_HELP_STRING([--with-ppl-include=PATH], ++ [specify directory for installed PPL include files])]) ++AC_ARG_WITH(ppl-lib, ++[AS_HELP_STRING([--with-ppl-lib=PATH], ++ [specify directory for the installed PPL library])]) + +-case $with_ppl in +- no) +- ppllibs= ++AC_ARG_ENABLE(ppl-version-check, ++[AS_HELP_STRING([--disable-ppl-version-check], ++ [disable check for PPL version])]) ++ ++case $with_ppl in ++ yes | no | "") + ;; + *) +- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx" ++ ppllibs="-L$with_ppl/lib" + pplinc="-I$with_ppl/include $pplinc" +- LIBS="$ppllibs $LIBS" ++ if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then ++ with_ppl=yes ++ else ++ AC_MSG_ERROR([cannot find directories "$with_ppl/lib" or "$with_ppl/include"]) ++ fi + ;; + esac +-if test "x$with_ppl_include" != x; then ++ ++if test x"$with_ppl_include" != x; then + pplinc="-I$with_ppl_include $pplinc" ++ with_ppl=yes + fi ++ + if test "x$with_ppl_lib" != x; then +- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx" +- LIBS="$ppllibs $LIBS" ++ ppllibs="-L$with_ppl_lib" ++ with_ppl=yes + fi +-if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then +- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx " +- pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include ' +- LIBS="$ppllibs $LIBS" ++ ++if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then ++ if test x"$enable_watchdog" = xyes; then ++ pwllib="-lpwl" ++ fi ++ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir" ++ pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' ++ enable_ppl_version_check=no ++ with_ppl=yes + fi + +-AC_ARG_ENABLE(ppl-version-check, +-[ --disable-ppl-version-check disable check for PPL version], +-ENABLE_PPL_CHECK=$enableval, +-ENABLE_PPL_CHECK=yes) ++if test "x$with_ppl" != xno; then ++ if test "x$pwllib" = x; then ++ saved_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS $ppllibs" ++ AC_CHECK_LIB(pwl,PWL_handle_timeout,[pwllib="-lpwl"]) ++ LDFLAGS="$saved_LDFLAGS" ++ fi + +-if test "${ENABLE_PPL_CHECK}" = "yes"; then +- saved_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $pplinc $gmpinc" +- AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL]) +- AC_TRY_COMPILE([#include "ppl_c.h"],[ +- #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version +- choke me +- #endif +- ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ]) +- CFLAGS="$saved_CFLAGS" ++ ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx" ++ ++ if test "$enable_ppl_version_check" != no; then ++ saved_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $pplinc $gmpinc" ++ AC_MSG_CHECKING([for version 0.10 (revision 0 or later) of PPL]) ++ AC_TRY_COMPILE([#include "ppl_c.h"],[ ++ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 ++ choke me ++ #endif ++ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) ++ CFLAGS="$saved_CFLAGS" ++ fi + fi + + # Flags needed for PPL +@@ -2560,7 +2587,7 @@ + # to it. This is right: we don't want to search that directory + # for binaries, but we want the header files in there, so add + # them explicitly. +- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include' ++ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed' + + # Someone might think of using the pre-installed headers on + # Canadian crosses, in case the installed compiler is not fully +diff -Naur gcc-4.4.6.orig/gcc/ChangeLog.rtems gcc-4.4.6/gcc/ChangeLog.rtems +--- gcc-4.4.6.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/ChangeLog.rtems 2011-08-29 07:16:18.132123787 +0200 +@@ -0,0 +1,60 @@ ++2011-08-29 Ralf Corsépius ++ and Eric Norum ++ ++ Fix bootstrap breakdowns on OS X 10.7.1 (Lion): ++ * toplev.h, toplev.c: Switch-off "extern inline" if using clang. ++ ++2011-02-20 Ralf Corsépius ++ ++ * config/rs6000/t-rtems: Remove -mcpu=601 multilib. ++ * config/rs6000/t-rtems: Remove -Dmpc8260 multilib. ++ ++2010-03-15 Ralf Corsépius ++ ++ Patch from Thomas Doerfler : ++ * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support ++ for vfp FPU model ++ ++2010-02-10 Ralf Corsépius ++ ++ * config/rtems.h: Abandon -qrtems_debug. ++ ++2009-12-01 Ralf Corsépius ++ ++ * config/avr/avr.h (LINK_SPEC): Pass -m avrN to ld for -mmcu=avrN. ++ ++2009-11-04 Ralf Corsépius ++ ++ * config/m32c/rtems.h, config/m68k/rtemself.h, ++ config/m68k/rtemself.h, config/sh/rtemself.h, ++ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE. ++ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files ++ to interfere and cause wchar_t/wint_t incompatibilities). ++ ++2009-10-15 Ralf Corsépius ++ ++ * config/avr/t-rtems: Don't build _exit. ++ ++ Jon Beniston ++ ++ * config/lm32/arithmetic.c, config/lm32/crti.S, ++ config/lm32/crtn.S, config/lm32/lib1funcs.S, ++ config/lm32/lm32.c, config/lm32/lm32.h, ++ config/lm32/lm32.md, config/lm32/lm32.opt, ++ config/lm32/lm32-protos.h, config/lm32/predicates.md, ++ config/lm32/rtems.h, config/lm32/sfp-machine.h, ++ config/lm32/t-fprules-softfp, config/lm32/t-lm32, ++ config/lm32/uclinux-elf.h: New (lm32 port). ++ * config.gcc: Add lm32* targets. ++ * doc/contrib.texi, doc/invoke.texi: Add lm32. ++ ++ Ralf Corsépius ++ ++ * config/rs6000/rtems.h: Support for custom RTEMS multilibs. ++ Support TARGET_E500. ++ * config/rs6000/t-rtems: Custom RTEMS multilibs. ++ ++ Ralf Corsépius ++ ++ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C. ++ +\ No newline at end of file +diff -Naur gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h gcc-4.4.6/gcc/config/arm/rtems-elf.h +--- gcc-4.4.6.orig/gcc/config/arm/rtems-elf.h 2009-03-25 13:54:16.000000000 +0100 ++++ gcc-4.4.6/gcc/config/arm/rtems-elf.h 2011-08-29 07:16:18.132123787 +0200 +@@ -36,7 +36,7 @@ + */ + #undef SUBTARGET_EXTRA_ASM_SPEC + #define SUBTARGET_EXTRA_ASM_SPEC "\ +- %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}" ++ %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}" + + /* + * The default includes --start-group and --end-group which conflicts +diff -Naur gcc-4.4.6.orig/gcc/config/arm/t-rtems gcc-4.4.6/gcc/config/arm/t-rtems +--- gcc-4.4.6.orig/gcc/config/arm/t-rtems 2004-11-23 06:30:32.000000000 +0100 ++++ gcc-4.4.6/gcc/config/arm/t-rtems 2011-08-29 07:16:18.133123835 +0200 +@@ -5,6 +5,41 @@ + MULTILIB_EXCEPTIONS = + MULTILIB_MATCHES = marm=mno-thumb + +-MULTILIB_OPTIONS += msoft-float/mhard-float +-MULTILIB_DIRNAMES += soft fpu +-MULTILIB_EXCEPTIONS += *mthumb/*mhard-float* ++MULTILIB_OPTIONS += mhard-float/mfloat-abi=softfp ++MULTILIB_DIRNAMES += fpu softfp ++MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp* ++MULTILIB_MATCHES = ++ ++MULTILIB_OPTIONS += mfpu=vfp ++MULTILIB_DIRNAMES += vfp ++MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa* ++MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp ++ ++# default float model is fpa, so don't create a explicit copy of it ++MULTILIB_EXCEPTIONS += *marm*/*mfpa* ++ ++# permutations of the options which are useful (+) or make no sense (-), ++# defaults are in brackets: ++# + (arm/soft/fpa) ++# + (arm/soft)/vfp ++# - (arm)/softfp(/fpa) ++# + (arm)/softfp/vfp ++# + (arm)/hard-float(/fpa) ++# - (arm)/hard-float/vfp ++# + thumb/(soft/fpa) ++# + thumb/(soft/)vfp ++# - thumb/softfp/fpa ++# - thumb/softfp/vfp ++# - thumb/hard-float/fpa ++# - thumb/hard-float/vfp ++ ++# subdirs to be used for multilibs and their respective options: ++#/thumb/vfp -> thumb/soft/vfp ++#/thumb/fpa -> thumb/soft/fpa ++#/thumb -> thumb/soft/fpa ++#/vfp -> arm/soft/vfp ++#/softfp/vfp -> arm/softfp/cfp ++#/fpu/fpa -> arm/hard/fpa ++#/fpu -> arm/hard/fpa ++#/fpa -> arm/soft/fpa ++#. -> arm/soft/fpa +diff -Naur gcc-4.4.6.orig/gcc/config/avr/avr.h gcc-4.4.6/gcc/config/avr/avr.h +--- gcc-4.4.6.orig/gcc/config/avr/avr.h 2009-03-28 22:09:50.000000000 +0100 ++++ gcc-4.4.6/gcc/config/avr/avr.h 2011-08-29 07:16:18.133123835 +0200 +@@ -811,12 +811,15 @@ + mmcu=at90can64*|\ + mmcu=at90usb64*:--pmem-wrap-around=64k}}}\ + %{!mmcu*: -m avr2}\ +-%{mmcu=at90s1200|\ ++%{mmcu=avr1|\ ++ mmcu=at90s1200|\ + mmcu=attiny11|\ + mmcu=attiny12|\ + mmcu=attiny15|\ + mmcu=attiny28: -m avr1}\ +-%{mmcu=attiny22|\ ++%{mmcu=avr2|\ ++ mmcu=avr25|\ ++ mmcu=attiny22|\ + mmcu=attiny26|\ + mmcu=at90s2*|\ + mmcu=at90s4*|\ +@@ -831,14 +834,18 @@ + mmcu=attiny261|\ + mmcu=attiny4*|\ + mmcu=attiny8*: -m avr2}\ +-%{mmcu=atmega103|\ ++%{mmcu=avr3|\ ++ mmcu=avr31|\ ++ mmcu=avr35|\ ++ mmcu=atmega103|\ + mmcu=at43*|\ + mmcu=at76*|\ + mmcu=at90usb82|\ + mmcu=at90usb162|\ + mmcu=attiny16*|\ + mmcu=attiny32*: -m avr3}\ +-%{mmcu=atmega8*|\ ++%{mmcu=avr4|\ ++ mmcu=atmega8*|\ + mmcu=atmega4*|\ + mmcu=at90pwm1|\ + mmcu=at90pwm2|\ +@@ -846,7 +853,9 @@ + mmcu=at90pwm3|\ + mmcu=at90pwm3b|\ + mmcu=at90pwm81: -m avr4}\ +-%{mmcu=atmega16*|\ ++%{mmcu=avr5|\ ++ mmcu=avr51|\ ++ mmcu=atmega16*|\ + mmcu=atmega32*|\ + mmcu=atmega406|\ + mmcu=atmega64*|\ +@@ -860,7 +869,8 @@ + mmcu=at94k|\ + mmcu=m3000*|\ + mmcu=m3001*: -m avr5}\ +-%{mmcu=atmega256*:-m avr6}\ ++%{mmcu=avr6|\ ++ mmcu=atmega256*:-m avr6}\ + %{mmcu=atmega324*|\ + mmcu=atmega325*|\ + mmcu=atmega328p|\ +diff -Naur gcc-4.4.6.orig/gcc/config/avr/t-rtems gcc-4.4.6/gcc/config/avr/t-rtems +--- gcc-4.4.6.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100 ++++ gcc-4.4.6/gcc/config/avr/t-rtems 2011-08-29 07:16:18.133123835 +0200 +@@ -1,3 +1,4 @@ + # Multilibs for avr RTEMS targets. + +-# ATM, this is just a stub ++# RTEMS uses _exit from newlib ++LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS)) +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c gcc-4.4.6/gcc/config/lm32/arithmetic.c +--- gcc-4.4.6.orig/gcc/config/lm32/arithmetic.c 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/arithmetic.c 2011-08-29 07:16:18.133123835 +0200 +@@ -0,0 +1,305 @@ ++/* Fixed-point arithmetic for Lattice Mico32. ++ Contributed by Jon Beniston ++ ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ ++ This file 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. ++ ++ In addition to the permissions in the GNU General Public License, the ++ Free Software Foundation gives you unlimited permission to link the ++ compiled version of this file into combinations with other programs, ++ and to distribute those combinations without any restriction coming ++ from the use of this file. (The General Public License restrictions ++ do apply in other respects; for example, they cover modification of ++ the file, and distribution when not linked into a combine ++ executable.) ++ ++ This file is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; see the file COPYING. If not, write to ++ the Free Software Foundation, 51 Franklin Street, Fifth Floor, ++ Boston, MA 02110-1301, USA. */ ++ ++typedef unsigned long UQItype __attribute__ ((mode (QI))); ++typedef long SItype __attribute__ ((mode (SI))); ++typedef unsigned long USItype __attribute__ ((mode (SI))); ++ ++/* Prototypes */ ++ ++USItype __mulsi3 (USItype a, USItype b); ++ ++USItype __udivmodsi4 (USItype num, USItype den, int modwanted); ++SItype __divsi3 (SItype a, SItype b); ++SItype __modsi3 (SItype a, SItype b); ++USItype __udivsi3 (USItype a, USItype b); ++USItype __umodsi3 (USItype a, USItype b); ++ ++SItype __ashlsi3 (SItype a, SItype b); ++SItype __ashrsi3 (SItype a, SItype b); ++USItype __lshrsi3 (USItype a, USItype b); ++ ++/* Multiplication */ ++ ++#ifdef L_mulsi3 ++USItype ++__mulsi3 (USItype a, USItype b) ++{ ++ USItype result; ++ ++ result = 0; ++ ++ if (a==0) ++ return 0; ++ ++ while (b!=0) ++ { ++ if (b & 1) ++ result += a; ++ a <<= 1; ++ b >>= 1; ++ } ++ ++ return result; ++} ++#endif ++ ++/* Division */ ++ ++#ifdef L_udivmodsi4 ++USItype ++__udivmodsi4 (USItype num, USItype den, int modwanted) ++{ ++ USItype bit = 1; ++ USItype res = 0; ++ ++ while (den < num && bit && !(den & (1L<<31))) ++ { ++ den <<=1; ++ bit <<=1; ++ } ++ while (bit) ++ { ++ if (num >= den) ++ { ++ num -= den; ++ res |= bit; ++ } ++ bit >>=1; ++ den >>=1; ++ } ++ if (modwanted) ++ return num; ++ return res; ++} ++#endif ++ ++#ifdef L_divsi3 ++ ++static const UQItype __divsi3_table[] = { ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 7, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 8, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, ++ 0, 9, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, ++ 0, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, ++ 0, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, ++ 0, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, ++ 0, 13, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, ++ 0, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, ++ 0, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, ++}; ++ ++SItype ++__divsi3 (SItype a, SItype b) ++{ ++ int neg = 0; ++ SItype res; ++ int cfg; ++ ++ if (b == 0) ++ { ++ /* Raise divide by zero exception */ ++ int eba; ++ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); ++ eba += 32 * 5; ++ __asm__ __volatile__ ("mv ea, ra"); ++ __asm__ __volatile__ ("b %0" : : "r" (eba)); ++ } ++ ++ if (((USItype)(a | b)) < 16) ++ { ++ res = __divsi3_table[(a << 4) + b]; ++ } ++ else ++ { ++ ++ if (a < 0) ++ { ++ a = -a; ++ neg = !neg; ++ } ++ ++ if (b < 0) ++ { ++ b = -b; ++ neg = !neg; ++ } ++ ++ __asm__ ("rcsr %0, CFG" : "=r" (cfg)); ++ if (cfg & 2) ++ __asm__ ("divu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b)); ++ else ++ res = __udivmodsi4 (a, b, 0); ++ ++ if (neg) ++ res = -res; ++ } ++ ++ return res; ++} ++#endif ++ ++#ifdef L_modsi3 ++SItype ++__modsi3 (SItype a, SItype b) ++{ ++ int neg = 0; ++ SItype res; ++ int cfg; ++ ++ if (b == 0) ++ { ++ /* Raise divide by zero exception */ ++ int eba, sr; ++ /* Save interrupt enable */ ++ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr)); ++ sr = (sr & 1) << 1; ++ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr)); ++ /* Branch to exception handler */ ++ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); ++ eba += 32 * 5; ++ __asm__ __volatile__ ("mv ea, ra"); ++ __asm__ __volatile__ ("b %0" : : "r" (eba)); ++ } ++ ++ if (a < 0) ++ { ++ a = -a; ++ neg = 1; ++ } ++ ++ if (b < 0) ++ b = -b; ++ ++ __asm__ ("rcsr %0, CFG" : "=r" (cfg)); ++ if (cfg & 2) ++ __asm__ ("modu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b)); ++ else ++ res = __udivmodsi4 (a, b, 1); ++ ++ if (neg) ++ res = -res; ++ ++ return res; ++} ++#endif ++ ++#ifdef L_udivsi3 ++USItype ++__udivsi3 (USItype a, USItype b) ++{ ++ if (b == 0) ++ { ++ /* Raise divide by zero exception */ ++ int eba, sr; ++ /* Save interrupt enable */ ++ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr)); ++ sr = (sr & 1) << 1; ++ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr)); ++ /* Branch to exception handler */ ++ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); ++ eba += 32 * 5; ++ __asm__ __volatile__ ("mv ea, ra"); ++ __asm__ __volatile__ ("b %0" : : "r" (eba)); ++ } ++ ++ return __udivmodsi4 (a, b, 0); ++} ++#endif ++ ++#ifdef L_umodsi3 ++USItype ++__umodsi3 (USItype a, USItype b) ++{ ++ if (b == 0) ++ { ++ /* Raise divide by zero exception */ ++ int eba, sr; ++ /* Save interrupt enable */ ++ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr)); ++ sr = (sr & 1) << 1; ++ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr)); ++ /* Branch to exception handler */ ++ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); ++ eba += 32 * 5; ++ __asm__ __volatile__ ("mv ea, ra"); ++ __asm__ __volatile__ ("b %0" : : "r" (eba)); ++ } ++ ++ return __udivmodsi4 (a, b, 1); ++} ++#endif ++ ++#if 0 ++ ++/* Shifts - Optimized versions implemented in assembly. Use these if code space is preferred to performance. */ ++ ++#ifdef L_ashlsi3 ++SItype ++__ashlsi3 (SItype a, SItype b) ++{ ++ int i; ++ ++ for (i = (b & 0x1f); i > 0; --i) ++ a += a; ++ return a; ++} ++#endif ++ ++#ifdef L_ashrsi3 ++SItype ++__ashrsi3 (SItype a, SItype b) ++{ ++ int i; ++ ++ for (i = (b & 0x1f); i > 0; --i) ++ __asm__ ("sri %0, %0, 1" : "=r" (a) : "0" (a)); ++ return a; ++} ++#endif ++ ++#ifdef L_lshrsi3 ++USItype ++__lshrsi3 (USItype a, USItype b) ++{ ++ int i; ++ ++ for (i = (b & 0x1f); i > 0; --i) ++ __asm__ ("srui %0, %0, 1" : "=r" (a) : "0" (a)); ++ return a; ++} ++#endif ++ ++#endif +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crti.S gcc-4.4.6/gcc/config/lm32/crti.S +--- gcc-4.4.6.orig/gcc/config/lm32/crti.S 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/crti.S 2011-08-29 07:16:18.133123835 +0200 +@@ -0,0 +1,45 @@ ++# crti.S for Lattice Mico32 ++# Contributed by Jon Beniston ++# ++# Copyright (C) 2008 Free Software Foundation, Inc. ++# ++# This file 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. ++# ++# In addition to the permissions in the GNU General Public License, the ++# Free Software Foundation gives you unlimited permission to link the ++# compiled version of this file into combinations with other programs, ++# and to distribute those combinations without any restriction coming ++# from the use of this file. (The General Public License restrictions ++# do apply in other respects; for example, they cover modification of ++# the file, and distribution when not linked into a combine ++# executable.) ++# ++# This file is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; see the file COPYING. If not, write to ++# the Free Software Foundation, 51 Franklin Street, Fifth Floor, ++# Boston, MA 02110-1301, USA. ++# ++ ++ .section .init ++ .global _init ++ .type _init,@function ++ .align 4 ++_init: ++ addi sp, sp, -4 ++ sw (sp+4), ra ++ ++ .section .fini ++ .global _fini ++ .type _fini,@function ++ .align 4 ++_fini: ++ addi sp, sp, -4 ++ sw (sp+4), ra +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/crtn.S gcc-4.4.6/gcc/config/lm32/crtn.S +--- gcc-4.4.6.orig/gcc/config/lm32/crtn.S 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/crtn.S 2011-08-29 07:16:18.134123880 +0200 +@@ -0,0 +1,42 @@ ++# crtn.S for Lattice Mico32 ++# Contributed by Jon Beniston ++# ++# Copyright (C) 2008 Free Software Foundation, Inc. ++# ++# This file 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. ++# ++# In addition to the permissions in the GNU General Public License, the ++# Free Software Foundation gives you unlimited permission to link the ++# compiled version of this file into combinations with other programs, ++# and to distribute those combinations without any restriction coming ++# from the use of this file. (The General Public License restrictions ++# do apply in other respects; for example, they cover modification of ++# the file, and distribution when not linked into a combine ++# executable.) ++# ++# This file is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; see the file COPYING. If not, write to ++# the Free Software Foundation, 51 Franklin Street, Fifth Floor, ++# Boston, MA 02110-1301, USA. ++# ++ ++ .section .init ++ ++ lw ra, (sp+4) ++ addi sp, sp, 4 ++ ret ++ ++ .section .fini ++ ++ lw ra, (sp+4) ++ addi sp, sp, 4 ++ ret ++ +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S gcc-4.4.6/gcc/config/lm32/lib1funcs.S +--- gcc-4.4.6.orig/gcc/config/lm32/lib1funcs.S 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/lib1funcs.S 2011-08-29 07:16:18.134123880 +0200 +@@ -0,0 +1,429 @@ ++# lib1funcs.S for Lattice Mico32 ++# Contributed by Jon Beniston ++# ++# Copyright (C) 2008 Free Software Foundation, Inc. ++# ++# This file 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. ++# ++# In addition to the permissions in the GNU General Public License, the ++# Free Software Foundation gives you unlimited permission to link the ++# compiled version of this file into combinations with other programs, ++# and to distribute those combinations without any restriction coming ++# from the use of this file. (The General Public License restrictions ++# do apply in other respects; for example, they cover modification of ++# the file, and distribution when not linked into a combine ++# executable.) ++# ++# This file is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; see the file COPYING. If not, write to ++# the Free Software Foundation, 51 Franklin Street, Fifth Floor, ++# Boston, MA 02110-1301, USA. ++# ++ ++/* Arithmetic left shift */ ++ ++ .text ++ ++ .global __ashlsi3 ++ .type __ashlsi3,@function ++ .align 4 ++ ++__ashlsi3: ++ /* Only use 5 LSBs, as that's all the h/w shifter uses */ ++ andi r2, r2, 0x1f ++ /* Get address of offset into unrolled shift loop to jump to */ ++#ifdef __PIC__ ++ orhi r3, r0, gotoffhi16(__ashlsi3_table) ++ addi r3, r3, gotofflo16(__ashlsi3_table) ++ add r3, r3, gp ++#else ++ mvhi r3, hi(__ashlsi3_table) ++ ori r3, r3, lo(__ashlsi3_table) ++#endif ++ add r2, r2, r2 ++ add r2, r2, r2 ++ add r3, r3, r2 ++ lw r3, (r3+0) ++ b r3 ++ ++__ashlsi3_31: ++ add r1, r1, r1 ++__ashlsi3_30: ++ add r1, r1, r1 ++__ashlsi3_29: ++ add r1, r1, r1 ++__ashlsi3_28: ++ add r1, r1, r1 ++__ashlsi3_27: ++ add r1, r1, r1 ++__ashlsi3_26: ++ add r1, r1, r1 ++__ashlsi3_25: ++ add r1, r1, r1 ++__ashlsi3_24: ++ add r1, r1, r1 ++__ashlsi3_23: ++ add r1, r1, r1 ++__ashlsi3_22: ++ add r1, r1, r1 ++__ashlsi3_21: ++ add r1, r1, r1 ++__ashlsi3_20: ++ add r1, r1, r1 ++__ashlsi3_19: ++ add r1, r1, r1 ++__ashlsi3_18: ++ add r1, r1, r1 ++__ashlsi3_17: ++ add r1, r1, r1 ++__ashlsi3_16: ++ add r1, r1, r1 ++__ashlsi3_15: ++ add r1, r1, r1 ++__ashlsi3_14: ++ add r1, r1, r1 ++__ashlsi3_13: ++ add r1, r1, r1 ++__ashlsi3_12: ++ add r1, r1, r1 ++__ashlsi3_11: ++ add r1, r1, r1 ++__ashlsi3_10: ++ add r1, r1, r1 ++__ashlsi3_9: ++ add r1, r1, r1 ++__ashlsi3_8: ++ add r1, r1, r1 ++__ashlsi3_7: ++ add r1, r1, r1 ++__ashlsi3_6: ++ add r1, r1, r1 ++__ashlsi3_5: ++ add r1, r1, r1 ++__ashlsi3_4: ++ add r1, r1, r1 ++__ashlsi3_3: ++ add r1, r1, r1 ++__ashlsi3_2: ++ add r1, r1, r1 ++__ashlsi3_1: ++ add r1, r1, r1 ++__ashlsi3_0: ++ ret ++ ++#ifdef __PIC__ ++ .section .data ++#else ++ .section .rodata ++#endif ++ ++ .align 4 ++ ++__ashlsi3_table: ++ .word __ashlsi3_0 ++ .word __ashlsi3_1 ++ .word __ashlsi3_2 ++ .word __ashlsi3_3 ++ .word __ashlsi3_4 ++ .word __ashlsi3_5 ++ .word __ashlsi3_6 ++ .word __ashlsi3_7 ++ .word __ashlsi3_8 ++ .word __ashlsi3_9 ++ .word __ashlsi3_10 ++ .word __ashlsi3_11 ++ .word __ashlsi3_12 ++ .word __ashlsi3_13 ++ .word __ashlsi3_14 ++ .word __ashlsi3_15 ++ .word __ashlsi3_16 ++ .word __ashlsi3_17 ++ .word __ashlsi3_18 ++ .word __ashlsi3_19 ++ .word __ashlsi3_20 ++ .word __ashlsi3_21 ++ .word __ashlsi3_22 ++ .word __ashlsi3_23 ++ .word __ashlsi3_24 ++ .word __ashlsi3_25 ++ .word __ashlsi3_26 ++ .word __ashlsi3_27 ++ .word __ashlsi3_28 ++ .word __ashlsi3_29 ++ .word __ashlsi3_30 ++ .word __ashlsi3_31 ++ ++/* Logical right shift */ ++ ++ .text ++ ++ .global __lshrsi3 ++ .type __lshrsi3,@function ++ .align 4 ++ ++__lshrsi3: ++ /* Only use 5 LSBs, as that's all the h/w shifter uses */ ++ andi r2, r2, 0x1f ++ /* Get address of offset into unrolled shift loop to jump to */ ++#ifdef __PIC__ ++ orhi r3, r0, gotoffhi16(__lshrsi3_table) ++ addi r3, r3, gotofflo16(__lshrsi3_table) ++ add r3, r3, gp ++#else ++ mvhi r3, hi(__lshrsi3_table) ++ ori r3, r3, lo(__lshrsi3_table) ++#endif ++ add r2, r2, r2 ++ add r2, r2, r2 ++ add r3, r3, r2 ++ lw r3, (r3+0) ++ b r3 ++ ++__lshrsi3_31: ++ srui r1, r1, 1 ++__lshrsi3_30: ++ srui r1, r1, 1 ++__lshrsi3_29: ++ srui r1, r1, 1 ++__lshrsi3_28: ++ srui r1, r1, 1 ++__lshrsi3_27: ++ srui r1, r1, 1 ++__lshrsi3_26: ++ srui r1, r1, 1 ++__lshrsi3_25: ++ srui r1, r1, 1 ++__lshrsi3_24: ++ srui r1, r1, 1 ++__lshrsi3_23: ++ srui r1, r1, 1 ++__lshrsi3_22: ++ srui r1, r1, 1 ++__lshrsi3_21: ++ srui r1, r1, 1 ++__lshrsi3_20: ++ srui r1, r1, 1 ++__lshrsi3_19: ++ srui r1, r1, 1 ++__lshrsi3_18: ++ srui r1, r1, 1 ++__lshrsi3_17: ++ srui r1, r1, 1 ++__lshrsi3_16: ++ srui r1, r1, 1 ++__lshrsi3_15: ++ srui r1, r1, 1 ++__lshrsi3_14: ++ srui r1, r1, 1 ++__lshrsi3_13: ++ srui r1, r1, 1 ++__lshrsi3_12: ++ srui r1, r1, 1 ++__lshrsi3_11: ++ srui r1, r1, 1 ++__lshrsi3_10: ++ srui r1, r1, 1 ++__lshrsi3_9: ++ srui r1, r1, 1 ++__lshrsi3_8: ++ srui r1, r1, 1 ++__lshrsi3_7: ++ srui r1, r1, 1 ++__lshrsi3_6: ++ srui r1, r1, 1 ++__lshrsi3_5: ++ srui r1, r1, 1 ++__lshrsi3_4: ++ srui r1, r1, 1 ++__lshrsi3_3: ++ srui r1, r1, 1 ++__lshrsi3_2: ++ srui r1, r1, 1 ++__lshrsi3_1: ++ srui r1, r1, 1 ++__lshrsi3_0: ++ ret ++ ++#ifdef __PIC__ ++ .section .data ++#else ++ .section .rodata ++#endif ++ ++ .align 4 ++ ++__lshrsi3_table: ++ .word __lshrsi3_0 ++ .word __lshrsi3_1 ++ .word __lshrsi3_2 ++ .word __lshrsi3_3 ++ .word __lshrsi3_4 ++ .word __lshrsi3_5 ++ .word __lshrsi3_6 ++ .word __lshrsi3_7 ++ .word __lshrsi3_8 ++ .word __lshrsi3_9 ++ .word __lshrsi3_10 ++ .word __lshrsi3_11 ++ .word __lshrsi3_12 ++ .word __lshrsi3_13 ++ .word __lshrsi3_14 ++ .word __lshrsi3_15 ++ .word __lshrsi3_16 ++ .word __lshrsi3_17 ++ .word __lshrsi3_18 ++ .word __lshrsi3_19 ++ .word __lshrsi3_20 ++ .word __lshrsi3_21 ++ .word __lshrsi3_22 ++ .word __lshrsi3_23 ++ .word __lshrsi3_24 ++ .word __lshrsi3_25 ++ .word __lshrsi3_26 ++ .word __lshrsi3_27 ++ .word __lshrsi3_28 ++ .word __lshrsi3_29 ++ .word __lshrsi3_30 ++ .word __lshrsi3_31 ++ ++/* Arithmetic right shift */ ++ ++ .text ++ ++ .global __ashrsi3 ++ .type __ashrsi3,@function ++ .align 4 ++ ++__ashrsi3: ++ /* Only use 5 LSBs, as that's all the h/w shifter uses */ ++ andi r2, r2, 0x1f ++ /* Get address of offset into unrolled shift loop to jump to */ ++#ifdef __PIC__ ++ orhi r3, r0, gotoffhi16(__ashrsi3_table) ++ addi r3, r3, gotofflo16(__ashrsi3_table) ++ add r3, r3, gp ++#else ++ mvhi r3, hi(__ashrsi3_table) ++ ori r3, r3, lo(__ashrsi3_table) ++#endif ++ add r2, r2, r2 ++ add r2, r2, r2 ++ add r3, r3, r2 ++ lw r3, (r3+0) ++ b r3 ++ ++__ashrsi3_31: ++ sri r1, r1, 1 ++__ashrsi3_30: ++ sri r1, r1, 1 ++__ashrsi3_29: ++ sri r1, r1, 1 ++__ashrsi3_28: ++ sri r1, r1, 1 ++__ashrsi3_27: ++ sri r1, r1, 1 ++__ashrsi3_26: ++ sri r1, r1, 1 ++__ashrsi3_25: ++ sri r1, r1, 1 ++__ashrsi3_24: ++ sri r1, r1, 1 ++__ashrsi3_23: ++ sri r1, r1, 1 ++__ashrsi3_22: ++ sri r1, r1, 1 ++__ashrsi3_21: ++ sri r1, r1, 1 ++__ashrsi3_20: ++ sri r1, r1, 1 ++__ashrsi3_19: ++ sri r1, r1, 1 ++__ashrsi3_18: ++ sri r1, r1, 1 ++__ashrsi3_17: ++ sri r1, r1, 1 ++__ashrsi3_16: ++ sri r1, r1, 1 ++__ashrsi3_15: ++ sri r1, r1, 1 ++__ashrsi3_14: ++ sri r1, r1, 1 ++__ashrsi3_13: ++ sri r1, r1, 1 ++__ashrsi3_12: ++ sri r1, r1, 1 ++__ashrsi3_11: ++ sri r1, r1, 1 ++__ashrsi3_10: ++ sri r1, r1, 1 ++__ashrsi3_9: ++ sri r1, r1, 1 ++__ashrsi3_8: ++ sri r1, r1, 1 ++__ashrsi3_7: ++ sri r1, r1, 1 ++__ashrsi3_6: ++ sri r1, r1, 1 ++__ashrsi3_5: ++ sri r1, r1, 1 ++__ashrsi3_4: ++ sri r1, r1, 1 ++__ashrsi3_3: ++ sri r1, r1, 1 ++__ashrsi3_2: ++ sri r1, r1, 1 ++__ashrsi3_1: ++ sri r1, r1, 1 ++__ashrsi3_0: ++ ret ++ ++#ifdef __PIC__ ++ .section .data ++#else ++ .section .rodata ++#endif ++ ++ .align 4 ++ ++__ashrsi3_table: ++ .word __ashrsi3_0 ++ .word __ashrsi3_1 ++ .word __ashrsi3_2 ++ .word __ashrsi3_3 ++ .word __ashrsi3_4 ++ .word __ashrsi3_5 ++ .word __ashrsi3_6 ++ .word __ashrsi3_7 ++ .word __ashrsi3_8 ++ .word __ashrsi3_9 ++ .word __ashrsi3_10 ++ .word __ashrsi3_11 ++ .word __ashrsi3_12 ++ .word __ashrsi3_13 ++ .word __ashrsi3_14 ++ .word __ashrsi3_15 ++ .word __ashrsi3_16 ++ .word __ashrsi3_17 ++ .word __ashrsi3_18 ++ .word __ashrsi3_19 ++ .word __ashrsi3_20 ++ .word __ashrsi3_21 ++ .word __ashrsi3_22 ++ .word __ashrsi3_23 ++ .word __ashrsi3_24 ++ .word __ashrsi3_25 ++ .word __ashrsi3_26 ++ .word __ashrsi3_27 ++ .word __ashrsi3_28 ++ .word __ashrsi3_29 ++ .word __ashrsi3_30 ++ .word __ashrsi3_31 ++ +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.c gcc-4.4.6/gcc/config/lm32/lm32.c +--- gcc-4.4.6.orig/gcc/config/lm32/lm32.c 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/lm32.c 2011-08-29 07:16:18.135123923 +0200 +@@ -0,0 +1,869 @@ ++/* Subroutines used for code generation on the Lattice Mico32 architecture. ++ Contributed by Jon Beniston ++ ++ Copyright (C) 2008 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 3, 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 COPYING3. If not see ++ . */ ++ ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "tm.h" ++#include "rtl.h" ++#include "regs.h" ++#include "hard-reg-set.h" ++#include "basic-block.h" ++#include "real.h" ++#include "insn-config.h" ++#include "conditions.h" ++#include "insn-flags.h" ++#include "insn-attr.h" ++#include "insn-codes.h" ++#include "recog.h" ++#include "output.h" ++#include "tree.h" ++#include "expr.h" ++#include "flags.h" ++#include "reload.h" ++#include "tm_p.h" ++#include "function.h" ++#include "toplev.h" ++#include "optabs.h" ++#include "libfuncs.h" ++#include "ggc.h" ++#include "target.h" ++#include "target-def.h" ++#include "langhooks.h" ++#include "tm-constrs.h" ++#include "df.h" ++ ++struct lm32_frame_info ++{ ++ HOST_WIDE_INT total_size; /* number of bytes that the entire frame takes up. */ ++ HOST_WIDE_INT callee_size; /* number of bytes to save callee save registers */ ++ HOST_WIDE_INT pretend_size; /* number of bytes we push and pretend caller did. */ ++ HOST_WIDE_INT args_size; /* number of bytes that outgoing arguments take up. */ ++ HOST_WIDE_INT locals_size; /* number of bytes that local variables take up. */ ++ unsigned int reg_save_mask; /* mask of saved registers. */ ++}; ++ ++/* Prototypes for static functions */ ++static rtx emit_add (rtx dest, rtx src0, rtx src1); ++static void expand_save_restore (struct lm32_frame_info *info, int op); ++static void abort_with_insn (rtx insn, const char *reason); ++static void stack_adjust (HOST_WIDE_INT amount); ++static bool lm32_in_small_data_p (const_tree); ++static void lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, ++ tree type, int *pretend_size, int no_rtl); ++ ++/* Detemines if given constant can be used as a displacement */ ++#define OFFSET_INT(X) (((X) > -32768) && ((X) < 32768)) ++ ++#undef TARGET_ADDRESS_COST ++#define TARGET_ADDRESS_COST hook_int_rtx_bool_0 ++#undef TARGET_IN_SMALL_DATA_P ++#define TARGET_IN_SMALL_DATA_P lm32_in_small_data_p ++#undef TARGET_PROMOTE_FUNCTION_ARGS ++#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true ++#undef TARGET_PROMOTE_FUNCTION_RETURN ++#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true ++#undef TARGET_SETUP_INCOMING_VARARGS ++#define TARGET_SETUP_INCOMING_VARARGS lm32_setup_incoming_varargs ++#undef TARGET_PROMOTE_PROTOTYPES ++#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true ++ ++struct gcc_target targetm = TARGET_INITIALIZER; ++ ++/* Current frame information calculated by lm32_compute_frame_size. */ ++static struct lm32_frame_info current_frame_info; ++ ++rtx lm32_compare_op0; ++rtx lm32_compare_op1; ++ ++/* Return non-zero if the specified return type should be returned in memory */ ++int ++lm32_return_in_memory (tree type) ++{ ++ HOST_WIDE_INT size; ++ ++ if (!AGGREGATE_TYPE_P (type)) ++ { ++ /* All simple types are returned in registers. */ ++ return 0; ++ } ++ ++ size = int_size_in_bytes (type); ++ if (size >=0 && size <= UNITS_PER_WORD) ++ { ++ /* If it can fit in one register */ ++ return 0; ++ } ++ ++ return 1; ++} ++ ++/* Determine if given constant can be used as a register displacement */ ++int ++const_ok_for_base_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) ++{ ++ int val; ++ ++ val = INTVAL (op); ++ return OFFSET_INT (val); ++} ++ ++/* Generate an emit a word sized add instruction */ ++static rtx ++emit_add (rtx dest, rtx src0, rtx src1) ++{ ++ rtx insn; ++ insn = emit_insn (gen_addsi3 (dest, src0, src1)); ++ return insn; ++} ++ ++/* Generate the code to compare (and possibly branch) two integer values ++ TEST_CODE is the comparison code we are trying to emulate ++ (or implement directly) ++ RESULT is where to store the result of the comparison, ++ or null to emit a branch ++ CMP0 CMP1 are the two comparison operands ++ DESTINATION is the destination of the branch, or null to only compare ++ */ ++ ++void ++gen_int_relational (enum rtx_code code, /* relational test (EQ, etc) */ ++ rtx result, /* result to store comp. or 0 if branch */ ++ rtx cmp0, /* first operand to compare */ ++ rtx cmp1, /* second operand to compare */ ++ rtx destination) /* destination of the branch, or 0 if compare */ ++{ ++ enum machine_mode mode; ++ int branch_p; ++ ++ mode = GET_MODE (cmp0); ++ if (mode == VOIDmode) ++ mode = GET_MODE (cmp1); ++ ++ /* Is this a branch or compare */ ++ branch_p = (destination != 0); ++ ++ /* Instruction set doesn't support LE or LT, so swap operands and use GE, GT */ ++ switch (code) ++ { ++ case LE: ++ case LT: ++ case LEU: ++ case LTU: ++ code = swap_condition (code); ++ rtx temp = cmp0; ++ cmp0 = cmp1; ++ cmp1 = temp; ++ break; ++ default: ++ break; ++ } ++ ++ if (branch_p) ++ { ++ rtx insn; ++ ++ /* Operands must be in registers */ ++ if (!register_operand (cmp0, mode)) ++ cmp0 = force_reg (mode, cmp0); ++ if (!register_operand (cmp1, mode)) ++ cmp1 = force_reg (mode, cmp1); ++ ++ /* Generate conditional branch instruction */ ++ rtx cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1); ++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination); ++ insn = gen_rtx_SET (VOIDmode, pc_rtx, ++ gen_rtx_IF_THEN_ELSE (VOIDmode, ++ cond, label, pc_rtx)); ++ emit_jump_insn (insn); ++ } ++ else ++ { ++ /* We can't have const_ints in cmp0, other than 0 */ ++ if ((GET_CODE (cmp0) == CONST_INT) && (INTVAL (cmp0) != 0)) ++ cmp0 = force_reg (mode, cmp0); ++ ++ /* If the comparison is against an int not in legal range ++ move it into a register */ ++ if (GET_CODE (cmp1) == CONST_INT) ++ { ++ HOST_WIDE_INT value = INTVAL (cmp1); ++ switch (code) ++ { ++ case EQ: case NE: case LE: case LT: case GE: case GT: ++ if (!MEDIUM_INT(value)) ++ cmp1 = force_reg (mode, cmp1); ++ break; ++ case LEU: case LTU: case GEU: case GTU: ++ if (!MEDIUM_UINT(value)) ++ cmp1 = force_reg (mode, cmp1); ++ break; ++ default: ++ abort (); ++ } ++ } ++ ++ /* Generate compare instruction */ ++ emit_move_insn (result, gen_rtx_fmt_ee (code, mode, cmp0, cmp1)); ++ } ++} ++ ++/* Generate and emit RTL to save or restore callee save registers */ ++static void ++expand_save_restore (struct lm32_frame_info *info, int op) ++{ ++ unsigned int reg_save_mask = info->reg_save_mask; ++ int regno; ++ HOST_WIDE_INT offset; ++ rtx insn; ++ ++ /* Callee saves are below locals and above outgoing arguments */ ++ offset = info->args_size + info->callee_size; ++ for (regno = 0; regno <= 31; regno++) ++ { ++ if ((reg_save_mask & (1 << regno)) != 0) ++ { ++ if (op == 0) ++ { ++ insn = emit_move_insn (gen_rtx_MEM (word_mode, ++ gen_rtx_PLUS (Pmode, ++ stack_pointer_rtx, ++ GEN_INT (offset))), ++ gen_rtx_REG (word_mode, regno)); ++ } ++ else ++ { ++ insn = emit_move_insn (gen_rtx_REG (word_mode, regno), ++ gen_rtx_MEM (word_mode, ++ gen_rtx_PLUS (Pmode, ++ stack_pointer_rtx, ++ GEN_INT (offset)))); ++ } ++ ++ /* only prologue instructions which set the sp fp or save a ++ register should be marked as frame related */ ++ if (op==0) ++ RTX_FRAME_RELATED_P (insn) = 1; ++ offset -= UNITS_PER_WORD; ++ } ++ } ++} ++ ++static void ++stack_adjust (HOST_WIDE_INT amount) ++{ ++ rtx insn; ++ ++ if (!MEDIUM_INT (amount)) ++ { ++ /* r10 is caller saved so it can be used as a temp reg */ ++ rtx r10; ++ r10 = gen_rtx_REG (word_mode, 10); ++ insn = emit_move_insn (r10, GEN_INT (amount)); ++ if (amount < 0) ++ RTX_FRAME_RELATED_P (insn) = 1; ++ insn = emit_add (stack_pointer_rtx, stack_pointer_rtx, r10); ++ if (amount < 0) ++ RTX_FRAME_RELATED_P (insn) = 1; ++ } ++ else ++ { ++ insn = emit_add (stack_pointer_rtx, ++ stack_pointer_rtx, ++ GEN_INT (amount)); ++ if (amount < 0) ++ RTX_FRAME_RELATED_P (insn) = 1; ++ } ++} ++ ++ ++/* Create and emit instructions for a functions prologue */ ++void ++lm32_expand_prologue (void) ++{ ++ rtx insn; ++ ++ lm32_compute_frame_size (get_frame_size ()); ++ ++ if (current_frame_info.total_size > 0) ++ { ++ /* Add space on stack new frame */ ++ stack_adjust (-current_frame_info.total_size); ++ ++ /* Save callee save registers */ ++ if (current_frame_info.reg_save_mask != 0) ++ expand_save_restore (¤t_frame_info, 0); ++ ++ /* Setup frame pointer if it's needed */ ++ if (frame_pointer_needed == 1) ++ { ++ /* Load offset - Don't use total_size, as that includes pretend_size, which isn't part of this frame? */ ++ insn = emit_move_insn (frame_pointer_rtx, GEN_INT ( current_frame_info.args_size ++ + current_frame_info.callee_size ++ + current_frame_info.locals_size)); ++ RTX_FRAME_RELATED_P (insn) = 1; ++ ++ /* Add in sp */ ++ insn = emit_add (frame_pointer_rtx, ++ frame_pointer_rtx, ++ stack_pointer_rtx); ++ RTX_FRAME_RELATED_P (insn) = 1; ++ } ++ ++ /* Prevent prologue from being scheduled into function body */ ++ emit_insn (gen_blockage ()); ++ } ++} ++ ++/* Create an emit instructions for a functions epilogue */ ++void ++lm32_expand_epilogue (void) ++{ ++ rtx ra_rtx = gen_rtx_REG (Pmode, RA_REGNUM); ++ ++ lm32_compute_frame_size (get_frame_size ()); ++ ++ if (current_frame_info.total_size > 0) ++ { ++ /* Prevent stack code from being reordered */ ++ emit_insn (gen_blockage ()); ++ ++ /* Restore callee save registers */ ++ if (current_frame_info.reg_save_mask != 0) ++ expand_save_restore (¤t_frame_info, 1); ++ ++ /* Deallocate stack */ ++ stack_adjust (current_frame_info.total_size); ++ ++ /* Return to calling function */ ++ emit_jump_insn (gen_return_internalsi (ra_rtx)); ++ } ++ else ++ { ++ /* Return to calling function */ ++ emit_jump_insn (gen_return_internalsi (ra_rtx)); ++ } ++} ++ ++/* Return the bytes needed to compute the frame pointer from the current ++ stack pointer. */ ++HOST_WIDE_INT ++lm32_compute_frame_size (int size) ++{ ++ int regno; ++ HOST_WIDE_INT total_size, locals_size, args_size, pretend_size, callee_size; ++ unsigned int reg_save_mask; ++ ++ locals_size = size; ++ args_size = crtl->outgoing_args_size; ++ pretend_size = crtl->args.pretend_args_size; ++ callee_size = 0; ++ reg_save_mask = 0; ++ ++ /* Build mask that actually determines which regsiters we save ++ and calculate size required to store them in the stack. */ ++ for (regno = 1; regno < SP_REGNUM; regno++) ++ { ++ if (df_regs_ever_live_p(regno) && !call_used_regs[regno]) ++ { ++ reg_save_mask |= 1 << regno; ++ callee_size += UNITS_PER_WORD; ++ } ++ } ++ if (df_regs_ever_live_p(RA_REGNUM) || !current_function_is_leaf || !optimize) ++ { ++ reg_save_mask |= 1 << RA_REGNUM; ++ callee_size += UNITS_PER_WORD; ++ } ++ if (!(reg_save_mask & (1 << FP_REGNUM)) && frame_pointer_needed) ++ { ++ reg_save_mask |= 1 << FP_REGNUM; ++ callee_size += UNITS_PER_WORD; ++ } ++ ++ /* Compute total frame size */ ++ total_size = pretend_size + args_size + locals_size + callee_size; ++ ++ /* Align frame to appropriate boundary */ ++ total_size = (total_size+3) & ~3; ++ ++ /* Save computed information. */ ++ current_frame_info.total_size = total_size; ++ current_frame_info.callee_size = callee_size; ++ current_frame_info.pretend_size = pretend_size; ++ current_frame_info.locals_size = locals_size; ++ current_frame_info.args_size = args_size; ++ current_frame_info.reg_save_mask = reg_save_mask; ++ ++ return total_size; ++} ++ ++void ++lm32_print_operand (FILE *file, rtx op, int letter) ++{ ++ register enum rtx_code code; ++ ++ if (! op) ++ { ++ error ("PRINT_OPERAND null pointer"); ++ abort (); ++ } ++ ++ code = GET_CODE (op); ++ ++ if (code == SIGN_EXTEND) ++ op = XEXP (op, 0), code = GET_CODE (op); ++ else if (code == REG || code == SUBREG) ++ { ++ int regnum; ++ ++ if (code == REG) ++ regnum = REGNO (op); ++ else ++ regnum = true_regnum (op); ++ ++ if ( (letter == 'H' && !WORDS_BIG_ENDIAN) ++ || (letter == 'L' && WORDS_BIG_ENDIAN)) ++ { ++ abort(); ++ regnum++; ++ } ++ ++ fprintf (file, "%s", reg_names[regnum]); ++ } ++ else if (code == MEM) ++ output_address (XEXP (op, 0)); ++ else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0) ++ fprintf (file, "%s", reg_names[0]); ++ else if (GET_CODE (op) == CONST_DOUBLE) ++ { ++ if ((CONST_DOUBLE_LOW (op) != 0) || (CONST_DOUBLE_HIGH (op) != 0)) ++ output_operand_lossage ("Only 0.0 can be loaded as an immediate"); ++ else ++ fprintf (file, "0"); ++ } ++ else if (code == EQ) ++ fprintf (file, "e "); ++ else if (code == NE) ++ fprintf (file, "ne "); ++ else if (code == GT) ++ fprintf (file, "g "); ++ else if (code == GTU) ++ fprintf (file, "gu "); ++ else if (code == LT) ++ fprintf (file, "l "); ++ else if (code == LTU) ++ fprintf (file, "lu "); ++ else if (code == GE) ++ fprintf (file, "ge "); ++ else if (code == GEU) ++ fprintf (file, "geu"); ++ else if (code == LE) ++ fprintf (file, "le "); ++ else if (code == LEU) ++ fprintf (file, "leu"); ++ else ++ output_addr_const (file, op); ++} ++ ++/* A C compound statement to output to stdio stream STREAM the ++ assembler syntax for an instruction operand that is a memory ++ reference whose address is ADDR. ADDR is an RTL expression. ++ ++ On some machines, the syntax for a symbolic address depends on ++ the section that the address refers to. On these machines, ++ define the macro `ENCODE_SECTION_INFO' to store the information ++ into the `symbol_ref', and then check for it here. */ ++ ++void ++lm32_print_operand_address (FILE *file, rtx addr) ++{ ++ switch (GET_CODE (addr)) ++ { ++ case REG: ++ fprintf (file, "(%s+0)", reg_names [REGNO (addr)]); ++ break; ++ ++ case MEM: ++ output_address (XEXP (addr, 0)); ++ break; ++ ++ case PLUS: ++ { ++ rtx arg0 = XEXP (addr, 0); ++ rtx arg1 = XEXP (addr, 1); ++ ++ if (GET_CODE (arg0) == REG && CONSTANT_P (arg1)) ++ { ++ if (GET_CODE(arg1) == CONST_INT) ++ fprintf (file, "(%s+%ld)", reg_names [REGNO (arg0)], INTVAL (arg1)); ++ else ++ { ++ fprintf (file, "(%s+", reg_names [REGNO (arg0)]); ++ output_addr_const (file, arg1); ++ fprintf (file, ")"); ++ } ++ } ++ else if (CONSTANT_P (arg0) && CONSTANT_P (arg1)) ++ output_addr_const (file, addr); ++ else ++ abort_with_insn (addr, "bad operand"); ++ } ++ break; ++ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_SMALL_P (addr)) ++ { ++ fprintf (file, "gp("); ++ output_addr_const (file, addr); ++ fprintf (file, ")"); ++ } ++ else ++ abort_with_insn (addr, "can't use non gp relative absolute address"); ++ break; ++ ++ default: ++ abort_with_insn (addr, "invalid addressing mode"); ++ break; ++ } ++} ++ ++/* Determine where to put an argument to a function. ++ Value is zero to push the argument on the stack, ++ or a hard register in which to store the argument. ++ ++ MODE is the argument's machine mode. ++ TYPE is the data type of the argument (as a tree). ++ This is null for libcalls where that information may ++ not be available. ++ CUM is a variable of type CUMULATIVE_ARGS which gives info about ++ the preceding args and about the function being called. ++ NAMED is nonzero if this argument is a named parameter ++ (otherwise it is an extra parameter matching an ellipsis). */ ++ ++rtx ++lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode, ++ tree type, int named) ++{ ++ if (mode == VOIDmode) ++ /* Compute operand 2 of the call insn. */ ++ return GEN_INT (0); ++ ++ if (targetm.calls.must_pass_in_stack (mode, type)) ++ return NULL_RTX; ++ ++ if (!named || (cum + LM32_NUM_REGS2(mode, type) > LM32_NUM_ARG_REGS)) ++ return NULL_RTX; ++ ++ return gen_rtx_REG (mode, cum + LM32_FIRST_ARG_REG); ++} ++ ++HOST_WIDE_INT ++lm32_compute_initial_elimination_offset (int from, int to) ++{ ++ HOST_WIDE_INT offset = 0; ++ ++ switch (from) ++ { ++ /*case FRAME_POINTER_REGNUM: - Same as ARG_POINTER_REGNUM */ ++ case ARG_POINTER_REGNUM: ++ switch (to) ++ { ++ case FRAME_POINTER_REGNUM: ++ offset = 0; ++ break; ++ case STACK_POINTER_REGNUM: ++ offset = lm32_compute_frame_size (get_frame_size ()) - current_frame_info.pretend_size; ++ break; ++ default: ++ abort (); ++ } ++ break; ++ default: ++ abort (); ++ } ++ ++ return offset; ++} ++ ++static void ++lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, ++ tree type, int *pretend_size, int no_rtl) ++{ ++ int first_anon_arg; ++ tree fntype; ++ int stdarg_p; ++ ++ fntype = TREE_TYPE (current_function_decl); ++ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0 ++ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ++ != void_type_node)); ++ ++ if (stdarg_p) ++ first_anon_arg = *cum + LM32_FIRST_ARG_REG; ++ else ++ { ++ /* this is the common case, we have been passed details setup ++ for the last named argument, we want to skip over the ++ registers, if any used in passing this named paramter in ++ order to determine which is the first registers used to pass ++ anonymous arguments */ ++ int size; ++ ++ if (mode==BLKmode) ++ size = int_size_in_bytes (type); ++ else ++ size = GET_MODE_SIZE (mode); ++ ++ first_anon_arg = *cum + LM32_FIRST_ARG_REG + ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD); ++ } ++ ++ if ((first_anon_arg < (LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS)) && !no_rtl) ++ { ++ int first_reg_offset = first_anon_arg; ++ int size = LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS - first_anon_arg; ++ rtx regblock; ++ ++ regblock = gen_rtx_MEM (BLKmode, ++ plus_constant (arg_pointer_rtx, ++ FIRST_PARM_OFFSET (0))); ++ move_block_from_reg (first_reg_offset, regblock, size); ++ ++ *pretend_size = size * UNITS_PER_WORD; ++ } ++} ++ ++/* Abort after printing out a specific insn. */ ++static void ++abort_with_insn (rtx insn, const char *reason) ++{ ++ error (reason); ++ debug_rtx (insn); ++ abort (); ++} ++ ++/* Override command line options */ ++void ++lm32_override_options (void) ++{ ++ /* We must have sign-extend enabled if barrel-shift isn't */ ++ if (!MASK_BARREL_SHIFT_ENABLED) ++ { ++ warning (0, "neither -mbarrel-shift-enabled nor -msign-extend-enabled specified. Assuming -msign-extend-enabled"); ++ target_flags |= MASK_SIGN_EXTEND_ENABLED; ++ } ++} ++ ++/* Return nonzero if this function is known to have a null epilogue. ++ This allows the optimizer to omit jumps to jumps if no stack ++ was created. */ ++int ++lm32_can_use_return (void) ++{ ++ if (!reload_completed) ++ return 0; ++ ++ if (df_regs_ever_live_p(RA_REGNUM) || crtl->profile) ++ return 0; ++ ++ if (lm32_compute_frame_size (get_frame_size ()) != 0) ++ return 0; ++ ++ return 1; ++} ++ ++/* Support function to determine the return address of the function ++ 'count' frames back up the stack. */ ++rtx ++lm32_return_addr_rtx (int count, rtx frame) ++{ ++ rtx r; ++ if (count == 0) ++ { ++ /* *mjs* This test originally used leaf_function_p (), we now use ++ the regs_ever_live test which I *think* is more accurate. */ ++ if (!df_regs_ever_live_p(RA_REGNUM)) ++ { ++ r = gen_rtx_REG (Pmode, RA_REGNUM); ++ } ++ else ++ { ++ r = gen_rtx_MEM (Pmode, ++ gen_rtx_PLUS (Pmode, frame, ++ GEN_INT(- 2 * UNITS_PER_WORD))); ++ set_mem_alias_set (r, get_frame_alias_set ()); ++ } ++ } ++ else if (flag_omit_frame_pointer) ++ r = NULL_RTX; ++ else ++ { ++ r = gen_rtx_MEM (Pmode, ++ gen_rtx_PLUS (Pmode, frame, ++ GEN_INT(- 2 * UNITS_PER_WORD))); ++ set_mem_alias_set (r, get_frame_alias_set ()); ++ } ++ return r; ++} ++ ++/* Return true if EXP should be placed in the small data section. */ ++ ++static bool ++lm32_in_small_data_p (const_tree exp) ++{ ++ /* We want to merge strings, so we never consider them small data. */ ++ if (TREE_CODE (exp) == STRING_CST) ++ return false; ++ ++ /* Functions are never in the small data area. Duh. */ ++ if (TREE_CODE (exp) == FUNCTION_DECL) ++ return false; ++ ++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) ++ { ++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); ++ if (strcmp (section, ".sdata") == 0 ++ || strcmp (section, ".sbss") == 0) ++ return true; ++ } ++ else ++ { ++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); ++ ++ /* If this is an incomplete type with size 0, then we can't put it ++ in sdata because it might be too big when completed. */ ++ if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value) ++ return true; ++ } ++ ++ return false; ++} ++ ++/* Emit straight-line code to move LENGTH bytes from SRC to DEST. ++ Assume that the areas do not overlap. */ ++ ++static void ++lm32_block_move_inline (rtx dest, rtx src, HOST_WIDE_INT length, HOST_WIDE_INT alignment) ++{ ++ HOST_WIDE_INT offset, delta; ++ unsigned HOST_WIDE_INT bits; ++ int i; ++ enum machine_mode mode; ++ rtx *regs; ++ ++ /* Work out how many bits to move at a time. */ ++ switch (alignment) ++ { ++ case 1: ++ bits = 8; ++ break; ++ case 2: ++ bits = 16; ++ break; ++ case 4: ++ bits = 32; ++ break; ++ default: ++ abort (); ++ } ++ ++ mode = mode_for_size (bits, MODE_INT, 0); ++ delta = bits / BITS_PER_UNIT; ++ ++ /* Allocate a buffer for the temporary registers. */ ++ regs = alloca (sizeof (rtx) * length / delta); ++ ++ /* Load as many BITS-sized chunks as possible. */ ++ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++) ++ { ++ regs[i] = gen_reg_rtx (mode); ++ emit_move_insn (regs[i], adjust_address (src, mode, offset)); ++ } ++ ++ /* Copy the chunks to the destination. */ ++ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++) ++ emit_move_insn (adjust_address (dest, mode, offset), regs[i]); ++ ++ /* Mop up any left-over bytes. */ ++ if (offset < length) ++ { ++ src = adjust_address (src, BLKmode, offset); ++ dest = adjust_address (dest, BLKmode, offset); ++ move_by_pieces (dest, src, length - offset, ++ MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), 0); ++ } ++} ++ ++/* Expand string/block move operations. ++ ++ operands[0] is the pointer to the destination. ++ operands[1] is the pointer to the source. ++ operands[2] is the number of bytes to move. ++ operands[3] is the alignment. */ ++ ++int ++lm32_expand_block_move (rtx *operands) ++{ ++ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) <= 32)) ++ { ++ lm32_block_move_inline (operands[0], operands[1], INTVAL (operands[2]), INTVAL (operands[3])); ++ return 1; ++ } ++ return 0; ++} ++ ++/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol ++ isn't protected by a PIC unspec. */ ++int ++nonpic_symbol_mentioned_p (rtx x) ++{ ++ register const char *fmt; ++ register int i; ++ ++ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF ++ || GET_CODE (x) == PC) ++ return 1; ++ ++ /* We don't want to look into the possible MEM location of a ++ CONST_DOUBLE, since we're not going to use it, in general. */ ++ if (GET_CODE (x) == CONST_DOUBLE) ++ return 0; ++ ++ if (GET_CODE (x) == UNSPEC) ++ return 0; ++ ++ fmt = GET_RTX_FORMAT (GET_CODE (x)); ++ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) ++ { ++ if (fmt[i] == 'E') ++ { ++ register int j; ++ ++ for (j = XVECLEN (x, i) - 1; j >= 0; j--) ++ if (nonpic_symbol_mentioned_p (XVECEXP (x, i, j))) ++ return 1; ++ } ++ else if (fmt[i] == 'e' && nonpic_symbol_mentioned_p (XEXP (x, i))) ++ return 1; ++ } ++ ++ return 0; ++} +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.h gcc-4.4.6/gcc/config/lm32/lm32.h +--- gcc-4.4.6.orig/gcc/config/lm32/lm32.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/lm32.h 2011-08-29 07:16:18.135123923 +0200 +@@ -0,0 +1,657 @@ ++/* Definitions of target machine for GNU compiler, Lattice Mico32 architecture. ++ Contributed by Jon Beniston ++ ++ Copyright (C) 2008 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 3, 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 COPYING3. If not see ++ . */ ++ ++/*-------------------------------*/ ++/* Run-time Target Specification */ ++/*-------------------------------*/ ++ ++/* Print subsidiary information on the compiler version in use. */ ++#ifndef TARGET_VERSION ++#define TARGET_VERSION fprintf (stderr, " (LatticeMico32)") ++#endif ++ ++/* Target CPU builtins. */ ++#define TARGET_CPU_CPP_BUILTINS() \ ++ do \ ++ { \ ++ builtin_define ("__lm32__"); \ ++ builtin_define_std ("lm32"); \ ++ builtin_assert ("cpu=lm32"); \ ++ builtin_assert ("machine=lm32"); \ ++ } \ ++ while (0) ++ ++#define CPP_SPEC "\ ++%{mmultiply-enabled:-D__multiply_enabled__} \ ++%{mdivide-enabled:-D__divide_enabled__} \ ++%{mbarrel-shift-enabled:-D__barrel_shift_enabled__} \ ++%{msign-extend-enabled:-D__sign_extend_enabled__} \ ++%{muser-enabled:-D__user_enabled__} \ ++" ++ ++#undef ASM_SPEC ++#define ASM_SPEC "\ ++%{mmultiply-enabled} \ ++%{mdivide-enabled} \ ++%{mbarrel-shift-enabled} \ ++%{msign-extend-enabled} \ ++%{muser-extend-enabled} \ ++%{v} \ ++" ++ ++/* Let link script define all link options. ++ Default to using simulator link script. */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC "" ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC "" ++#undef LIB_SPEC ++#define LIB_SPEC "%{!T*:-T sim.ld}" ++ ++#define OVERRIDE_OPTIONS lm32_override_options() ++ ++extern int target_flags; ++ ++/* Add -G xx support. */ ++ ++#undef SWITCH_TAKES_ARG ++#define SWITCH_TAKES_ARG(CHAR) \ ++(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') ++ ++#undef CC1_SPEC ++#define CC1_SPEC "%{G*}" ++ ++extern struct rtx_def *lm32_compare_op0; ++extern struct rtx_def *lm32_compare_op1; ++ ++/*---------------------------------*/ ++/* Target machine storage layout. */ ++/*---------------------------------*/ ++ ++#define BITS_BIG_ENDIAN 0 ++#define BYTES_BIG_ENDIAN 1 ++#define WORDS_BIG_ENDIAN 1 ++#define LIBGCC2_WORDS_BIG_ENDIAN 1 ++ ++#define BITS_PER_UNIT 8 ++#define BITS_PER_WORD 32 ++#define UNITS_PER_WORD 4 ++ ++#define POINTER_SIZE 32 ++ ++#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ ++do { \ ++ if (GET_MODE_CLASS (MODE) == MODE_INT \ ++ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ ++ (MODE) = word_mode; \ ++} while (0) ++ ++#define PARM_BOUNDARY 32 ++ ++#define STACK_BOUNDARY 32 ++ ++#define BIGGEST_ALIGNMENT 64 ++ ++#define FUNCTION_BOUNDARY 32 ++ ++#define EMPTY_FIELD_BOUNDARY 32 ++ ++#define STRICT_ALIGNMENT 1 ++ ++#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT ++ ++/* Make strings word-aligned so strcpy from constants will be faster. */ ++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ++ (TREE_CODE (EXP) == STRING_CST \ ++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ++ ++/* Make arrays and structures word-aligned to allow faster copying etc. */ ++#define DATA_ALIGNMENT(TYPE, ALIGN) \ ++ ((((ALIGN) < BITS_PER_WORD) \ ++ && (TREE_CODE (TYPE) == ARRAY_TYPE \ ++ || TREE_CODE (TYPE) == UNION_TYPE \ ++ || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN)) ++ ++/* We need this for the same reason as DATA_ALIGNMENT, namely to cause ++ character arrays to be word-aligned so that `strcpy' calls that copy ++ constants to character arrays can be done inline, and 'strcmp' can be ++ optimised to use word loads. */ ++#define LOCAL_ALIGNMENT(TYPE, ALIGN) \ ++ DATA_ALIGNMENT (TYPE, ALIGN) ++ ++/*----------------------------------------*/ ++/* Layout of source language data types. */ ++/*----------------------------------------*/ ++ ++#define INT_TYPE_SIZE 32 ++#define SHORT_TYPE_SIZE 16 ++#define LONG_TYPE_SIZE 32 ++#define LONG_LONG_TYPE_SIZE 64 ++ ++#define FLOAT_TYPE_SIZE 32 ++#define DOUBLE_TYPE_SIZE 64 ++#define LONG_DOUBLE_TYPE_SIZE 64 ++ ++#define DEFAULT_SIGNED_CHAR 0 ++ ++#define SIZE_TYPE "unsigned int" ++ ++#define PTRDIFF_TYPE "int" ++ ++/*---------------------------*/ ++/* Standard register usage. */ ++/*---------------------------*/ ++ ++#define FIRST_PSEUDO_REGISTER 32 ++ ++#define RV_REGNUM 1 ++#define GP_REGNUM 26 ++#define FP_REGNUM 27 ++#define SP_REGNUM 28 ++#define RA_REGNUM 29 ++ ++#define G_REG_P(X) ((X)<32) ++#define PSEUDO_REG_P(X) ((X)>=FIRST_PSEUDO_REGISTER) ++ ++#define FIXED_REGISTERS \ ++{ 1, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 1, 0, 1, 0, 1, 1} ++ ++#define CALL_USED_REGISTERS \ ++{ 1, 1, 1, 1, 1, 1, 1, 1, \ ++ 1, 1, 1, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 1, 0, 1, 0, 1, 1} ++ ++#define HARD_REGNO_NREGS(REGNO, MODE) \ ++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ++ ++#define HARD_REGNO_MODE_OK(REGNO, MODE) G_REG_P(REGNO) ++ ++#define MODES_TIEABLE_P(MODE1, MODE2) \ ++( GET_MODE_CLASS (MODE1) == MODE_INT \ ++ && GET_MODE_CLASS (MODE2) == MODE_INT \ ++ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \ ++ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD) ++ ++#define AVOID_CCMODE_COPIES ++ ++/*----------------------------------*/ ++/* Register classes and constants. */ ++/*----------------------------------*/ ++ ++enum reg_class { ++ NO_REGS, ++ GENERAL_REGS, ++ ALL_REGS, ++ LIM_REG_CLASSES ++}; ++ ++#define N_REG_CLASSES (int) LIM_REG_CLASSES ++ ++#define REG_CLASS_NAMES { "NO_REGS", "GENERAL_REGS", "ALL_REGS" } ++ ++#define REG_CLASS_CONTENTS \ ++{ {0x00000000}, \ ++ {0xffffffff}, \ ++ {0xffffffff} \ ++} ++ ++#define REGNO_REG_CLASS(REGNO) \ ++ (G_REG_P(REGNO) ? GENERAL_REGS : NO_REGS) ++ ++#define CLASS_MAX_NREGS(CLASS, MODE) \ ++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ++ ++#define INDEX_REG_CLASS NO_REGS ++ ++#define BASE_REG_CLASS GENERAL_REGS ++ ++#define REG_CLASS_FROM_LETTER(C) NO_REGS ++ ++#ifdef REG_OK_STRICT ++#define REGNO_OK_FOR_BASE_P(REGNO) \ ++(G_REG_P (REGNO) || G_REG_P (reg_renumber[REGNO])) ++#else ++#define REGNO_OK_FOR_BASE_P(REGNO) \ ++(G_REG_P (REGNO) || PSEUDO_REG_P (REGNO)) ++#endif ++ ++#define REGNO_OK_FOR_INDEX_P(REGNO) 0 ++ ++#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) ++ ++/* The letters I, J, K, L, M, N, O, P in a register constraint string ++ can be used to stand for particular ranges of immediate operands. ++ This macro defines what the ranges are. ++ C is the letter, and VALUE is a constant value. ++ Return 1 if VALUE is in the range specified by C. ++ ++ Lattice usage: ++ ++ J - 0 ++ K - 16-bit signed ++ L - 16-bit unsigned ++ M - 32-bit signed ++ */ ++#define MEDIUM_INT(X) ((((HOST_WIDE_INT)(X)) >= -32768) && (((HOST_WIDE_INT)(X)) < 32768)) ++#define MEDIUM_UINT(X) (((unsigned HOST_WIDE_INT)(X)) < 65536) ++#define LARGE_INT(X) \ ++((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \ ++ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff) ++ ++#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ++( (C) == 'J' ? (VALUE) == 0 \ ++ : (C) == 'K' ? MEDIUM_INT (VALUE) \ ++ : (C) == 'L' ? MEDIUM_UINT (VALUE) \ ++ : (C) == 'M' ? LARGE_INT (VALUE) \ ++ : 0 \ ++) ++ ++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 ++ ++/*----------------------------------------*/ ++/* Stack Layout and Calling Conventions. */ ++/*----------------------------------------*/ ++ ++#define STACK_GROWS_DOWNWARD 1 ++ ++#define FRAME_GROWS_DOWNWARD 1 ++ ++#define STACK_POINTER_OFFSET (UNITS_PER_WORD) ++ ++#define STARTING_FRAME_OFFSET (UNITS_PER_WORD) ++ ++#define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD) ++ ++#define STACK_POINTER_REGNUM SP_REGNUM ++ ++#define FRAME_POINTER_REGNUM FP_REGNUM ++ ++#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM ++ ++#define FRAME_POINTER_REQUIRED (cfun->calls_alloca) ++ ++#define RETURN_ADDR_RTX(count, frame) \ ++ lm32_return_addr_rtx (count, frame) ++ ++/* FIXME! */ ++#define STATIC_CHAIN_REGNUM 3 ++ ++#define ELIMINABLE_REGS \ ++{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ ++ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ ++} ++ ++#define CAN_ELIMINATE(FROM, TO) \ ++ (((TO) == STACK_POINTER_REGNUM && frame_pointer_needed) ? 0 : 1) ++ ++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ++ (OFFSET) = lm32_compute_initial_elimination_offset (FROM, TO) ++ ++/*-----------------------------*/ ++/* Function argument passing. */ ++/*-----------------------------*/ ++ ++#define ACCUMULATE_OUTGOING_ARGS 1 ++ ++#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0 ++ ++/*--------------------------------*/ ++/* Passing Arguments in Registers */ ++/*--------------------------------*/ ++ ++/* The first argument register */ ++#define LM32_FIRST_ARG_REG 1 ++ ++/* The number of (integer) argument register available. */ ++#define LM32_NUM_ARG_REGS 8 ++ ++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ++ lm32_function_arg ((CUM), (MODE), (TYPE), (NAMED)) ++ ++#define CUMULATIVE_ARGS int ++ ++#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \ ++ (CUM) = 0 ++ ++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ++ (CUM) += LM32_NUM_REGS2 (MODE, TYPE) ++ ++#define FUNCTION_ARG_REGNO_P(r) (((r) >= 1) && ((r) <= LM32_NUM_ARG_REGS)) ++ ++/*--------------------*/ ++/* Function results. */ ++/*--------------------*/ ++ ++#define FUNCTION_VALUE(VALTYPE, FUNC) \ ++ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \ ++ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ ++ ? word_mode \ ++ : TYPE_MODE (VALTYPE), \ ++ RV_REGNUM) ++ ++#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RV_REGNUM) ++ ++#define FUNCTION_VALUE_REGNO_P(N) ((N) == RV_REGNUM) ++ ++#define RETURN_IN_MEMORY(TYPE) lm32_return_in_memory (TYPE) ++ ++#define DEFAULT_PCC_STRUCT_RETURN 0 ++ ++/* Convert from bytes to ints. */ ++#define LM32_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ++ ++/* The number of (integer) registers required to hold a quantity of ++ type MODE. */ ++#define LM32_NUM_REGS(MODE) LM32_NUM_INTS (GET_MODE_SIZE (MODE)) ++ ++/* The number of (integer) registers required to hold a quantity of ++ TYPE MODE. */ ++#define LM32_NUM_REGS2(MODE, TYPE) \ ++ LM32_NUM_INTS ((MODE) == BLKmode ? \ ++ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) ++ ++#define STRUCT_VALUE 0 ++ ++/*---------------------------*/ ++/* Function entry and exit. */ ++/*---------------------------*/ ++ ++/*-------------*/ ++/* Profiling. */ ++/*-------------*/ ++ ++#define FUNCTION_PROFILER(FILE, LABELNO) ++ ++/*---------------*/ ++/* Trampolines. */ ++/*---------------*/ ++ ++#define INITIALIZE_TRAMPOLINE ++#define TRAMPOLINE_SIZE 0 ++ ++/*---------------------*/ ++/* Addressing Modes. */ ++/*---------------------*/ ++ ++#define CONSTANT_ADDRESS_P(X) \ ++ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ ++ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \ ++ || (GET_CODE (X) == CONST))) ++ ++#define MAX_REGS_PER_ADDRESS 1 ++ ++#ifdef REG_OK_STRICT ++#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM) ++#else ++#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM) ++#endif ++ ++#define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X)) ++#define RTX_OK_FOR_STACK_P(X) (REG_P (X) && (REGNO (X) == STACK_POINTER_REGNUM)) ++#define CONST_OK_FOR_BASE_OFFSET(X, MODE) const_ok_for_base_offset ((X), (MODE)) ++ ++#define LEGITIMATE_BASE_INDEX_P(ADDR, MODE) \ ++( GET_CODE (ADDR)==PLUS \ ++ && RTX_OK_FOR_BASE_P (XEXP (ADDR, 0)) \ ++ && GET_CODE (XEXP (ADDR, 1)) == CONST_INT \ ++ && CONST_OK_FOR_BASE_OFFSET (XEXP ((ADDR), 1), (MODE))) ++ ++#define LEGITIMATE_GPREL_P(ADDR) \ ++( GET_CODE (ADDR) == SYMBOL_REF \ ++ && SYMBOL_REF_SMALL_P (ADDR)) ++ ++#ifdef REG_OK_STRICT ++#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X))) ++#else ++#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X))) ++#endif ++ ++#ifdef REG_OK_STRICT ++#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X))) ++#else ++#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X))) ++#endif ++ ++#define GO_IF_LEGITIMATE_ADDRESS(m,x,l) \ ++{ \ ++ if (RTX_OK_FOR_BASE_P (x)) goto l; /* (rM) */ \ ++ else if (LEGITIMATE_BASE_INDEX_P (x, m)) goto l; /* (rM)+literal) */ \ ++ else if (LEGITIMATE_GPREL_P (x)) goto l; \ ++} ++ ++#define ARM_LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ ++do { \ ++ if (flag_pic) \ ++ X = lm32_legitimize_pic_address (OLDX, MODE, NULL_RTX); \ ++} while (0) ++ ++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \ ++ if (GET_CODE (ADDR) == PLUS) goto LABEL; \ ++ ++#define LEGITIMATE_CONSTANT_P(X) 1 ++ ++/*-------------------------*/ ++/* Condition Code Status. */ ++/*-------------------------*/ ++ ++#define REVERSIBLE_CC_MODE(MODE) 1 ++ ++/*---------*/ ++/* Costs. */ ++/*---------*/ ++ ++#define SLOW_BYTE_ACCESS 1 ++ ++#define NO_FUNCTION_CSE ++ ++#define BRANCH_COST(speed_p, predictable_p) 4 ++ ++#define MOVE_RATIO(speed) (speed ? 24 : 3) ++ ++/*------------*/ ++/* Sections. */ ++/*------------*/ ++ ++#define TEXT_SECTION_ASM_OP "\t.section\t.text" ++#define DATA_SECTION_ASM_OP "\t.section\t.data" ++#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\"" ++#define BSS_SECTION_ASM_OP "\t.section\t.bss" ++#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\"" ++ ++/*-------*/ ++/* PIC. */ ++/*-------*/ ++ ++#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? GP_REGNUM : INVALID_REGNUM) ++ ++#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) ++ ++#define LEGITIMATE_PIC_OPERAND_P(X) \ ++ (!(nonpic_symbol_mentioned_p (X))) ++ ++/*-------------*/ ++/* Assembler. */ ++/*-------------*/ ++ ++#define ASM_COMMENT_START "#" ++ ++#define ASM_APP_ON "#APP\n" ++ ++#define ASM_APP_OFF "#NO_APP\n" ++ ++#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ ++ do { \ ++ fputc ( '\t', FILE); \ ++ assemble_name (FILE, LABEL1); \ ++ fputs ( " = ", FILE); \ ++ assemble_name (FILE, LABEL2); \ ++ fputc ( '\n', FILE); \ ++ } while (0) ++ ++/* Override default implementation in elfos.h to support -G. */ ++#undef ASM_OUTPUT_ALIGNED_LOCAL ++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ ++do { \ ++ if ((SIZE) <= g_switch_value) \ ++ switch_to_section (sbss_section); \ ++ else \ ++ switch_to_section (bss_section); \ ++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ++ if (!flag_inhibit_size_directive) \ ++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ ++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ ++ ASM_OUTPUT_LABEL(FILE, NAME); \ ++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ ++} while (0) ++ ++/* Override default implementation in elfos.h to support -G. */ ++#undef ASM_OUTPUT_ALIGNED_COMMON ++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ ++do \ ++{ \ ++ if ((SIZE) <= g_switch_value) \ ++ { \ ++ switch_to_section (sbss_section); \ ++ (*targetm.asm_out.globalize_label) (FILE, NAME); \ ++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ++ if (!flag_inhibit_size_directive) \ ++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ ++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ ++ ASM_OUTPUT_LABEL(FILE, NAME); \ ++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ ++ } \ ++ else \ ++ { \ ++ switch_to_section (bss_section); \ ++ fprintf ((FILE), "%s", COMMON_ASM_OP); \ ++ assemble_name ((FILE), (NAME)); \ ++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ ++ } \ ++} \ ++while (0) ++ ++#define ASM_OUTPUT_LABEL(FILE, NAME) \ ++ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ++ ++#define ASM_OUTPUT_LABELREF(FILE,NAME) \ ++ do { \ ++ const char *xname = (NAME); \ ++ if (xname[0] == '@') \ ++ xname += 1; \ ++ if (xname[0] == '*') \ ++ xname += 1; \ ++ fputs (xname, FILE); \ ++ } while (0) ++ ++#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \ ++ do { \ ++ assemble_name (STREAM, XSTR (SYMBOL, 0)); \ ++ } while (0) ++ ++#define GLOBAL_ASM_OP "\t.global\t" ++ ++#define REGISTER_NAMES \ ++{ \ ++ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ ++ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ ++ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ ++ "r24", "r25", "gp", "fp", "sp", "ra", "ea", "ba"} ++ ++#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ++ (((CHAR) == '&') || ((CHAR) == '@') || ((CHAR) == '*')) ++ ++#define PRINT_OPERAND(FILE, X, CODE) \ ++ lm32_print_operand (FILE, X, CODE) ++ ++#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ ++ lm32_print_operand_address (FILE, ADDR) ++ ++#ifndef LOCAL_LABEL_PREFIX ++#define LOCAL_LABEL_PREFIX "." ++#endif ++ ++#define ASM_OUTPUT_ALIGN(FILE,LOG) \ ++ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", (1 << (LOG))); } while (0) ++ ++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ++do { \ ++ char label[64]; \ ++ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \ ++ fprintf (FILE, "\n\t.word\t"); \ ++ assemble_name (FILE, label); \ ++ fprintf (FILE, "\n"); \ ++} while (0) ++ ++#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ++do { \ ++ char label[64]; \ ++ fprintf (FILE, "\t.word\t("); \ ++ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \ ++ assemble_name (FILE, label); \ ++ fprintf (FILE, "-"); \ ++ ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \ ++ assemble_name (FILE, label); \ ++ fprintf (FILE, ")\n"); \ ++} while (0) ++ ++/*-------------*/ ++/* Debugging. */ ++/*-------------*/ ++ ++#define DBX_REGISTER_NUMBER(REGNO) (REGNO) ++ ++#define CAN_DEBUG_WITHOUT_FP ++ ++#define DEFAULT_GDB_EXTENSIONS 1 ++ ++/*--------*/ ++/* Misc. */ ++/*--------*/ ++ ++#define CASE_VECTOR_MODE Pmode ++ ++#define WORD_REGISTER_OPERATIONS ++ ++#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND ++ ++#define SHORT_IMMEDIATES_SIGN_EXTEND ++ ++#define MOVE_MAX UNITS_PER_WORD ++#define MAX_MOVE_MAX 4 ++ ++#define SHIFT_COUNT_TRUNCATED 1 ++ ++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 ++ ++#define Pmode SImode ++ ++#define FUNCTION_MODE SImode ++ ++#ifndef NO_IMPLICIT_EXTERN_C ++#define NO_IMPLICIT_EXTERN_C ++#endif ++ ++#define STORE_FLAG_VALUE 1 +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.md gcc-4.4.6/gcc/config/lm32/lm32.md +--- gcc-4.4.6.orig/gcc/config/lm32/lm32.md 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/lm32.md 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,1233 @@ ++;; Machine description of the Lattice Mico32 architecture for GNU C compiler. ++;; Contributed by Jon Beniston ++ ++;; 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 3, 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 COPYING3. If not see ++;; . ++ ++;; Include predicate definitions ++(include "predicates.md") ++ ++;; Register numbers ++(define_constants ++ [(RA_REGNUM 29) ; return address register. ++ ] ++) ++ ++;; LM32 specific volatile operations ++(define_constants ++ [(UNSPECV_BLOCKAGE 1)] ; use to prevent scheduler from optimising accross bounaries ++) ++ ++;; LM32 specific operations ++(define_constants ++ [(UNSPEC_GOT 2) ++ (UNSPEC_GOTOFF_HI16 3) ++ (UNSPEC_GOTOFF_LO16 4)] ++) ++ ++;; --------------------------------- ++;; instruction types ++;; --------------------------------- ++ ++(define_attr "type" ++ "unknown,load,store,arith,compare,shift,multiply,divide,call,icall,ubranch,uibranch,cbranch" ++ (const_string "unknown")) ++ ++;; --------------------------------- ++;; instruction lengths ++;; --------------------------------- ++ ++; All instructions are 4 bytes ++; Except for branches that are out of range, and have to be implemented ++; as two instructions ++(define_attr "length" "" ++ (cond [ ++ (eq_attr "type" "cbranch") ++ (if_then_else ++ (lt (abs (minus (match_dup 2) (pc))) ++ (const_int 32768) ++ ) ++ (const_int 4) ++ (const_int 8) ++ ) ++ ] ++ (const_int 4)) ++) ++ ++;; --------------------------------- ++;; scheduling ++;; --------------------------------- ++ ++(define_automaton "lm32") ++ ++(define_cpu_unit "x" "lm32") ++(define_cpu_unit "m" "lm32") ++(define_cpu_unit "w" "lm32") ++ ++(define_insn_reservation "singlecycle" 1 ++ (eq_attr "type" "store,arith,call,icall,ubranch,uibranch,cbranch") ++ "x") ++ ++(define_insn_reservation "twocycle" 2 ++ (eq_attr "type" "compare,shift,divide") ++ "x,m") ++ ++(define_insn_reservation "threecycle" 3 ++ (eq_attr "type" "load,multiply") ++ "x,m,w") ++ ++;; --------------------------------- ++;; mov ++;; --------------------------------- ++ ++(define_expand "movqi" ++ [(set (match_operand:QI 0 "general_operand" "") ++ (match_operand:QI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ if (can_create_pseudo_p ()) ++ { ++ if (GET_CODE (operand0) == MEM) ++ { ++ /* Source operand for store must be in a register */ ++ operands[1] = force_reg (QImode, operands[1]); ++ } ++ } ++ if ( GET_CODE (operands[1]) == CONST_INT ++ && GET_CODE (operands[0]) == REG) ++ { ++ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0); ++ emit_insn (gen_movsi (operands[0], operands[1])); ++ DONE; ++ } ++}") ++ ++(define_expand "movhi" ++ [(set (match_operand:HI 0 "general_operand" "") ++ (match_operand:HI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ if (can_create_pseudo_p ()) ++ { ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ /* Source operand for store must be in a register */ ++ operands[1] = force_reg (HImode, operands[1]); ++ } ++ } ++ if (GET_CODE (operands[1]) == CONST_INT) ++ { ++ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0); ++ if (MEDIUM_INT (INTVAL (operands[1]))) ++ emit_insn (gen_movsi_kimm (operands[0], operands[1])); ++ else if (MEDIUM_UINT (INTVAL (operands[1]))) ++ emit_insn (gen_movsi_limm (operands[0], operands[1])); ++ else ++ { ++ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1])))); ++ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1])))); ++ } ++ DONE; ++ } ++}") ++ ++(define_expand "movsi" ++ [(set (match_operand:SI 0 "general_operand" "") ++ (match_operand:SI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ if (can_create_pseudo_p ()) ++ { ++ if (GET_CODE (operands[0]) == MEM ++ || (GET_CODE (operands[0]) == SUBREG ++ && GET_CODE (SUBREG_REG (operands[0])) == MEM)) ++ { ++ /* Source operand for store must be in a register */ ++ operands[1] = force_reg (SImode, operands[1]); ++ } ++ } ++ ++ if (flag_pic && symbolic_operand (operands[1], SImode)) ++ { ++ if (GET_CODE (operands[1]) == LABEL_REF ++ || (GET_CODE (operands[1]) == SYMBOL_REF ++ && SYMBOL_REF_LOCAL_P (operands[1]) ++ && !SYMBOL_REF_WEAK (operands[1]))) ++ { ++ emit_insn (gen_movsi_gotoff_hi16 (operands[0], operands[1])); ++ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx)); ++ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], operands[1])); ++ } ++ else ++ { ++ emit_insn (gen_movsi_got (operands[0], operands[1])); ++ } ++ crtl->uses_pic_offset_table = 1; ++ DONE; ++ } ++ else if (flag_pic && GET_CODE (operands[1]) == CONST) ++ { ++ rtx op = XEXP (operands[1], 0); ++ if (GET_CODE (op) == PLUS) ++ { ++ rtx arg0 = XEXP (op, 0); ++ rtx arg1 = XEXP (op, 1); ++ if (GET_CODE (arg0) == LABEL_REF ++ || (GET_CODE (arg0) == SYMBOL_REF ++ && SYMBOL_REF_LOCAL_P (arg0) ++ && !SYMBOL_REF_WEAK (arg0))) ++ { ++ emit_insn (gen_movsi_gotoff_hi16 (operands[0], arg0)); ++ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx)); ++ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], arg0)); ++ } ++ else ++ { ++ emit_insn (gen_movsi_got (operands[0], arg0)); ++ } ++ emit_insn (gen_addsi3 (operands[0], operands[0], arg1)); ++ crtl->uses_pic_offset_table = 1; ++ DONE; ++ } ++ } ++ else if (!flag_pic && ( GET_CODE (operands[1]) == SYMBOL_REF ++ && SYMBOL_REF_SMALL_P (operands[1]) ++ ) ++ ) ++ { ++ emit_insn (gen_movsi_reloc_gprel (operands[0], operands[1])); ++ DONE; ++ } ++ else if (!flag_pic && ( GET_CODE (operands[1]) == LABEL_REF ++ || GET_CODE (operands[1]) == SYMBOL_REF ++ || GET_CODE (operands[1]) == CONST ++ ) ++ ) ++ { ++ emit_insn (gen_movsi_reloc_hi (operands[0], operands[1])); ++ emit_insn (gen_movsi_reloc_lo (operands[0], operands[0], operands[1])); ++ DONE; ++ } ++ else if (GET_CODE (operands[1]) == CONST_INT) ++ { ++ if (MEDIUM_INT (INTVAL (operands[1]))) ++ emit_insn (gen_movsi_kimm (operands[0], operands[1])); ++ else if (MEDIUM_UINT (INTVAL (operands[1]))) ++ emit_insn (gen_movsi_limm (operands[0], operands[1])); ++ else ++ { ++ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1])))); ++ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1])))); ++ } ++ DONE; ++ } ++}") ++ ++;;(define_expand "movmemsi" ++;; [(parallel [(set (match_operand:BLK 0 "general_operand" "") ++;; (match_operand:BLK 1 "general_operand" "")) ++;; (use (match_operand:SI 2 "" "")) ++;; (use (match_operand:SI 3 "const_int_operand" ""))])] ++;; "" ++;;{ ++;; if (!lm32_expand_block_move (operands)) ++;; FAIL; ++;; DONE; ++;;}) ++ ++;; --------------------------------- ++;; load/stores/moves ++;; --------------------------------- ++ ++(define_insn "movsi_kimm" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (match_operand:SI 1 "constant_K_operand" "K"))] ++ "" ++ "addi %0, r0, %1" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_limm" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (match_operand:SI 1 "constant_L_operand" "L"))] ++ "" ++ "ori %0, r0, %1" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_imm_hi" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (high:SI (match_operand:SI 1 "immediate_operand" "i")))] ++ "" ++ "orhi %0, r0, hi(%1)" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_imm_lo" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lo_sum:SI (match_operand:SI 1 "register_operand" "0") ++ (match_operand:SI 2 "immediate_operand" "i")))] ++ "" ++ "ori %0, %0, lo(%2)" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_reloc_gprel" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (match_operand:SI 1 "reloc_operand" "i"))] ++ "GET_CODE (operands[1]) == SYMBOL_REF && SYMBOL_REF_SMALL_P (operands[1])" ++ "mva %0, gp(%1)" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_got" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOT))] ++ "flag_pic" ++ "lw %0, (gp+got(%1))" ++ [(set_attr "type" "load")] ++) ++ ++(define_insn "movsi_gotoff_hi16" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF_HI16))] ++ "flag_pic" ++ "orhi %0, r0, gotoffhi16(%1)" ++ [(set_attr "type" "load")] ++) ++ ++(define_insn "movsi_gotoff_lo16" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(plus:SI (match_operand:SI 1 "register_operand" "0") ++ (match_operand 2 "" ""))] UNSPEC_GOTOFF_LO16))] ++ "flag_pic" ++ "addi %0, %1, gotofflo16(%2)" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_reloc_hi" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (high:SI (match_operand:SI 1 "reloc_operand" "i")))] ++ "!flag_pic" ++ "orhi %0, r0, hi(%1)" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "movsi_reloc_lo" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lo_sum:SI (match_operand:SI 1 "register_operand" "0") ++ (match_operand:SI 2 "reloc_operand" "i")))] ++ "!flag_pic" ++ "ori %0, %0, lo(%2)" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "*movqi_insn" ++ [(set (match_operand:QI 0 "register_or_memory_operand" "=r,r,m") ++ (match_operand:QI 1 "register_or_memory_operand" "m,r,r"))] ++ "" ++ "@ ++ lbu %0, %1 ++ or %0, %1, r0 ++ sb %0, %1" ++ [(set_attr "type" "load,arith,store")] ++) ++ ++(define_insn "*movhi_insn" ++ [(set (match_operand:HI 0 "register_or_memory_operand" "=r,r,m") ++ (match_operand:HI 1 "register_or_memory_operand" "m,r,r"))] ++ "" ++ "@ ++ lhu %0, %1 ++ or %0, %1, r0 ++ sh %0, %1" ++ [(set_attr "type" "load,arith,store")] ++) ++ ++(define_insn "*movsi_insn" ++ [(set (match_operand:SI 0 "register_or_memory_operand" "=r,r,m") ++ (match_operand:SI 1 "register_or_memory_operand" "m,r,r"))] ++ "" ++ "@ ++ lw %0, %1 ++ or %0, %1, r0 ++ sw %0, %1" ++ [(set_attr "type" "load,arith,store")] ++) ++ ++;; --------------------------------- ++;; sign and zero extension ++;; --------------------------------- ++ ++(define_insn "*extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "=r,r") ++ (sign_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] ++ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)" ++ "@ ++ lb %0, %1 ++ sextb %0, %1" ++ [(set_attr "type" "load,arith")] ++) ++ ++(define_insn "zero_extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "=r,r") ++ (zero_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] ++ "" ++ "@ ++ lbu %0, %1 ++ andi %0, %1, 0xff" ++ [(set_attr "type" "load,arith")] ++) ++ ++(define_insn "*extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (sign_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] ++ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)" ++ "@ ++ lb %0, %1 ++ sextb %0, %1" ++ [(set_attr "type" "load,arith")] ++) ++ ++(define_insn "zero_extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (zero_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] ++ "" ++ "@ ++ lbu %0, %1 ++ andi %0, %1, 0xff" ++ [(set_attr "type" "load,arith")] ++) ++ ++(define_insn "*extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (sign_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))] ++ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)" ++ "@ ++ lh %0, %1 ++ sexth %0, %1" ++ [(set_attr "type" "load,arith")] ++) ++ ++(define_insn "zero_extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (zero_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))] ++ "" ++ "@ ++ lhu %0, %1 ++ andi %0, %1, 0xffff" ++ [(set_attr "type" "load,arith")] ++) ++ ++;; --------------------------------- ++;; compare ++;; --------------------------------- ++ ++(define_expand "cmpsi" ++ [(set (cc0) ++ (compare:CC (match_operand:SI 0 "register_operand" "") ++ (match_operand:SI 1 "register_or_K_operand" "")))] ++ "" ++ " ++{ ++ lm32_compare_op0 = operands[0]; ++ lm32_compare_op1 = operands[1]; ++ DONE; ++}") ++ ++ ++(define_expand "tstsi" ++ [(set (cc0) ++ (match_operand:SI 0 "register_operand" ""))] ++ "" ++ " ++{ ++ lm32_compare_op0 = operands[0]; ++ lm32_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++(define_expand "seq" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (eq:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_insn "*seq" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (eq:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,K")))] ++ "" ++ "@ ++ cmpe %0, %z1, %2 ++ cmpei %0, %z1, %2" ++ [(set_attr "type" "compare")] ++) ++ ++(define_expand "sne" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ne:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_insn "*sne" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ne:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,K")))] ++ "" ++ "@ ++ cmpne %0, %z1, %2 ++ cmpnei %0, %z1, %2" ++ [(set_attr "type" "compare")] ++) ++ ++(define_expand "sgt" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gt:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_insn "*sgt" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (gt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,K")))] ++ "" ++ "@ ++ cmpg %0, %z1, %2 ++ cmpgi %0, %z1, %2" ++ [(set_attr "type" "compare")] ++) ++ ++(define_expand "slt" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lt:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_expand "sge" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ge:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_insn "*sge" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ge:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,K")))] ++ "" ++ "@ ++ cmpge %0, %z1, %2 ++ cmpgei %0, %z1, %2" ++ [(set_attr "type" "compare")] ++) ++ ++(define_expand "sle" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (le:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_expand "sgtu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gtu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_insn "*sgtu" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (gtu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,L")))] ++ "" ++ "@ ++ cmpgu %0, %z1, %2 ++ cmpgui %0, %z1, %2" ++ [(set_attr "type" "compare")] ++) ++ ++(define_expand "sltu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ltu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_expand "sgeu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (geu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++(define_insn "*sgeu" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (geu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,L")))] ++ "" ++ "@ ++ cmpgeu %0, %z1, %2 ++ cmpgeui %0, %z1, %2" ++ [(set_attr "type" "compare")] ++) ++ ++(define_expand "sleu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (leu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ operands[1] = lm32_compare_op0; ++ operands[2] = lm32_compare_op1; ++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++;; --------------------------------- ++;; unconditional branch ++;; --------------------------------- ++ ++(define_insn "jump" ++ [(set (pc) (label_ref (match_operand 0 "" "")))] ++ "" ++ "bi %0" ++ [(set_attr "type" "ubranch")] ++) ++ ++(define_expand "indirect_jump" ++ [(set (pc) (match_operand 0 "register_operand" ""))] ++ "" ++ " ++{ ++ emit_jump_insn (gen_indirect_jumpsi (operands[0])); ++ DONE; ++}") ++ ++(define_insn "indirect_jumpsi" ++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))] ++ "" ++ "b %0" ++ [(set_attr "type" "uibranch")] ++) ++ ++;; --------------------------------- ++;; conditional branch ++;; --------------------------------- ++ ++(define_expand "beq" ++ [(set (pc) ++ (if_then_else (eq:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (EQ, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bne" ++ [(set (pc) ++ (if_then_else (ne:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (NE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bgt" ++ [(set (pc) ++ (if_then_else (gt:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (GT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bge" ++ [(set (pc) ++ (if_then_else (ge:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (GE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "ble" ++ [(set (pc) ++ (if_then_else (le:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (LE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "blt" ++ [(set (pc) ++ (if_then_else (lt:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (LT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bgtu" ++ [(set (pc) ++ (if_then_else (gtu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (GTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bgeu" ++ [(set (pc) ++ (if_then_else (geu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (GEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bleu" ++ [(set (pc) ++ (if_then_else (leu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (LEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_expand "bltu" ++ [(set (pc) ++ (if_then_else (ltu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ gen_int_relational (LTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); ++ DONE; ++}") ++ ++(define_insn "*beq" ++ [(set (pc) ++ (if_then_else (eq:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") ++ (match_operand:SI 1 "register_or_zero_operand" "rJ")) ++ (label_ref (match_operand 2 "" "")) ++ (pc)))] ++ "" ++{ ++ return get_attr_length (insn) == 4 ++ ? "be %z0,%z1,%2" ++ : "bne %z0,%z1,8\n\tbi %2"; ++} ++ [(set_attr "type" "cbranch")]) ++ ++(define_insn "*bne" ++ [(set (pc) ++ (if_then_else (ne:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") ++ (match_operand:SI 1 "register_or_zero_operand" "rJ")) ++ (label_ref (match_operand 2 "" "")) ++ (pc)))] ++ "" ++{ ++ return get_attr_length (insn) == 4 ++ ? "bne %z0,%z1,%2" ++ : "be %z0,%z1,8\n\tbi %2"; ++} ++ [(set_attr "type" "cbranch")]) ++ ++(define_insn "*bgt" ++ [(set (pc) ++ (if_then_else (gt:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") ++ (match_operand:SI 1 "register_or_zero_operand" "rJ")) ++ (label_ref (match_operand 2 "" "")) ++ (pc)))] ++ "" ++{ ++ return get_attr_length (insn) == 4 ++ ? "bg %z0,%z1,%2" ++ : "bge %z1,%z0,8\n\tbi %2"; ++} ++ [(set_attr "type" "cbranch")]) ++ ++(define_insn "*bge" ++ [(set (pc) ++ (if_then_else (ge:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") ++ (match_operand:SI 1 "register_or_zero_operand" "rJ")) ++ (label_ref (match_operand 2 "" "")) ++ (pc)))] ++ "" ++{ ++ return get_attr_length (insn) == 4 ++ ? "bge %z0,%z1,%2" ++ : "bg %z1,%z0,8\n\tbi %2"; ++} ++ [(set_attr "type" "cbranch")]) ++ ++(define_insn "*bgtu" ++ [(set (pc) ++ (if_then_else (gtu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") ++ (match_operand:SI 1 "register_or_zero_operand" "rJ")) ++ (label_ref (match_operand 2 "" "")) ++ (pc)))] ++ "" ++{ ++ return get_attr_length (insn) == 4 ++ ? "bgu %z0,%z1,%2" ++ : "bgeu %z1,%z0,8\n\tbi %2"; ++} ++ [(set_attr "type" "cbranch")]) ++ ++(define_insn "*bgeu" ++ [(set (pc) ++ (if_then_else (geu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") ++ (match_operand:SI 1 "register_or_zero_operand" "rJ")) ++ (label_ref (match_operand 2 "" "")) ++ (pc)))] ++ "" ++{ ++ return get_attr_length (insn) == 4 ++ ? "bgeu %z0,%z1,%2" ++ : "bgu %z1,%z0,8\n\tbi %2"; ++} ++ [(set_attr "type" "cbranch")]) ++ ++;; --------------------------------- ++;; call ++;; --------------------------------- ++ ++(define_expand "call" ++ [(parallel [(call (match_operand 0 "memory_operand" "m") ++ (match_operand 1 "" "")) ++ (clobber (reg:SI RA_REGNUM)) ++ ])] ++ "" ++ " ++{ ++ rtx addr = XEXP (operands[0], 0); ++ if (!CONSTANT_ADDRESS_P (addr)) ++ { ++ emit_call_insn (gen_call_via_regsi (addr, operands[1])); ++ DONE; ++ } ++}") ++ ++(define_insn "call_via_regsi" ++ [(call (mem:SI (match_operand:SI 0 "register_operand" "r")) ++ (match_operand 1 "" "")) ++ (clobber (reg:SI RA_REGNUM))] ++ "" ++ "call %0" ++ [(set_attr "type" "icall")] ++) ++ ++(define_insn "*call_via_labelsi" ++ [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "X")) ++ (match_operand 1 "" "")) ++ (clobber (reg:SI RA_REGNUM))] ++ "" ++ "calli %0" ++ [(set_attr "type" "call")] ++) ++ ++(define_expand "call_value" ++ [(parallel [(set (match_operand 0 "register_operand" "=r") ++ (call (match_operand 1 "memory_operand" "m") ++ (match_operand 2 "" ""))) ++ (clobber (reg:SI RA_REGNUM)) ++ ])] ++ "" ++ " ++{ ++ rtx addr = XEXP (operands[1], 0); ++ if (!CONSTANT_ADDRESS_P (addr)) ++ { ++ emit_call_insn (gen_call_value_via_regsi (operands[0], addr, operands[2])); ++ DONE; ++ } ++}") ++ ++(define_insn "call_value_via_regsi" ++ [(set (match_operand 0 "register_operand" "=r") ++ (call (mem:SI (match_operand:SI 1 "register_operand" "r")) ++ (match_operand 2 "" ""))) ++ (clobber (reg:SI RA_REGNUM))] ++ "" ++ "call %1" ++ [(set_attr "type" "icall")] ++) ++ ++(define_insn "*call_value_via_labelsi" ++ [(set (match_operand 0 "register_operand" "=r") ++ (call (mem:SI (match_operand:SI 1 "symbolic_operand" "X")) ++ (match_operand 2 "" ""))) ++ (clobber (reg:SI RA_REGNUM))] ++ "" ++ "calli %1" ++ [(set_attr "type" "call")] ++) ++ ++(define_insn "return_internalsi" ++ [(use (match_operand:SI 0 "register_operand" "r")) ++ (return)] ++ "" ++ "b %0" ++ [(set_attr "type" "uibranch")] ++) ++ ++(define_insn "return" ++ [(return)] ++ "lm32_can_use_return ()" ++ "ret" ++ [(set_attr "type" "uibranch")] ++) ++ ++;; --------------------------------- ++;; switch/case statements ++;; --------------------------------- ++ ++(define_expand "tablejump" ++ [(set (pc) (match_operand 0 "register_operand" "")) ++ (use (label_ref (match_operand 1 "" "")))] ++ "" ++ " ++{ ++ rtx target = operands[0]; ++ if (flag_pic) ++ { ++ /* For PIC, the table entry is relative to the start of the table. */ ++ rtx label = gen_reg_rtx (SImode); ++ target = gen_reg_rtx (SImode); ++ emit_move_insn (label, gen_rtx_LABEL_REF (SImode, operands[1])); ++ emit_insn (gen_addsi3 (target, operands[0], label)); ++ } ++ emit_jump_insn (gen_tablejumpsi (target, operands[1])); ++ DONE; ++}") ++ ++(define_insn "tablejumpsi" ++ [(set (pc) (match_operand:SI 0 "register_operand" "r")) ++ (use (label_ref (match_operand 1 "" "")))] ++ "" ++ "b %0" ++ [(set_attr "type" "ubranch")] ++) ++ ++;; --------------------------------- ++;; arithmetic ++;; --------------------------------- ++ ++(define_insn "addsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (plus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,K")))] ++ "" ++ "@ ++ add %0, %z1, %2 ++ addi %0, %z1, %2" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "subsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ") ++ (match_operand:SI 2 "register_or_zero_operand" "rJ")))] ++ "" ++ "sub %0, %z1, %z2" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "mulsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (mult:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_K_operand" "r,K")))] ++ "TARGET_MULTIPLY_ENABLED" ++ "@ ++ mul %0, %z1, %2 ++ muli %0, %z1, %2" ++ [(set_attr "type" "multiply")] ++) ++ ++(define_insn "udivsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (udiv:SI (match_operand:SI 1 "register_or_zero_operand" "rJ") ++ (match_operand:SI 2 "register_operand" "r")))] ++ "TARGET_DIVIDE_ENABLED" ++ "divu %0, %z1, %2" ++ [(set_attr "type" "divide")] ++) ++ ++(define_insn "umodsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (umod:SI (match_operand:SI 1 "register_or_zero_operand" "rJ") ++ (match_operand:SI 2 "register_operand" "r")))] ++ "TARGET_DIVIDE_ENABLED" ++ "modu %0, %z1, %2" ++ [(set_attr "type" "divide")] ++) ++ ++;; --------------------------------- ++;; negation and inversion ++;; --------------------------------- ++ ++(define_insn "negsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (neg:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))] ++ "" ++ "sub %0, r0, %z1" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "one_cmplsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (not:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))] ++ "" ++ "not %0, %z1" ++ [(set_attr "type" "arith")] ++) ++ ++;; --------------------------------- ++;; logical ++;; --------------------------------- ++ ++(define_insn "andsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (and:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L")))] ++ "" ++ "@ ++ and %0, %z1, %2 ++ andi %0, %z1, %2" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "iorsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L")))] ++ "" ++ "@ ++ or %0, %z1, %2 ++ ori %0, %z1, %2" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "xorsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L")))] ++ "" ++ "@ ++ xor %0, %z1, %2 ++ xori %0, %z1, %2" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "*norsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (not:SI (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L"))))] ++ "" ++ "@ ++ nor %0, %z1, %2 ++ nori %0, %z1, %2" ++ [(set_attr "type" "arith")] ++) ++ ++(define_insn "*xnorsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (not:SI (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L"))))] ++ "" ++ "@ ++ xnor %0, %z1, %2 ++ xnori %0, %z1, %2" ++ [(set_attr "type" "arith")] ++) ++ ++;; --------------------------------- ++;; shifts ++;; --------------------------------- ++ ++(define_insn "ashlsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ashift:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L")))] ++ "TARGET_BARREL_SHIFT_ENABLED" ++ "@ ++ sl %0, %z1, %2 ++ sli %0, %z1, %2" ++ [(set_attr "type" "shift")] ++) ++ ++(define_insn "ashrsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ashiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L")))] ++ "TARGET_BARREL_SHIFT_ENABLED" ++ "@ ++ sr %0, %z1, %2 ++ sri %0, %z1, %2" ++ [(set_attr "type" "shift")] ++) ++ ++(define_insn "lshrsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (lshiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") ++ (match_operand:SI 2 "register_or_L_operand" "r,L")))] ++ "TARGET_BARREL_SHIFT_ENABLED" ++ "@ ++ sru %0, %z1, %2 ++ srui %0, %z1, %2" ++ [(set_attr "type" "shift")] ++) ++ ++;; --------------------------------- ++;; function entry / exit ++;; --------------------------------- ++ ++(define_expand "prologue" ++ [(const_int 1)] ++ "" ++ " ++{ ++ lm32_expand_prologue (); ++ DONE; ++}") ++ ++(define_expand "epilogue" ++ [(return)] ++ "" ++ " ++{ ++ lm32_expand_epilogue (); ++ DONE; ++}") ++ ++;; --------------------------------- ++;; nop ++;; --------------------------------- ++ ++(define_insn "nop" ++ [(const_int 0)] ++ "" ++ "nop" ++ [(set_attr "type" "arith")] ++) ++ ++;; --------------------------------- ++;; blockage ++;; --------------------------------- ++ ++;; used to stop the scheduler from ++;; scheduling code across certain boundaries ++ ++(define_insn "blockage" ++ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] ++ "" ++ "" ++ [(set_attr "length" "0")] ++) ++ +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32.opt gcc-4.4.6/gcc/config/lm32/lm32.opt +--- gcc-4.4.6.orig/gcc/config/lm32/lm32.opt 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/lm32.opt 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,40 @@ ++; Options for the Lattice Mico32 port of the compiler. ++; Contributed by Jon Beniston ++; ++; Copyright (C) 2008 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 3, 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 COPYING3. If not see ++; . ++ ++mmultiply-enabled ++Target Report Mask(MULTIPLY_ENABLED) ++Enable multiply instructions ++ ++mdivide-enabled ++Target Report Mask(DIVIDE_ENABLED) ++Enable divide and modulus instructions ++ ++mbarrel-shift-enabled ++Target Report Mask(BARREL_SHIFT_ENABLED) ++Enable barrel shift instructions ++ ++msign-extend-enabled ++Target Report Mask(SIGN_EXTEND_ENABLED) ++Enable sign extend instructions ++ ++muser-enabled ++Target Report Mask(USER_ENABLED) ++Enable user-defined instructions +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h gcc-4.4.6/gcc/config/lm32/lm32-protos.h +--- gcc-4.4.6.orig/gcc/config/lm32/lm32-protos.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/lm32-protos.h 2011-08-29 07:16:18.134123880 +0200 +@@ -0,0 +1,52 @@ ++/* Prototypes of target machine functions, Lattice Mico32 architecture. ++ Contributed by Jon Beniston ++ ++ Copyright (C) 2008 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 3, 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 COPYING3. If not see ++ . */ ++ ++extern int lm32_return_in_memory (tree type); ++extern void lm32_declare_object (FILE *stream, char *name, char *init_string, ++ char *final_string, int size); ++extern int symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED); ++extern int register_or_zero_operand (rtx op, enum machine_mode mode); ++extern int register_or_K_operand (rtx op, enum machine_mode mode); ++extern int constant_K_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED); ++extern int register_or_L_operand (rtx op, enum machine_mode mode); ++extern int constant_L_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED); ++extern int register_or_memory_operand (rtx op, enum machine_mode mode); ++extern int register_operand (rtx op, enum machine_mode mode); ++extern int const_ok_for_base_offset (rtx op, enum machine_mode mode); ++extern void lm32_expand_prologue (void); ++extern void lm32_expand_epilogue (void); ++extern HOST_WIDE_INT lm32_compute_frame_size (int size); ++extern void lm32_print_operand (FILE *file, rtx op, int letter); ++extern void lm32_print_operand_address (FILE *file, rtx addr); ++extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode, ++ tree type, int named); ++extern void lm32_override_options (void); ++extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from, ++ int to); ++extern int lm32_can_use_return (void); ++extern rtx lm32_return_addr_rtx (int count, rtx frame); ++#ifdef RTX_CODE ++extern void gen_int_relational (enum rtx_code code, rtx result, rtx cmp0, ++ rtx cmp1, rtx destination); ++#endif ++extern int lm32_expand_block_move (rtx *); ++extern int nonpic_symbol_mentioned_p (rtx); ++extern rtx lm32_legitimize_pic_address (rtx, enum machine_mode, rtx); +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/predicates.md gcc-4.4.6/gcc/config/lm32/predicates.md +--- gcc-4.4.6.orig/gcc/config/lm32/predicates.md 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/predicates.md 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,58 @@ ++;; Predicate definitions for Lattice Mico32. ++;; Contributed by Jon Beniston ++;; ++;; Copyright (C) 2008 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 3, 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 COPYING3. If not see ++;; . ++ ++(define_predicate "const0_operand" ++ (and (match_code "const_int,const_double,const_vector") ++ (match_test "op == CONST0_RTX (GET_MODE (op))"))) ++ ++(define_predicate "constant_K_operand" ++ (and (match_code "const_int") ++ (match_test "MEDIUM_INT (INTVAL (op))"))) ++ ++(define_predicate "constant_L_operand" ++ (and (match_code "const_int") ++ (match_test "MEDIUM_UINT (INTVAL (op))"))) ++ ++(define_predicate "register_or_zero_operand" ++ (ior (match_operand 0 "register_operand") ++ (match_operand 0 "const0_operand"))) ++ ++(define_predicate "register_or_memory_operand" ++ (ior (match_operand 0 "register_operand") ++ (match_operand 0 "memory_operand"))) ++ ++(define_predicate "register_or_K_operand" ++ (ior (match_operand 0 "register_operand") ++ (match_operand 0 "constant_K_operand"))) ++ ++(define_predicate "register_or_L_operand" ++ (ior (match_operand 0 "register_operand") ++ (match_operand 0 "constant_L_operand"))) ++ ++(define_predicate "reloc_operand" ++ (ior (ior (match_code "label_ref") ++ (match_code "symbol_ref")) ++ (match_code "const"))) ++ ++(define_predicate "symbolic_operand" ++ (ior (match_code "label_ref") ++ (match_code "symbol_ref"))) ++ +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/rtems.h gcc-4.4.6/gcc/config/lm32/rtems.h +--- gcc-4.4.6.orig/gcc/config/lm32/rtems.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/rtems.h 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,32 @@ ++/* Definitions for rtems targeting a lm32 using ELF. ++ Copyright (C) 2009, 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 3, 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 COPYING3. If not see ++. */ ++ ++/* Target OS builtins. */ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ builtin_define ("__rtems__"); \ ++ builtin_define ("__USE_INIT_FINI__"); \ ++ builtin_assert ("system=rtems"); \ ++ } \ ++ while (0) ++ ++/* Use the default */ ++#undef LINK_GCC_C_SEQUENCE_SPEC +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h gcc-4.4.6/gcc/config/lm32/sfp-machine.h +--- gcc-4.4.6.orig/gcc/config/lm32/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/sfp-machine.h 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,51 @@ ++#define _FP_W_TYPE_SIZE 32 ++#define _FP_W_TYPE unsigned long ++#define _FP_WS_TYPE signed long ++#define _FP_I_TYPE long ++ ++#define _FP_MUL_MEAT_S(R,X,Y) \ ++ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) ++#define _FP_MUL_MEAT_D(R,X,Y) \ ++ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) ++#define _FP_MUL_MEAT_Q(R,X,Y) \ ++ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) ++ ++#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y) ++#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) ++#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) ++ ++#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) ++#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 ++#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 ++#define _FP_NANSIGN_S 0 ++#define _FP_NANSIGN_D 0 ++#define _FP_NANSIGN_Q 0 ++ ++#define _FP_KEEPNANFRACP 1 ++ ++/* Someone please check this. */ ++#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ ++ do { \ ++ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ ++ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ ++ { \ ++ R##_s = Y##_s; \ ++ _FP_FRAC_COPY_##wc(R,Y); \ ++ } \ ++ else \ ++ { \ ++ R##_s = X##_s; \ ++ _FP_FRAC_COPY_##wc(R,X); \ ++ } \ ++ R##_c = FP_CLS_NAN; \ ++ } while (0) ++ ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++ ++#define __BYTE_ORDER __BIG_ENDIAN ++ ++/* Define ALIASNAME as a strong alias for NAME. */ ++# define strong_alias(name, aliasname) _strong_alias(name, aliasname) ++# define _strong_alias(name, aliasname) \ ++ extern __typeof (name) aliasname __attribute__ ((alias (#name))); +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp gcc-4.4.6/gcc/config/lm32/t-fprules-softfp +--- gcc-4.4.6.orig/gcc/config/lm32/t-fprules-softfp 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/t-fprules-softfp 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,5 @@ ++softfp_float_modes := sf df ++softfp_int_modes := si di ++softfp_extensions := sfdf ++softfp_truncations := dfsf ++softfp_machine_header := lm32/sfp-machine.h +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/t-lm32 gcc-4.4.6/gcc/config/lm32/t-lm32 +--- gcc-4.4.6.orig/gcc/config/lm32/t-lm32 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/t-lm32 2011-08-29 07:16:18.136123965 +0200 +@@ -0,0 +1,19 @@ ++LIB1ASMSRC = lm32/lib1funcs.S ++LIB1ASMFUNCS = _ashlsi3 _ashrsi3 _lshrsi3 ++ ++LM32_LIB1CSRC = $(srcdir)/config/lm32/arithmetic.c ++LIB2FUNCS_EXTRA = _mulsi3.c \ ++ _udivmodsi4.c _divsi3.c _modsi3.c _udivsi3.c _umodsi3.c ++# Size optimised versions: _ashlsi3.c _ashrsi3.c _lshrsi3.c ++ ++# The fixed-point arithmetic code is in one file ++# similar to libgcc2.c (or the old libgcc1.c). We need to ++# "split it up" with one file per define. ++$(LIB2FUNCS_EXTRA): $(LM32_LIB1CSRC) ++ name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \ ++ echo "#define L$$name" > tmp-$@ \ ++ && echo '#include "$<"' >> tmp-$@ \ ++ && mv -f tmp-$@ $@ ++ ++MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled ++# Don't bother building multilib with mdivide-enabled, not much of a gain +diff -Naur gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h gcc-4.4.6/gcc/config/lm32/uclinux-elf.h +--- gcc-4.4.6.orig/gcc/config/lm32/uclinux-elf.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/config/lm32/uclinux-elf.h 2011-08-29 07:16:18.137124000 +0200 +@@ -0,0 +1,85 @@ ++/* Definitions for LM32 running Linux-based GNU systems using ELF ++ Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ++ 2008 Free Software Foundation, Inc. ++ Contributed by Philip Blundell ++ ++ 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 3, 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 COPYING3. If not see ++ . */ ++ ++/* elfos.h should have already been included. Now just override ++ any conflicting definitions and add any extras. */ ++ ++/* Run-time Target Specification. */ ++#undef TARGET_VERSION ++#define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr); ++ ++/* Do not assume anything about header files. */ ++#undef NO_IMPLICIT_EXTERN_C ++#define NO_IMPLICIT_EXTERN_C ++ ++/* The GNU C++ standard library requires that these macros be defined. */ ++#undef CPLUSPLUS_CPP_SPEC ++#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" ++ ++/* Now we define the strings used to build the spec file. */ ++#undef LIB_SPEC ++#define LIB_SPEC \ ++ "%{pthread:-lpthread} \ ++ %{shared:-lc} \ ++ %{!shared:-lc} " ++ ++#define LIBGCC_SPEC "-lgcc" ++ ++/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add ++ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which ++ provides part of the support for getting C++ file-scope static ++ object constructed before entering `main'. */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++ "%{!shared: \ ++ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ ++ %{!p:%{profile:gcrt1.o%s} \ ++ %{!profile:crt1.o%s}}}} \ ++ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ ++/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on ++ the GNU/Linux magical crtend.o file (see crtstuff.c) which ++ provides part of the support for getting C++ file-scope static ++ object constructed before entering `main', followed by a normal ++ GNU/Linux "finalizer" file, `crtn.o'. */ ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC \ ++ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{h*} %{version:-v} \ ++ %{b} %{Wl,*:%*} \ ++ %{static:-Bstatic} \ ++ %{shared:-shared} \ ++ %{symbolic:-Bsymbolic} \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}" ++ ++#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() ++ ++#define LINK_GCC_C_SEQUENCE_SPEC \ ++ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" ++ ++#undef CC1_SPEC ++#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}" ++ +diff -Naur gcc-4.4.6.orig/gcc/config/m32c/rtems.h gcc-4.4.6/gcc/config/m32c/rtems.h +--- gcc-4.4.6.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100 ++++ gcc-4.4.6/gcc/config/m32c/rtems.h 2011-08-29 07:16:18.137124000 +0200 +@@ -29,5 +29,9 @@ + } \ + while (0) + +-/* Use the default */ ++/* Use the defaults */ + #undef LINK_GCC_C_SEQUENCE_SPEC ++ ++#undef WCHAR_TYPE ++ ++#undef WCHAR_TYPE_SIZE +diff -Naur gcc-4.4.6.orig/gcc/config/m68k/rtemself.h gcc-4.4.6/gcc/config/m68k/rtemself.h +--- gcc-4.4.6.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.6/gcc/config/m68k/rtemself.h 2011-08-29 07:16:18.137124000 +0200 +@@ -31,3 +31,8 @@ + builtin_assert ("system=rtems"); \ + } \ + while (0) ++ ++/* Use the defaults */ ++#undef WCHAR_TYPE ++ ++#undef WCHAR_TYPE_SIZE +diff -Naur gcc-4.4.6.orig/gcc/config/mips/elf.h gcc-4.4.6/gcc/config/mips/elf.h +--- gcc-4.4.6.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.6/gcc/config/mips/elf.h 2011-08-29 07:16:18.137124000 +0200 +@@ -48,6 +48,4 @@ + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "crtend%O%s crtn%O%s" + +-#define NO_IMPLICIT_EXTERN_C 1 +- + #define HANDLE_PRAGMA_PACK_PUSH_POP 1 +diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/rtems.h gcc-4.4.6/gcc/config/rs6000/rtems.h +--- gcc-4.4.6.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.6/gcc/config/rs6000/rtems.h 2011-08-29 07:16:18.137124000 +0200 +@@ -49,8 +49,22 @@ + %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \ + %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \ + %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \ +-%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }" ++%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \ ++%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }" + + #undef SUBSUBTARGET_EXTRA_SPECS + #define SUBSUBTARGET_EXTRA_SPECS \ + { "cpp_os_rtems", CPP_OS_RTEMS_SPEC } ++ ++#undef SUBSUBTARGET_OVERRIDE_OPTIONS ++#define SUBSUBTARGET_OVERRIDE_OPTIONS \ ++ do { \ ++ if (TARGET_E500) \ ++ { \ ++ rs6000_float_gprs = 1; \ ++ } \ ++ } while(0) ++ ++#undef WCHAR_TYPE ++ ++#undef WCHAR_TYPE_SIZE +diff -Naur gcc-4.4.6.orig/gcc/config/rs6000/t-rtems gcc-4.4.6/gcc/config/rs6000/t-rtems +--- gcc-4.4.6.orig/gcc/config/rs6000/t-rtems 2009-03-25 13:54:16.000000000 +0100 ++++ gcc-4.4.6/gcc/config/rs6000/t-rtems 2011-08-29 07:16:18.137124000 +0200 +@@ -1,13 +1,29 @@ + # Multilibs for powerpc RTEMS targets. ++# ++# Copyright (C) 2004, 2005, 2009 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 3, 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 COPYING3. If not see ++# . + + MULTILIB_OPTIONS = \ +-mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \ +-Dmpc8260 \ ++mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \ + msoft-float + + MULTILIB_DIRNAMES = \ +-m403 m505 m601 m603e m604 m860 m7400 \ +-mpc8260 \ ++m403 m505 m601 m603e m604 m860 m7400 m8540 \ + nof + + # MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} +@@ -29,6 +45,9 @@ + # Map 750 to . + MULTILIB_MATCHES += mcpu?750= + ++# Map 8548 to 8540 ++MULTILIB_MATCHES += mcpu?8540=mcpu?8548 ++ + # Soft-float only, default implies msoft-float + # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES + MULTILIB_SOFTFLOAT_ONLY = \ +@@ -55,10 +74,3 @@ + + # Special rules + # Take out all variants we don't want +-MULTILIB_EXCEPTIONS += *mcpu=403/Dmpc* +-MULTILIB_EXCEPTIONS += *mcpu=505/Dmpc* +-MULTILIB_EXCEPTIONS += *mcpu=601/Dmpc* +-MULTILIB_EXCEPTIONS += *mcpu=604/Dmpc* +-MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc* +-MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc* +-MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc* +diff -Naur gcc-4.4.6.orig/gcc/config/rtems.h gcc-4.4.6/gcc/config/rtems.h +--- gcc-4.4.6.orig/gcc/config/rtems.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.6/gcc/config/rtems.h 2011-08-29 07:16:18.138124032 +0200 +@@ -38,6 +38,5 @@ + #undef LIB_SPEC + #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \ + "%{!nostdlib: %{qrtems: --start-group \ +- %{!qrtems_debug: -lrtemsbsp -lrtemscpu} \ +- %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \ ++ -lrtemsbsp -lrtemscpu \ + -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}" +diff -Naur gcc-4.4.6.orig/gcc/config/sh/rtemself.h gcc-4.4.6/gcc/config/sh/rtemself.h +--- gcc-4.4.6.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.6/gcc/config/sh/rtemself.h 2011-08-29 07:16:18.138124032 +0200 +@@ -24,3 +24,8 @@ + builtin_define( "__rtems__" ); \ + builtin_assert( "system=rtems" ); \ + } while (0) ++ ++/* Use the defaults */ ++#undef WCHAR_TYPE ++ ++#undef WCHAR_TYPE_SIZE +diff -Naur gcc-4.4.6.orig/gcc/config/sparc/rtemself.h gcc-4.4.6/gcc/config/sparc/rtemself.h +--- gcc-4.4.6.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.6/gcc/config/sparc/rtemself.h 2011-08-29 07:16:18.138124032 +0200 +@@ -29,5 +29,9 @@ + } \ + while (0) + +-/* Use the default */ ++/* Use the defaults */ + #undef LINK_GCC_C_SEQUENCE_SPEC ++ ++#undef WCHAR_TYPE ++ ++#undef WCHAR_TYPE_SIZE +diff -Naur gcc-4.4.6.orig/gcc/config.gcc gcc-4.4.6/gcc/config.gcc +--- gcc-4.4.6.orig/gcc/config.gcc 2011-02-18 22:39:51.000000000 +0100 ++++ gcc-4.4.6/gcc/config.gcc 2011-08-29 07:16:18.132123787 +0200 +@@ -1377,6 +1377,23 @@ + out_file=iq2000/iq2000.c + md_file=iq2000/iq2000.md + ;; ++lm32-*-elf*) ++ tm_file="dbxelf.h elfos.h ${tm_file}" ++ tmake_file="lm32/t-lm32" ++ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp" ++ ;; ++lm32-*-rtems*) ++ tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h" ++ tmake_file="lm32/t-lm32" ++ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp" ++ tmake_file="${tmake_file} t-rtems" ++ extra_parts="crtbegin.o crtend.o crti.o crtn.o" ++ ;; ++lm32-*-uclinux*) ++ tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h" ++ tmake_file="lm32/t-lm32" ++ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp" ++ ;; + m32r-*-elf*) + tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" + extra_parts="crtinit.o crtfini.o" +diff -Naur gcc-4.4.6.orig/gcc/doc/contrib.texi gcc-4.4.6/gcc/doc/contrib.texi +--- gcc-4.4.6.orig/gcc/doc/contrib.texi 2009-02-20 16:20:38.000000000 +0100 ++++ gcc-4.4.6/gcc/doc/contrib.texi 2011-08-29 07:16:21.941181976 +0200 +@@ -55,7 +55,7 @@ + Wolfgang Bangerth for processing tons of bug reports. + + @item +-Jon Beniston for his Microsoft Windows port of Java. ++Jon Beniston for his Microsoft Windows port of Java and port to Lattice Mico32. + + @item + Daniel Berlin for better DWARF2 support, faster/better optimizations, +diff -Naur gcc-4.4.6.orig/gcc/doc/install.texi gcc-4.4.6/gcc/doc/install.texi +--- gcc-4.4.6.orig/gcc/doc/install.texi 2010-07-15 11:26:30.000000000 +0200 ++++ gcc-4.4.6/gcc/doc/install.texi 2011-08-29 07:16:21.942182004 +0200 +@@ -2660,6 +2660,10 @@ + @item + @uref{#iq2000-x-elf,,iq2000-*-elf} + @item ++@uref{#lm32-x-elf,,lm32-*-elf} ++@item ++@uref{#lm32-x-uclinux,,lm32-*-uclinux} ++@item + @uref{#m32c-x-elf,,m32c-*-elf} + @item + @uref{#m32r-x-elf,,m32r-*-elf} +@@ -3472,6 +3476,20 @@ + @html +
+ @end html ++@heading @anchor{lm32-x-elf}lm32-*-elf ++Lattice Mico32 processor. ++This configuration is intended for embedded systems. ++ ++@html ++
++@end html ++@heading @anchor{lm32-x-uclinux}lm32-*-uclinux ++Lattice Mico32 processor. ++This configuration is intended for embedded systems running uClinux. ++ ++@html ++
++@end html + @heading @anchor{m32c-x-elf}m32c-*-elf + Renesas M32C processor. + This configuration is intended for embedded systems. +diff -Naur gcc-4.4.6.orig/gcc/doc/invoke.texi gcc-4.4.6/gcc/doc/invoke.texi +--- gcc-4.4.6.orig/gcc/doc/invoke.texi 2011-03-23 23:02:12.000000000 +0100 ++++ gcc-4.4.6/gcc/doc/invoke.texi 2011-08-29 07:16:21.948182208 +0200 +@@ -610,6 +610,10 @@ + -mno-sched-prefer-non-control-spec-insns @gol + -mno-sched-count-spec-in-critical-path} + ++@emph{LM32 Options} ++@gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol ++-msign-extend-enabled -muser-enabled} ++ + @emph{M32R/D Options} + @gccoptlist{-m32r2 -m32rx -m32r @gol + -mdebug @gol +@@ -8858,6 +8862,7 @@ + * i386 and x86-64 Options:: + * i386 and x86-64 Windows Options:: + * IA-64 Options:: ++* LM32 Options:: + * M32C Options:: + * M32R/D Options:: + * M680x0 Options:: +@@ -11907,6 +11912,35 @@ + + @end table + ++@node LM32 Options ++@subsection LM32 Options ++@cindex LM32 options ++ ++These @option{-m} options are defined for the Lattice Mico32 architecture: ++ ++@table @gcctabopt ++@item -mbarrel-shift-enabled ++@opindex mbarrel-shift-enabled ++Enable barrel-shift instructions. ++ ++@item -mdivide-enabled ++@opindex mdivide-enabled ++Enable divide and modulus instructions. ++ ++@item -mmultiply-enabled ++@opindex multiply-enabled ++Enable multiply instructions. ++ ++@item -msign-extend-enabled ++@opindex msign-extend-enabled ++Enable sign extend instructions. ++ ++@item -muser-enabled ++@opindex muser-enabled ++Enable user-defined instructions. ++ ++@end table ++ + @node M32R/D Options + @subsection M32R/D Options + @cindex M32R/D options +diff -Naur gcc-4.4.6.orig/gcc/toplev.c gcc-4.4.6/gcc/toplev.c +--- gcc-4.4.6.orig/gcc/toplev.c 2010-03-31 04:51:31.000000000 +0200 ++++ gcc-4.4.6/gcc/toplev.c 2011-08-29 07:16:21.949182232 +0200 +@@ -527,7 +527,7 @@ + for floor_log2 and exact_log2; see toplev.h. That construct, however, + conflicts with the ISO C++ One Definition Rule. */ + +-#if GCC_VERSION < 3004 || !defined (__cplusplus) ++#if ((GCC_VERSION < 3004) || defined(__clang__)) || !defined (__cplusplus) + + /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. + If X is 0, return -1. */ +diff -Naur gcc-4.4.6.orig/gcc/toplev.h gcc-4.4.6/gcc/toplev.h +--- gcc-4.4.6.orig/gcc/toplev.h 2009-02-20 16:20:38.000000000 +0100 ++++ gcc-4.4.6/gcc/toplev.h 2011-08-29 07:16:21.949182232 +0200 +@@ -174,7 +174,7 @@ + extern int floor_log2 (unsigned HOST_WIDE_INT); + + /* Inline versions of the above for speed. */ +-#if GCC_VERSION >= 3004 ++#if (GCC_VERSION >= 3004) && !defined(__clang__) + # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG + # define CLZ_HWI __builtin_clzl + # define CTZ_HWI __builtin_ctzl +diff -Naur gcc-4.4.6.orig/libgcc/ChangeLog.rtems gcc-4.4.6/libgcc/ChangeLog.rtems +--- gcc-4.4.6.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/libgcc/ChangeLog.rtems 2011-08-29 07:16:21.949182232 +0200 +@@ -0,0 +1,5 @@ ++ Jon Beniston ++ ++ * libgcc/config/lm32/t-elf, libgcc/config/lm32/t-uclinux, ++ libgcc/config/lm32/t-uclinux: New (lm32 port). ++ * libgcc/config.host: Add lm32* targets. +diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-elf gcc-4.4.6/libgcc/config/lm32/t-elf +--- gcc-4.4.6.orig/libgcc/config/lm32/t-elf 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/libgcc/config/lm32/t-elf 2011-08-29 07:16:21.950182265 +0200 +@@ -0,0 +1,12 @@ ++# Assemble startup files. ++ ++$(T)crti.o: $(gcc_srcdir)/config/lm32/crti.S $(GCC_PASSES) ++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ ++ -c -o $(T)crti.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crti.S ++ ++$(T)crtn.o: $(gcc_srcdir)/config/lm32/crtn.S $(GCC_PASSES) ++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ ++ -c -o $(T)crtn.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crtn.S ++ ++CRTSTUFF_T_CFLAGS = -G 0 ++TARGET_LIBGCC2_CFLAGS = -G 0 +diff -Naur gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux gcc-4.4.6/libgcc/config/lm32/t-uclinux +--- gcc-4.4.6.orig/libgcc/config/lm32/t-uclinux 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/libgcc/config/lm32/t-uclinux 2011-08-29 07:16:21.950182265 +0200 +@@ -0,0 +1,2 @@ ++CRTSTUFF_T_CFLAGS = -fPIC ++TARGET_LIBGCC2_CFLAGS = -fPIC +diff -Naur gcc-4.4.6.orig/libgcc/config.host gcc-4.4.6/libgcc/config.host +--- gcc-4.4.6.orig/libgcc/config.host 2009-04-17 13:58:41.000000000 +0200 ++++ gcc-4.4.6/libgcc/config.host 2011-08-29 07:16:21.949182232 +0200 +@@ -95,6 +95,9 @@ + hppa*-*-*) + cpu_type=pa + ;; ++lm32*-*-*) ++ cpu_type=lm32 ++ ;; + m32r*-*-*) + cpu_type=m32r + ;; +@@ -355,6 +358,14 @@ + ;; + iq2000*-*-elf*) + ;; ++lm32-*-elf* | lm32-*-rtems*) ++ extra_parts="crtbegin.o crtend.o crti.o crtn.o" ++ tmake_file="lm32/t-elf" ++ ;; ++lm32-*-uclinux*) ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" ++ tmake_file="lm32/t-uclinux" ++ ;; + m32r-*-elf*|m32r-*-rtems*) + ;; + m32rle-*-elf*) diff --git a/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff b/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff new file mode 100644 index 0000000000..dcaa439700 --- /dev/null +++ b/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff @@ -0,0 +1,454 @@ +diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6/gcc/cp/cfns.h +--- gcc-4.4.6.orig/gcc/cp/cfns.h 2009-02-18 22:01:03.000000000 +0100 ++++ gcc-4.4.6/gcc/cp/cfns.h 2011-08-29 07:14:47.562734079 +0200 +@@ -1,4 +1,4 @@ +-/* ANSI-C code produced by gperf version 3.0.1 */ ++/* ANSI-C code produced by gperf version 3.0.4 */ + /* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */ + + #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ +@@ -57,13 +57,13 @@ + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 0, 0, +- 1, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 1, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 28, 90, 0, + 95, 0, 51, 93, 114, 26, 109, 124, 5, 1, +- 6, 13, 37, 128, 3, 0, 0, 49, 38, 0, ++ 6, 13, 37, 128, 3, 0, 0, 49, 38, 0, + 104, 45, 0, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, +@@ -84,29 +84,32 @@ + switch (hval) + { + default: +- hval += asso_values[(unsigned char)str[5]+1]; ++ hval += asso_values[(unsigned char)str[5]+1]; + /*FALLTHROUGH*/ + case 5: +- hval += asso_values[(unsigned char)str[4]]; ++ hval += asso_values[(unsigned char)str[4]]; + /*FALLTHROUGH*/ + case 4: +- hval += asso_values[(unsigned char)str[3]]; ++ hval += asso_values[(unsigned char)str[3]]; + /*FALLTHROUGH*/ + case 3: +- hval += asso_values[(unsigned char)str[2]]; ++ hval += asso_values[(unsigned char)str[2]]; + /*FALLTHROUGH*/ + case 2: +- hval += asso_values[(unsigned char)str[1]]; ++ hval += asso_values[(unsigned char)str[1]]; + /*FALLTHROUGH*/ + case 1: +- hval += asso_values[(unsigned char)str[0]]; +- break; ++ hval += asso_values[(unsigned char)str[0]]; ++ break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; + } + + #ifdef __GNUC__ + __inline ++#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * + libc_name_p (register const char *str, register unsigned int len) +@@ -329,17 +332,17 @@ + register int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) +- { +- register int index = lookup[key]; ++ { ++ register int index = lookup[key]; + +- if (index >= 0) +- { +- register const char *s = wordlist[index]; +- +- if (*str == *s && !strcmp (str + 1, s + 1)) +- return s; +- } +- } ++ if (index >= 0) ++ { ++ register const char *s = wordlist[index]; ++ ++ if (*str == *s && !strcmp (str + 1, s + 1)) ++ return s; ++ } ++ } + } + return 0; + } +diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h.orig gcc-4.4.6/gcc/cp/cfns.h.orig +--- gcc-4.4.6.orig/gcc/cp/cfns.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/cp/cfns.h.orig 2011-08-29 07:08:46.455058067 +0200 +@@ -0,0 +1,348 @@ ++/* ANSI-C code produced by gperf version 3.0.4 */ ++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */ ++ ++#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ ++ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ ++ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ ++ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ ++ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ ++ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ ++ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ ++ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ ++ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ ++ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ ++ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ ++ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ ++ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ ++ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ ++ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ ++ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ ++ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ ++ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ ++ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ ++ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ ++ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ ++ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ ++ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) ++/* The character set is not based on ISO-646. */ ++#error "gperf generated tables don't work with this execution character set. Please report a bug to ." ++#endif ++ ++#line 1 "../../gcc/cp/cfns.gperf" ++ ++#ifdef __GNUC__ ++__inline ++#endif ++static unsigned int hash (const char *, unsigned int); ++#ifdef __GNUC__ ++__inline ++#endif ++const char * libc_name_p (const char *, unsigned int); ++/* maximum key range = 391, duplicates = 0 */ ++ ++#ifdef __GNUC__ ++__inline ++#else ++#ifdef __cplusplus ++inline ++#endif ++#endif ++static unsigned int ++hash (register const char *str, register unsigned int len) ++{ ++ static const unsigned short asso_values[] = ++ { ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 0, 0, ++ 1, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 28, 90, 0, ++ 95, 0, 51, 93, 114, 26, 109, 124, 5, 1, ++ 6, 13, 37, 128, 3, 0, 0, 49, 38, 0, ++ 104, 45, 0, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, ++ 400, 400, 400, 400, 400, 400, 400 ++ }; ++ register int hval = len; ++ ++ switch (hval) ++ { ++ default: ++ hval += asso_values[(unsigned char)str[5]+1]; ++ /*FALLTHROUGH*/ ++ case 5: ++ hval += asso_values[(unsigned char)str[4]]; ++ /*FALLTHROUGH*/ ++ case 4: ++ hval += asso_values[(unsigned char)str[3]]; ++ /*FALLTHROUGH*/ ++ case 3: ++ hval += asso_values[(unsigned char)str[2]]; ++ /*FALLTHROUGH*/ ++ case 2: ++ hval += asso_values[(unsigned char)str[1]]; ++ /*FALLTHROUGH*/ ++ case 1: ++ hval += asso_values[(unsigned char)str[0]]; ++ break; ++ } ++ return hval + asso_values[(unsigned char)str[len - 1]]; ++} ++ ++#ifdef __GNUC__ ++__inline ++#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif ++#endif ++const char * ++libc_name_p (register const char *str, register unsigned int len) ++{ ++ enum ++ { ++ TOTAL_KEYWORDS = 156, ++ MIN_WORD_LENGTH = 3, ++ MAX_WORD_LENGTH = 10, ++ MIN_HASH_VALUE = 9, ++ MAX_HASH_VALUE = 399 ++ }; ++ ++ static const char * const wordlist[] = ++ { ++ "wcsstr", ++ "strstr", ++ "cos", ++ "towctrans", ++ "memmove", ++ "wcstol", ++ "wcscoll", ++ "wcstombs", ++ "strtol", ++ "strcoll", ++ "wcslen", ++ "time", ++ "ctime", ++ "strlen", ++ "iswctype", ++ "wmemchr", ++ "wcsrchr", ++ "ceil", ++ "sin", ++ "strrchr", ++ "tan", ++ "iscntrl", ++ "acos", ++ "wmemmove", ++ "wcsrtombs", ++ "wctrans", ++ "wmemcmp", ++ "pow", ++ "atol", ++ "wcsncmp", ++ "memset", ++ "free", ++ "strncmp", ++ "wmemset", ++ "wcsspn", ++ "wcstoul", ++ "strspn", ++ "strtoul", ++ "asctime", ++ "atan2", ++ "asin", ++ "atan", ++ "ferror", ++ "iswalnum", ++ "wcscat", ++ "realloc", ++ "strcat", ++ "wcscpy", ++ "memcpy", ++ "strcpy", ++ "tolower", ++ "floor", ++ "iswcntrl", ++ "atoi", ++ "clearerr", ++ "swscanf", ++ "wcsncat", ++ "islower", ++ "strncat", ++ "btowc", ++ "localtime", ++ "wctomb", ++ "isalnum", ++ "isprint", ++ "mblen", ++ "wcstod", ++ "log10", ++ "strtod", ++ "wcrtomb", ++ "abs", ++ "setlocale", ++ "wcschr", ++ "mbrlen", ++ "memchr", ++ "strchr", ++ "labs", ++ "iswpunct", ++ "exit", ++ "sqrt", ++ "swprintf", ++ "wctype", ++ "mbsrtowcs", ++ "wcscspn", ++ "getenv", ++ "strcspn", ++ "towlower", ++ "atof", ++ "wcstok", ++ "localeconv", ++ "strtok", ++ "calloc", ++ "malloc", ++ "isalpha", ++ "iswlower", ++ "iswspace", ++ "wcsxfrm", ++ "signal", ++ "strxfrm", ++ "wcsftime", ++ "feof", ++ "strftime", ++ "wcscmp", ++ "fabs", ++ "memcmp", ++ "strcmp", ++ "vsprintf", ++ "fwide", ++ "gmtime", ++ "sprintf", ++ "exp", ++ "wmemcpy", ++ "iswprint", ++ "sscanf", ++ "wcsncpy", ++ "strncpy", ++ "isspace", ++ "toupper", ++ "wctob", ++ "div", ++ "mbtowc", ++ "ldiv", ++ "log", ++ "mktime", ++ "isupper", ++ "atexit", ++ "modf", ++ "mbstowcs", ++ "mbrtowc", ++ "ispunct", ++ "iswalpha", ++ "setvbuf", ++ "rand", ++ "srand", ++ "frexp", ++ "towupper", ++ "mbsinit", ++ "cosh", ++ "vswprintf", ++ "iswupper", ++ "wcspbrk", ++ "fmod", ++ "strpbrk", ++ "sinh", ++ "tanh", ++ "iswdigit", ++ "clock", ++ "longjmp", ++ "ldexp", ++ "setbuf", ++ "fseek", ++ "iswgraph", ++ "difftime", ++ "iswxdigit", ++ "isdigit", ++ "isxdigit", ++ "isgraph" ++ }; ++ ++ static const short lookup[] = ++ { ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, ++ -1, -1, 1, -1, -1, -1, 2, -1, -1, -1, ++ -1, -1, 3, 4, -1, 5, 6, 7, 8, 9, ++ 10, 11, 12, 13, 14, -1, -1, -1, 15, 16, ++ 17, 18, 19, 20, 21, 22, -1, -1, 23, 24, ++ -1, 25, 26, 27, -1, 28, 29, 30, 31, 32, ++ 33, -1, 34, 35, -1, 36, 37, 38, -1, 39, ++ 40, -1, 41, -1, -1, -1, -1, -1, -1, 42, ++ -1, 43, -1, 44, -1, 45, 46, -1, 47, -1, ++ 48, 49, 50, 51, 52, -1, -1, 53, 54, 55, ++ -1, -1, -1, 56, -1, 57, 58, -1, 59, 60, ++ 61, 62, 63, 64, 65, -1, 66, 67, -1, 68, ++ -1, 69, 70, 71, 72, 73, 74, 75, -1, -1, ++ -1, -1, -1, 76, 77, 78, -1, -1, 79, 80, ++ 81, 82, -1, 83, 84, -1, 85, 86, 87, -1, ++ 88, 89, 90, 91, -1, -1, -1, 92, -1, 93, ++ -1, 94, -1, 95, -1, 96, 97, -1, 98, -1, ++ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, ++ -1, 109, 110, 111, 112, -1, 113, -1, -1, 114, ++ -1, -1, -1, 115, -1, -1, -1, 116, 117, -1, ++ 118, -1, -1, -1, -1, 119, 120, 121, -1, 122, ++ 123, -1, -1, 124, -1, 125, 126, -1, 127, -1, ++ 128, -1, -1, 129, 130, -1, -1, -1, -1, -1, ++ -1, 131, 132, -1, -1, -1, -1, 133, 134, 135, ++ -1, -1, -1, -1, -1, 136, -1, 137, -1, -1, ++ -1, 138, -1, -1, -1, -1, -1, -1, 139, 140, ++ -1, 141, -1, -1, 142, -1, 143, -1, -1, 144, ++ -1, 145, -1, -1, -1, -1, 146, -1, -1, -1, ++ -1, -1, -1, 147, -1, -1, -1, -1, -1, 148, ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, 149, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, 150, -1, -1, -1, -1, -1, ++ 151, -1, -1, 152, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, 153, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, 154, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, -1, -1, -1, 155 ++ }; ++ ++ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) ++ { ++ register int key = hash (str, len); ++ ++ if (key <= MAX_HASH_VALUE && key >= 0) ++ { ++ register int index = lookup[key]; ++ ++ if (index >= 0) ++ { ++ register const char *s = wordlist[index]; ++ ++ if (*str == *s && !strcmp (str + 1, s + 1)) ++ return s; ++ } ++ } ++ } ++ return 0; ++} +diff -Naur gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems gcc-4.4.6/gcc/cp/ChangeLog.rtems +--- gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.6/gcc/cp/ChangeLog.rtems 2011-08-29 07:14:47.561734025 +0200 +@@ -0,0 +1,5 @@ ++2011-08-29 Ralf Corsépius ++ and Eric Norum ++ ++ Fix bootstrap breakdowns on OS X 10.7.1 (Lion): ++ * cfns.h: Regenerate. -- cgit v1.2.3 From 1b818282a9cc401ed483e1ce15803c22811c7bc9 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Aug 2011 05:36:02 +0000 Subject: Abandon gcc-4.4.5. gcc-core-4.4.6-rtems4.10-20110829.diff. gcc-g++-4.4.6-rtems4.10-20110829.diff. --- contrib/crossrpms/rtems4.10/arm/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/avr/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/bfin/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/h8300/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/i386/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/lm32/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/m32c/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/m32r/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/m68k/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/mips/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/sh/gcc-sources.add | 10 ++-------- contrib/crossrpms/rtems4.10/sparc/gcc-sources.add | 10 ++-------- 13 files changed, 26 insertions(+), 104 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/gcc-sources.add b/contrib/crossrpms/rtems4.10/arm/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/arm/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/arm/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/avr/gcc-sources.add b/contrib/crossrpms/rtems4.10/avr/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/avr/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/avr/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add b/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/bfin/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add b/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/h8300/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/i386/gcc-sources.add b/contrib/crossrpms/rtems4.10/i386/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/i386/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/i386/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add b/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/lm32/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add b/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/m32c/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add b/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/m32r/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add b/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/m68k/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/mips/gcc-sources.add b/contrib/crossrpms/rtems4.10/mips/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/mips/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/mips/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add b/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/powerpc/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/sh/gcc-sources.add b/contrib/crossrpms/rtems4.10/sh/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/sh/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/sh/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} diff --git a/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add b/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add index 66cfc3e805..3ec3b39505 100644 --- a/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add +++ b/contrib/crossrpms/rtems4.10/sparc/gcc-sources.add @@ -1,19 +1,13 @@ -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} %if %build_cxx -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} -- cgit v1.2.3 From b1e0b6a7870dcfd690facc16d5366d146aa74e5a Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Aug 2011 05:38:47 +0000 Subject: GCC_RPMREL = 3. --- contrib/crossrpms/rtems4.10/arm/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/avr/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/bfin/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/h8300/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/i386/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/lm32/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m32c/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m32r/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m68k/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/mips/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/powerpc/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/sh/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/sparc/Makefile.am | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/Makefile.am b/contrib/crossrpms/rtems4.10/arm/Makefile.am index 614b744911..a6e1089f37 100644 --- a/contrib/crossrpms/rtems4.10/arm/Makefile.am +++ b/contrib/crossrpms/rtems4.10/arm/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) diff --git a/contrib/crossrpms/rtems4.10/avr/Makefile.am b/contrib/crossrpms/rtems4.10/avr/Makefile.am index 2f159329a8..058582304d 100644 --- a/contrib/crossrpms/rtems4.10/avr/Makefile.am +++ b/contrib/crossrpms/rtems4.10/avr/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/bfin/Makefile.am b/contrib/crossrpms/rtems4.10/bfin/Makefile.am index 25b48a22e5..84a57ba38f 100644 --- a/contrib/crossrpms/rtems4.10/bfin/Makefile.am +++ b/contrib/crossrpms/rtems4.10/bfin/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/h8300/Makefile.am b/contrib/crossrpms/rtems4.10/h8300/Makefile.am index c2bb89b995..7fee4c05d8 100644 --- a/contrib/crossrpms/rtems4.10/h8300/Makefile.am +++ b/contrib/crossrpms/rtems4.10/h8300/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/i386/Makefile.am b/contrib/crossrpms/rtems4.10/i386/Makefile.am index b4978d0b10..3f6d00b8c4 100644 --- a/contrib/crossrpms/rtems4.10/i386/Makefile.am +++ b/contrib/crossrpms/rtems4.10/i386/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/lm32/Makefile.am b/contrib/crossrpms/rtems4.10/lm32/Makefile.am index b95ff39abc..7e1ceb088a 100644 --- a/contrib/crossrpms/rtems4.10/lm32/Makefile.am +++ b/contrib/crossrpms/rtems4.10/lm32/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/m32c/Makefile.am b/contrib/crossrpms/rtems4.10/m32c/Makefile.am index 9b13cc93c4..61edccee7a 100644 --- a/contrib/crossrpms/rtems4.10/m32c/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m32c/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/m32r/Makefile.am b/contrib/crossrpms/rtems4.10/m32r/Makefile.am index d8f676526f..6fecabb60e 100644 --- a/contrib/crossrpms/rtems4.10/m32r/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m32r/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/m68k/Makefile.am b/contrib/crossrpms/rtems4.10/m68k/Makefile.am index 7c06a1570a..973b81f850 100644 --- a/contrib/crossrpms/rtems4.10/m68k/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m68k/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/mips/Makefile.am b/contrib/crossrpms/rtems4.10/mips/Makefile.am index 7f54f24471..2a719e0537 100644 --- a/contrib/crossrpms/rtems4.10/mips/Makefile.am +++ b/contrib/crossrpms/rtems4.10/mips/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am index 35143ded9c..f96869441c 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am +++ b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/sh/Makefile.am b/contrib/crossrpms/rtems4.10/sh/Makefile.am index 3da1ee0b67..0336f69268 100644 --- a/contrib/crossrpms/rtems4.10/sh/Makefile.am +++ b/contrib/crossrpms/rtems4.10/sh/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/sparc/Makefile.am b/contrib/crossrpms/rtems4.10/sparc/Makefile.am index ac5c551ee0..3ade84a16d 100644 --- a/contrib/crossrpms/rtems4.10/sparc/Makefile.am +++ b/contrib/crossrpms/rtems4.10/sparc/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 2 +GCC_RPMREL = 3 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` -- cgit v1.2.3 From 1ea6e6ecc5e93db858e38b5d81672493bf6b9ae6 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Aug 2011 05:40:15 +0000 Subject: Regenerate. --- .../arm/rtems-4.10-arm-rtems4.10-gcc.spec | 31 +++++++--------------- .../avr/rtems-4.10-avr-rtems4.10-gcc.spec | 27 ++++++------------- .../bfin/rtems-4.10-bfin-rtems4.10-gcc.spec | 31 +++++++--------------- .../h8300/rtems-4.10-h8300-rtems4.10-gcc.spec | 31 +++++++--------------- .../i386/rtems-4.10-i386-rtems4.10-gcc.spec | 31 +++++++--------------- .../lm32/rtems-4.10-lm32-rtems4.10-gcc.spec | 31 +++++++--------------- .../m32c/rtems-4.10-m32c-rtems4.10-gcc.spec | 27 ++++++------------- .../m32r/rtems-4.10-m32r-rtems4.10-gcc.spec | 27 ++++++------------- .../m68k/rtems-4.10-m68k-rtems4.10-gcc.spec | 31 +++++++--------------- .../mips/rtems-4.10-mips-rtems4.10-gcc.spec | 31 +++++++--------------- .../powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec | 31 +++++++--------------- .../rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec | 31 +++++++--------------- .../sparc/rtems-4.10-sparc-rtems4.10-gcc.spec | 31 +++++++--------------- 13 files changed, 114 insertions(+), 277 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec index e2ccffa900..045eb2ee7d 100644 --- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: arm-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-arm-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-arm-rtems4.10-binutils Requires: rtems-4.10-arm-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-arm-rtems4.10-binutils -# Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for arm-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-arm-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for arm-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for arm-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec index 513c43ff73..3ef0459461 100644 --- a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: avr-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-avr-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-avr-rtems4.10-binutils Requires: rtems-4.10-avr-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,13 +250,9 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} @@ -350,7 +339,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +611,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-avr-rtems4.10-binutils -# Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -640,7 +629,7 @@ Summary: libgcc for avr-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-avr-rtems4.10-gcc-libgcc @@ -755,7 +744,7 @@ Summary: C Library (newlib) for avr-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -776,7 +765,7 @@ Newlib C Library for avr-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec index b0ef184eeb..1dd0dfc1b8 100644 --- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: bfin-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-bfin-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-bfin-rtems4.10-binutils Requires: rtems-4.10-bfin-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-bfin-rtems4.10-binutils -# Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for bfin-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-bfin-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for bfin-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for bfin-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec index 63bdbab0a5..f3823f266d 100644 --- a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: h8300-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-h8300-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-h8300-rtems4.10-binutils Requires: rtems-4.10-h8300-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-h8300-rtems4.10-binutils -# Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for h8300-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-h8300-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for h8300-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for h8300-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec index 6fb8f6696d..c53fa2abf5 100644 --- a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: i386-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-i386-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-i386-rtems4.10-binutils Requires: rtems-4.10-i386-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-i386-rtems4.10-binutils -# Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for i386-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-i386-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for i386-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for i386-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec index 583551f23a..f9efacd176 100644 --- a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: lm32-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-lm32-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-lm32-rtems4.10-binutils Requires: rtems-4.10-lm32-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-lm32-rtems4.10-binutils -# Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for lm32-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-lm32-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for lm32-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for lm32-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec index 5ae7a36e75..b1ffd1b9ba 100644 --- a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: m32c-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-m32c-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-m32c-rtems4.10-binutils Requires: rtems-4.10-m32c-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,13 +250,9 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} @@ -350,7 +339,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +611,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-m32c-rtems4.10-binutils -# Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -640,7 +629,7 @@ Summary: libgcc for m32c-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-m32c-rtems4.10-gcc-libgcc @@ -756,7 +745,7 @@ Summary: C Library (newlib) for m32c-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -777,7 +766,7 @@ Newlib C Library for m32c-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec index 6b594bdace..46f71b7a13 100644 --- a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: m32r-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-m32r-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-m32r-rtems4.10-binutils Requires: rtems-4.10-m32r-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,13 +250,9 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} @@ -350,7 +339,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +611,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-m32r-rtems4.10-binutils -# Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -640,7 +629,7 @@ Summary: libgcc for m32r-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-m32r-rtems4.10-gcc-libgcc @@ -756,7 +745,7 @@ Summary: C Library (newlib) for m32r-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -777,7 +766,7 @@ Newlib C Library for m32r-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec index d851bce555..123f21c802 100644 --- a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: m68k-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-m68k-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-m68k-rtems4.10-binutils Requires: rtems-4.10-m68k-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-m68k-rtems4.10-binutils -# Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for m68k-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-m68k-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for m68k-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for m68k-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec index 1b34661ac0..43823ec168 100644 --- a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: mips-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-mips-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-mips-rtems4.10-binutils Requires: rtems-4.10-mips-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-mips-rtems4.10-binutils -# Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for mips-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-mips-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for mips-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for mips-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec index 4e89e21dad..f50729872d 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: powerpc-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-powerpc-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-powerpc-rtems4.10-binutils Requires: rtems-4.10-powerpc-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-powerpc-rtems4.10-binutils -# Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for powerpc-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-powerpc-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for powerpc-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for powerpc-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec index c0b1526748..5fbd915571 100644 --- a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: sh-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-sh-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-sh-rtems4.10-binutils Requires: rtems-4.10-sh-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-sh-rtems4.10-binutils -# Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for sh-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-sh-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for sh-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for sh-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec index 276f3bb4df..fe6fc6fee1 100644 --- a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: sparc-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -107,12 +107,6 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.3.1 %endif -%if 0%{?fc13} -%global mpc_provided 0.8.1 -%global mpfr_provided 2.4.2 -%global gmp_provided 4.3.1 -%endif - %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 @@ -209,7 +203,6 @@ BuildRequires: %{_host_rpmprefix}libelf-devel >= %{libelf_required} %if %{defined cloog_required} -%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} @@ -245,7 +238,7 @@ BuildRequires: rtems-4.10-sparc-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-sparc-rtems4.10-binutils Requires: rtems-4.10-sparc-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-26%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -257,21 +250,15 @@ BuildRequires: %{_host_rpmprefix}zlib-devel %global _gcclibdir %{_prefix}/lib -%if "%{gcc_version}" == "4.4.5" -Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.5-rtems4.10-20110301.diff -%endif %if "%{gcc_version}" == "4.4.6" Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110420.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 0} -%if "%{gcc_version}" == "4.4.5" -Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 -%endif %if "%{gcc_version}" == "4.4.6" Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 +Patch1: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-g++-4.4.6-rtems4.10-20110829.diff %endif %{?_without_sources:NoSource: 1} @@ -362,7 +349,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-2%{?dist}/newlib-%{newlib_version}-25%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -635,7 +622,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-sparc-rtems4.10-binutils -# Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-25%{?dist} +# Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-26%{?dist} # License: GPL # %if %build_infos @@ -653,7 +640,7 @@ Summary: libgcc for sparc-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-25%{?dist} +Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-26%{?dist} License: GPL %description -n rtems-4.10-sparc-rtems4.10-gcc-libgcc @@ -829,7 +816,7 @@ Summary: C Library (newlib) for sparc-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -850,7 +837,7 @@ Newlib C Library for sparc-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 25%{?dist} +Release: 26%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable -- cgit v1.2.3 From 1d204aed834df69b96d82c402dd09de4d8c19e03 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Aug 2011 07:28:29 +0000 Subject: Cleanup. --- .../patches/gcc-g++-4.4.6-rtems4.10-20110829.diff | 378 +-------------------- 1 file changed, 14 insertions(+), 364 deletions(-) diff --git a/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff b/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff index dcaa439700..005be71d55 100644 --- a/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff +++ b/contrib/crossrpms/patches/gcc-g++-4.4.6-rtems4.10-20110829.diff @@ -1,13 +1,15 @@ -diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6/gcc/cp/cfns.h ---- gcc-4.4.6.orig/gcc/cp/cfns.h 2009-02-18 22:01:03.000000000 +0100 -+++ gcc-4.4.6/gcc/cp/cfns.h 2011-08-29 07:14:47.562734079 +0200 -@@ -1,4 +1,4 @@ +diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6gcc/cp/cfns.h +--- gcc-4.4.6.orig/gcc/cp/cfns.h 2011-08-29 08:52:31.238300940 +0200 ++++ gcc-4.4.6gcc/cp/cfns.h 2011-08-29 08:53:20.485041120 +0200 +@@ -1,5 +1,5 @@ -/* ANSI-C code produced by gperf version 3.0.1 */ -+/* ANSI-C code produced by gperf version 3.0.4 */ - /* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */ +-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */ ++/* ANSI-C code produced by gperf version 3.0.3 */ ++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ -@@ -57,13 +57,13 @@ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ +@@ -74,13 +74,13 @@ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 0, 0, @@ -23,7 +25,7 @@ diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6/gcc/cp/cfns.h 104, 45, 0, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -@@ -84,29 +84,32 @@ +@@ -101,29 +101,32 @@ switch (hval) { default: @@ -57,13 +59,13 @@ diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6/gcc/cp/cfns.h #ifdef __GNUC__ __inline -+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ ++#ifdef __GNUC_STDC_INLINE__ +__attribute__ ((__gnu_inline__)) +#endif #endif const char * libc_name_p (register const char *str, register unsigned int len) -@@ -329,17 +332,17 @@ +@@ -346,17 +349,17 @@ register int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= 0) @@ -91,361 +93,9 @@ diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h gcc-4.4.6/gcc/cp/cfns.h } return 0; } -diff -Naur gcc-4.4.6.orig/gcc/cp/cfns.h.orig gcc-4.4.6/gcc/cp/cfns.h.orig ---- gcc-4.4.6.orig/gcc/cp/cfns.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.6/gcc/cp/cfns.h.orig 2011-08-29 07:08:46.455058067 +0200 -@@ -0,0 +1,348 @@ -+/* ANSI-C code produced by gperf version 3.0.4 */ -+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */ -+ -+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ -+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ -+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ -+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ -+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ -+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ -+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ -+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ -+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ -+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ -+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ -+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ -+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ -+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ -+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ -+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ -+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ -+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ -+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ -+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ -+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ -+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ -+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -+/* The character set is not based on ISO-646. */ -+#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -+#endif -+ -+#line 1 "../../gcc/cp/cfns.gperf" -+ -+#ifdef __GNUC__ -+__inline -+#endif -+static unsigned int hash (const char *, unsigned int); -+#ifdef __GNUC__ -+__inline -+#endif -+const char * libc_name_p (const char *, unsigned int); -+/* maximum key range = 391, duplicates = 0 */ -+ -+#ifdef __GNUC__ -+__inline -+#else -+#ifdef __cplusplus -+inline -+#endif -+#endif -+static unsigned int -+hash (register const char *str, register unsigned int len) -+{ -+ static const unsigned short asso_values[] = -+ { -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 0, 0, -+ 1, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 28, 90, 0, -+ 95, 0, 51, 93, 114, 26, 109, 124, 5, 1, -+ 6, 13, 37, 128, 3, 0, 0, 49, 38, 0, -+ 104, 45, 0, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -+ 400, 400, 400, 400, 400, 400, 400 -+ }; -+ register int hval = len; -+ -+ switch (hval) -+ { -+ default: -+ hval += asso_values[(unsigned char)str[5]+1]; -+ /*FALLTHROUGH*/ -+ case 5: -+ hval += asso_values[(unsigned char)str[4]]; -+ /*FALLTHROUGH*/ -+ case 4: -+ hval += asso_values[(unsigned char)str[3]]; -+ /*FALLTHROUGH*/ -+ case 3: -+ hval += asso_values[(unsigned char)str[2]]; -+ /*FALLTHROUGH*/ -+ case 2: -+ hval += asso_values[(unsigned char)str[1]]; -+ /*FALLTHROUGH*/ -+ case 1: -+ hval += asso_values[(unsigned char)str[0]]; -+ break; -+ } -+ return hval + asso_values[(unsigned char)str[len - 1]]; -+} -+ -+#ifdef __GNUC__ -+__inline -+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -+__attribute__ ((__gnu_inline__)) -+#endif -+#endif -+const char * -+libc_name_p (register const char *str, register unsigned int len) -+{ -+ enum -+ { -+ TOTAL_KEYWORDS = 156, -+ MIN_WORD_LENGTH = 3, -+ MAX_WORD_LENGTH = 10, -+ MIN_HASH_VALUE = 9, -+ MAX_HASH_VALUE = 399 -+ }; -+ -+ static const char * const wordlist[] = -+ { -+ "wcsstr", -+ "strstr", -+ "cos", -+ "towctrans", -+ "memmove", -+ "wcstol", -+ "wcscoll", -+ "wcstombs", -+ "strtol", -+ "strcoll", -+ "wcslen", -+ "time", -+ "ctime", -+ "strlen", -+ "iswctype", -+ "wmemchr", -+ "wcsrchr", -+ "ceil", -+ "sin", -+ "strrchr", -+ "tan", -+ "iscntrl", -+ "acos", -+ "wmemmove", -+ "wcsrtombs", -+ "wctrans", -+ "wmemcmp", -+ "pow", -+ "atol", -+ "wcsncmp", -+ "memset", -+ "free", -+ "strncmp", -+ "wmemset", -+ "wcsspn", -+ "wcstoul", -+ "strspn", -+ "strtoul", -+ "asctime", -+ "atan2", -+ "asin", -+ "atan", -+ "ferror", -+ "iswalnum", -+ "wcscat", -+ "realloc", -+ "strcat", -+ "wcscpy", -+ "memcpy", -+ "strcpy", -+ "tolower", -+ "floor", -+ "iswcntrl", -+ "atoi", -+ "clearerr", -+ "swscanf", -+ "wcsncat", -+ "islower", -+ "strncat", -+ "btowc", -+ "localtime", -+ "wctomb", -+ "isalnum", -+ "isprint", -+ "mblen", -+ "wcstod", -+ "log10", -+ "strtod", -+ "wcrtomb", -+ "abs", -+ "setlocale", -+ "wcschr", -+ "mbrlen", -+ "memchr", -+ "strchr", -+ "labs", -+ "iswpunct", -+ "exit", -+ "sqrt", -+ "swprintf", -+ "wctype", -+ "mbsrtowcs", -+ "wcscspn", -+ "getenv", -+ "strcspn", -+ "towlower", -+ "atof", -+ "wcstok", -+ "localeconv", -+ "strtok", -+ "calloc", -+ "malloc", -+ "isalpha", -+ "iswlower", -+ "iswspace", -+ "wcsxfrm", -+ "signal", -+ "strxfrm", -+ "wcsftime", -+ "feof", -+ "strftime", -+ "wcscmp", -+ "fabs", -+ "memcmp", -+ "strcmp", -+ "vsprintf", -+ "fwide", -+ "gmtime", -+ "sprintf", -+ "exp", -+ "wmemcpy", -+ "iswprint", -+ "sscanf", -+ "wcsncpy", -+ "strncpy", -+ "isspace", -+ "toupper", -+ "wctob", -+ "div", -+ "mbtowc", -+ "ldiv", -+ "log", -+ "mktime", -+ "isupper", -+ "atexit", -+ "modf", -+ "mbstowcs", -+ "mbrtowc", -+ "ispunct", -+ "iswalpha", -+ "setvbuf", -+ "rand", -+ "srand", -+ "frexp", -+ "towupper", -+ "mbsinit", -+ "cosh", -+ "vswprintf", -+ "iswupper", -+ "wcspbrk", -+ "fmod", -+ "strpbrk", -+ "sinh", -+ "tanh", -+ "iswdigit", -+ "clock", -+ "longjmp", -+ "ldexp", -+ "setbuf", -+ "fseek", -+ "iswgraph", -+ "difftime", -+ "iswxdigit", -+ "isdigit", -+ "isxdigit", -+ "isgraph" -+ }; -+ -+ static const short lookup[] = -+ { -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -+ -1, -1, 1, -1, -1, -1, 2, -1, -1, -1, -+ -1, -1, 3, 4, -1, 5, 6, 7, 8, 9, -+ 10, 11, 12, 13, 14, -1, -1, -1, 15, 16, -+ 17, 18, 19, 20, 21, 22, -1, -1, 23, 24, -+ -1, 25, 26, 27, -1, 28, 29, 30, 31, 32, -+ 33, -1, 34, 35, -1, 36, 37, 38, -1, 39, -+ 40, -1, 41, -1, -1, -1, -1, -1, -1, 42, -+ -1, 43, -1, 44, -1, 45, 46, -1, 47, -1, -+ 48, 49, 50, 51, 52, -1, -1, 53, 54, 55, -+ -1, -1, -1, 56, -1, 57, 58, -1, 59, 60, -+ 61, 62, 63, 64, 65, -1, 66, 67, -1, 68, -+ -1, 69, 70, 71, 72, 73, 74, 75, -1, -1, -+ -1, -1, -1, 76, 77, 78, -1, -1, 79, 80, -+ 81, 82, -1, 83, 84, -1, 85, 86, 87, -1, -+ 88, 89, 90, 91, -1, -1, -1, 92, -1, 93, -+ -1, 94, -1, 95, -1, 96, 97, -1, 98, -1, -+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, -+ -1, 109, 110, 111, 112, -1, 113, -1, -1, 114, -+ -1, -1, -1, 115, -1, -1, -1, 116, 117, -1, -+ 118, -1, -1, -1, -1, 119, 120, 121, -1, 122, -+ 123, -1, -1, 124, -1, 125, 126, -1, 127, -1, -+ 128, -1, -1, 129, 130, -1, -1, -1, -1, -1, -+ -1, 131, 132, -1, -1, -1, -1, 133, 134, 135, -+ -1, -1, -1, -1, -1, 136, -1, 137, -1, -1, -+ -1, 138, -1, -1, -1, -1, -1, -1, 139, 140, -+ -1, 141, -1, -1, 142, -1, 143, -1, -1, 144, -+ -1, 145, -1, -1, -1, -1, 146, -1, -1, -1, -+ -1, -1, -1, 147, -1, -1, -1, -1, -1, 148, -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, 149, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, 150, -1, -1, -1, -1, -1, -+ 151, -1, -1, 152, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, -1, -1, 153, -1, -1, -1, -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, 154, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 155 -+ }; -+ -+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) -+ { -+ register int key = hash (str, len); -+ -+ if (key <= MAX_HASH_VALUE && key >= 0) -+ { -+ register int index = lookup[key]; -+ -+ if (index >= 0) -+ { -+ register const char *s = wordlist[index]; -+ -+ if (*str == *s && !strcmp (str + 1, s + 1)) -+ return s; -+ } -+ } -+ } -+ return 0; -+} -diff -Naur gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems gcc-4.4.6/gcc/cp/ChangeLog.rtems +diff -Naur gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems gcc-4.4.6gcc/cp/ChangeLog.rtems --- gcc-4.4.6.orig/gcc/cp/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.6/gcc/cp/ChangeLog.rtems 2011-08-29 07:14:47.561734025 +0200 ++++ gcc-4.4.6gcc/cp/ChangeLog.rtems 2011-08-29 07:14:47.561734025 +0200 @@ -0,0 +1,5 @@ +2011-08-29 Ralf Corsépius + and Eric Norum -- cgit v1.2.3 From bebd101268641c2beaa3958a7ab1442d5d9839ce Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Aug 2011 09:49:06 +0000 Subject: Remove. --- .../patches/gcc-core-4.4.5-rtems4.10-20110301.diff | 4570 -------------------- 1 file changed, 4570 deletions(-) delete mode 100644 contrib/crossrpms/patches/gcc-core-4.4.5-rtems4.10-20110301.diff diff --git a/contrib/crossrpms/patches/gcc-core-4.4.5-rtems4.10-20110301.diff b/contrib/crossrpms/patches/gcc-core-4.4.5-rtems4.10-20110301.diff deleted file mode 100644 index 0150824b00..0000000000 --- a/contrib/crossrpms/patches/gcc-core-4.4.5-rtems4.10-20110301.diff +++ /dev/null @@ -1,4570 +0,0 @@ -diff -Naur gcc-4.4.5.orig/ChangeLog.rtems gcc-4.4.5/ChangeLog.rtems ---- gcc-4.4.5.orig/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/ChangeLog.rtems 2011-03-01 05:57:30.782523058 +0100 -@@ -0,0 +1,4 @@ -+ Ralf Corsépius -+ -+ * configure, configure.ac (skipdirs): Add target-libiberty. -+ -diff -Naur gcc-4.4.5.orig/configure gcc-4.4.5/configure ---- gcc-4.4.5.orig/configure 2010-06-07 22:10:41.000000000 +0200 -+++ gcc-4.4.5/configure 2011-03-01 05:57:30.791523182 +0100 -@@ -2267,6 +2267,7 @@ - noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap" - ;; - *-*-rtems*) -+ skipdirs="$skipdirs target-libiberty" - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - ;; - # The tpf target doesn't support gdb yet. -@@ -6259,7 +6260,7 @@ - # to it. This is right: we don't want to search that directory - # for binaries, but we want the header files in there, so add - # them explicitly. -- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include' -+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed' - - # Someone might think of using the pre-installed headers on - # Canadian crosses, in case the installed compiler is not fully -diff -Naur gcc-4.4.5.orig/configure.ac gcc-4.4.5/configure.ac ---- gcc-4.4.5.orig/configure.ac 2010-06-07 22:10:41.000000000 +0200 -+++ gcc-4.4.5/configure.ac 2011-03-01 05:57:30.792523196 +0100 -@@ -502,6 +502,7 @@ - noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap" - ;; - *-*-rtems*) -+ skipdirs="$skipdirs target-libiberty" - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - ;; - # The tpf target doesn't support gdb yet. -@@ -2560,7 +2561,7 @@ - # to it. This is right: we don't want to search that directory - # for binaries, but we want the header files in there, so add - # them explicitly. -- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include' -+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed' - - # Someone might think of using the pre-installed headers on - # Canadian crosses, in case the installed compiler is not fully -diff -Naur gcc-4.4.5.orig/gcc/ChangeLog.rtems gcc-4.4.5/gcc/ChangeLog.rtems ---- gcc-4.4.5.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/ChangeLog.rtems 2011-03-01 06:11:33.826203883 +0100 -@@ -0,0 +1,54 @@ -+2011-02-20 Ralf Corsépius -+ -+ * config/rs6000/t-rtems: Remove -mcpu=601 multilib. -+ * config/rs6000/t-rtems: Remove -Dmpc8260 multilib. -+ -+2010-03-15 Ralf Corsépius -+ -+ Patch from Thomas Doerfler : -+ * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support -+ for vfp FPU model -+ -+2010-02-10 Ralf Corsépius -+ -+ * config/rtems.h: Abandon -qrtems_debug. -+ -+2009-12-01 Ralf Corsépius -+ -+ * config/avr/avr.h (LINK_SPEC): Pass -m avrN to ld for -mmcu=avrN. -+ -+2009-11-04 Ralf Corsépius -+ -+ * config/m32c/rtems.h, config/m68k/rtemself.h, -+ config/m68k/rtemself.h, config/sh/rtemself.h, -+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE. -+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files -+ to interfere and cause wchar_t/wint_t incompatibilities). -+ -+2009-10-15 Ralf Corsépius -+ -+ * config/avr/t-rtems: Don't build _exit. -+ -+ Jon Beniston -+ -+ * config/lm32/arithmetic.c, config/lm32/crti.S, -+ config/lm32/crtn.S, config/lm32/lib1funcs.S, -+ config/lm32/lm32.c, config/lm32/lm32.h, -+ config/lm32/lm32.md, config/lm32/lm32.opt, -+ config/lm32/lm32-protos.h, config/lm32/predicates.md, -+ config/lm32/rtems.h, config/lm32/sfp-machine.h, -+ config/lm32/t-fprules-softfp, config/lm32/t-lm32, -+ config/lm32/uclinux-elf.h: New (lm32 port). -+ * config.gcc: Add lm32* targets. -+ * doc/contrib.texi, doc/invoke.texi: Add lm32. -+ -+ Ralf Corsépius -+ -+ * config/rs6000/rtems.h: Support for custom RTEMS multilibs. -+ Support TARGET_E500. -+ * config/rs6000/t-rtems: Custom RTEMS multilibs. -+ -+ Ralf Corsépius -+ -+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C. -+ -\ No newline at end of file -diff -Naur gcc-4.4.5.orig/gcc/config/arm/rtems-elf.h gcc-4.4.5/gcc/config/arm/rtems-elf.h ---- gcc-4.4.5.orig/gcc/config/arm/rtems-elf.h 2009-03-25 13:54:16.000000000 +0100 -+++ gcc-4.4.5/gcc/config/arm/rtems-elf.h 2011-03-01 05:57:30.792523196 +0100 -@@ -36,7 +36,7 @@ - */ - #undef SUBTARGET_EXTRA_ASM_SPEC - #define SUBTARGET_EXTRA_ASM_SPEC "\ -- %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}" -+ %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}" - - /* - * The default includes --start-group and --end-group which conflicts -diff -Naur gcc-4.4.5.orig/gcc/config/arm/t-rtems gcc-4.4.5/gcc/config/arm/t-rtems ---- gcc-4.4.5.orig/gcc/config/arm/t-rtems 2004-11-23 06:30:32.000000000 +0100 -+++ gcc-4.4.5/gcc/config/arm/t-rtems 2011-03-01 05:57:30.792523196 +0100 -@@ -5,6 +5,41 @@ - MULTILIB_EXCEPTIONS = - MULTILIB_MATCHES = marm=mno-thumb - --MULTILIB_OPTIONS += msoft-float/mhard-float --MULTILIB_DIRNAMES += soft fpu --MULTILIB_EXCEPTIONS += *mthumb/*mhard-float* -+MULTILIB_OPTIONS += mhard-float/mfloat-abi=softfp -+MULTILIB_DIRNAMES += fpu softfp -+MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp* -+MULTILIB_MATCHES = -+ -+MULTILIB_OPTIONS += mfpu=vfp -+MULTILIB_DIRNAMES += vfp -+MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa* -+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp -+ -+# default float model is fpa, so don't create a explicit copy of it -+MULTILIB_EXCEPTIONS += *marm*/*mfpa* -+ -+# permutations of the options which are useful (+) or make no sense (-), -+# defaults are in brackets: -+# + (arm/soft/fpa) -+# + (arm/soft)/vfp -+# - (arm)/softfp(/fpa) -+# + (arm)/softfp/vfp -+# + (arm)/hard-float(/fpa) -+# - (arm)/hard-float/vfp -+# + thumb/(soft/fpa) -+# + thumb/(soft/)vfp -+# - thumb/softfp/fpa -+# - thumb/softfp/vfp -+# - thumb/hard-float/fpa -+# - thumb/hard-float/vfp -+ -+# subdirs to be used for multilibs and their respective options: -+#/thumb/vfp -> thumb/soft/vfp -+#/thumb/fpa -> thumb/soft/fpa -+#/thumb -> thumb/soft/fpa -+#/vfp -> arm/soft/vfp -+#/softfp/vfp -> arm/softfp/cfp -+#/fpu/fpa -> arm/hard/fpa -+#/fpu -> arm/hard/fpa -+#/fpa -> arm/soft/fpa -+#. -> arm/soft/fpa -diff -Naur gcc-4.4.5.orig/gcc/config/avr/avr.h gcc-4.4.5/gcc/config/avr/avr.h ---- gcc-4.4.5.orig/gcc/config/avr/avr.h 2009-03-28 22:09:50.000000000 +0100 -+++ gcc-4.4.5/gcc/config/avr/avr.h 2011-03-01 05:57:30.793523210 +0100 -@@ -811,12 +811,15 @@ - mmcu=at90can64*|\ - mmcu=at90usb64*:--pmem-wrap-around=64k}}}\ - %{!mmcu*: -m avr2}\ --%{mmcu=at90s1200|\ -+%{mmcu=avr1|\ -+ mmcu=at90s1200|\ - mmcu=attiny11|\ - mmcu=attiny12|\ - mmcu=attiny15|\ - mmcu=attiny28: -m avr1}\ --%{mmcu=attiny22|\ -+%{mmcu=avr2|\ -+ mmcu=avr25|\ -+ mmcu=attiny22|\ - mmcu=attiny26|\ - mmcu=at90s2*|\ - mmcu=at90s4*|\ -@@ -831,14 +834,18 @@ - mmcu=attiny261|\ - mmcu=attiny4*|\ - mmcu=attiny8*: -m avr2}\ --%{mmcu=atmega103|\ -+%{mmcu=avr3|\ -+ mmcu=avr31|\ -+ mmcu=avr35|\ -+ mmcu=atmega103|\ - mmcu=at43*|\ - mmcu=at76*|\ - mmcu=at90usb82|\ - mmcu=at90usb162|\ - mmcu=attiny16*|\ - mmcu=attiny32*: -m avr3}\ --%{mmcu=atmega8*|\ -+%{mmcu=avr4|\ -+ mmcu=atmega8*|\ - mmcu=atmega4*|\ - mmcu=at90pwm1|\ - mmcu=at90pwm2|\ -@@ -846,7 +853,9 @@ - mmcu=at90pwm3|\ - mmcu=at90pwm3b|\ - mmcu=at90pwm81: -m avr4}\ --%{mmcu=atmega16*|\ -+%{mmcu=avr5|\ -+ mmcu=avr51|\ -+ mmcu=atmega16*|\ - mmcu=atmega32*|\ - mmcu=atmega406|\ - mmcu=atmega64*|\ -@@ -860,7 +869,8 @@ - mmcu=at94k|\ - mmcu=m3000*|\ - mmcu=m3001*: -m avr5}\ --%{mmcu=atmega256*:-m avr6}\ -+%{mmcu=avr6|\ -+ mmcu=atmega256*:-m avr6}\ - %{mmcu=atmega324*|\ - mmcu=atmega325*|\ - mmcu=atmega328p|\ -diff -Naur gcc-4.4.5.orig/gcc/config/avr/t-rtems gcc-4.4.5/gcc/config/avr/t-rtems ---- gcc-4.4.5.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100 -+++ gcc-4.4.5/gcc/config/avr/t-rtems 2011-03-01 05:57:30.793523210 +0100 -@@ -1,3 +1,4 @@ - # Multilibs for avr RTEMS targets. - --# ATM, this is just a stub -+# RTEMS uses _exit from newlib -+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS)) -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/arithmetic.c gcc-4.4.5/gcc/config/lm32/arithmetic.c ---- gcc-4.4.5.orig/gcc/config/lm32/arithmetic.c 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/arithmetic.c 2011-03-01 05:57:30.847523953 +0100 -@@ -0,0 +1,305 @@ -+/* Fixed-point arithmetic for Lattice Mico32. -+ Contributed by Jon Beniston -+ -+ Copyright (C) 2008 Free Software Foundation, Inc. -+ -+ This file 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. -+ -+ In addition to the permissions in the GNU General Public License, the -+ Free Software Foundation gives you unlimited permission to link the -+ compiled version of this file into combinations with other programs, -+ and to distribute those combinations without any restriction coming -+ from the use of this file. (The General Public License restrictions -+ do apply in other respects; for example, they cover modification of -+ the file, and distribution when not linked into a combine -+ executable.) -+ -+ This file is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; see the file COPYING. If not, write to -+ the Free Software Foundation, 51 Franklin Street, Fifth Floor, -+ Boston, MA 02110-1301, USA. */ -+ -+typedef unsigned long UQItype __attribute__ ((mode (QI))); -+typedef long SItype __attribute__ ((mode (SI))); -+typedef unsigned long USItype __attribute__ ((mode (SI))); -+ -+/* Prototypes */ -+ -+USItype __mulsi3 (USItype a, USItype b); -+ -+USItype __udivmodsi4 (USItype num, USItype den, int modwanted); -+SItype __divsi3 (SItype a, SItype b); -+SItype __modsi3 (SItype a, SItype b); -+USItype __udivsi3 (USItype a, USItype b); -+USItype __umodsi3 (USItype a, USItype b); -+ -+SItype __ashlsi3 (SItype a, SItype b); -+SItype __ashrsi3 (SItype a, SItype b); -+USItype __lshrsi3 (USItype a, USItype b); -+ -+/* Multiplication */ -+ -+#ifdef L_mulsi3 -+USItype -+__mulsi3 (USItype a, USItype b) -+{ -+ USItype result; -+ -+ result = 0; -+ -+ if (a==0) -+ return 0; -+ -+ while (b!=0) -+ { -+ if (b & 1) -+ result += a; -+ a <<= 1; -+ b >>= 1; -+ } -+ -+ return result; -+} -+#endif -+ -+/* Division */ -+ -+#ifdef L_udivmodsi4 -+USItype -+__udivmodsi4 (USItype num, USItype den, int modwanted) -+{ -+ USItype bit = 1; -+ USItype res = 0; -+ -+ while (den < num && bit && !(den & (1L<<31))) -+ { -+ den <<=1; -+ bit <<=1; -+ } -+ while (bit) -+ { -+ if (num >= den) -+ { -+ num -= den; -+ res |= bit; -+ } -+ bit >>=1; -+ den >>=1; -+ } -+ if (modwanted) -+ return num; -+ return res; -+} -+#endif -+ -+#ifdef L_divsi3 -+ -+static const UQItype __divsi3_table[] = { -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 7, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 8, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, -+ 0, 9, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, -+ 0, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -+ 0, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -+ 0, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, -+ 0, 13, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, -+ 0, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, -+ 0, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, -+}; -+ -+SItype -+__divsi3 (SItype a, SItype b) -+{ -+ int neg = 0; -+ SItype res; -+ int cfg; -+ -+ if (b == 0) -+ { -+ /* Raise divide by zero exception */ -+ int eba; -+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); -+ eba += 32 * 5; -+ __asm__ __volatile__ ("mv ea, ra"); -+ __asm__ __volatile__ ("b %0" : : "r" (eba)); -+ } -+ -+ if (((USItype)(a | b)) < 16) -+ { -+ res = __divsi3_table[(a << 4) + b]; -+ } -+ else -+ { -+ -+ if (a < 0) -+ { -+ a = -a; -+ neg = !neg; -+ } -+ -+ if (b < 0) -+ { -+ b = -b; -+ neg = !neg; -+ } -+ -+ __asm__ ("rcsr %0, CFG" : "=r" (cfg)); -+ if (cfg & 2) -+ __asm__ ("divu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b)); -+ else -+ res = __udivmodsi4 (a, b, 0); -+ -+ if (neg) -+ res = -res; -+ } -+ -+ return res; -+} -+#endif -+ -+#ifdef L_modsi3 -+SItype -+__modsi3 (SItype a, SItype b) -+{ -+ int neg = 0; -+ SItype res; -+ int cfg; -+ -+ if (b == 0) -+ { -+ /* Raise divide by zero exception */ -+ int eba, sr; -+ /* Save interrupt enable */ -+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr)); -+ sr = (sr & 1) << 1; -+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr)); -+ /* Branch to exception handler */ -+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); -+ eba += 32 * 5; -+ __asm__ __volatile__ ("mv ea, ra"); -+ __asm__ __volatile__ ("b %0" : : "r" (eba)); -+ } -+ -+ if (a < 0) -+ { -+ a = -a; -+ neg = 1; -+ } -+ -+ if (b < 0) -+ b = -b; -+ -+ __asm__ ("rcsr %0, CFG" : "=r" (cfg)); -+ if (cfg & 2) -+ __asm__ ("modu %0, %1, %2" : "=r" (res) : "r" (a), "r" (b)); -+ else -+ res = __udivmodsi4 (a, b, 1); -+ -+ if (neg) -+ res = -res; -+ -+ return res; -+} -+#endif -+ -+#ifdef L_udivsi3 -+USItype -+__udivsi3 (USItype a, USItype b) -+{ -+ if (b == 0) -+ { -+ /* Raise divide by zero exception */ -+ int eba, sr; -+ /* Save interrupt enable */ -+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr)); -+ sr = (sr & 1) << 1; -+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr)); -+ /* Branch to exception handler */ -+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); -+ eba += 32 * 5; -+ __asm__ __volatile__ ("mv ea, ra"); -+ __asm__ __volatile__ ("b %0" : : "r" (eba)); -+ } -+ -+ return __udivmodsi4 (a, b, 0); -+} -+#endif -+ -+#ifdef L_umodsi3 -+USItype -+__umodsi3 (USItype a, USItype b) -+{ -+ if (b == 0) -+ { -+ /* Raise divide by zero exception */ -+ int eba, sr; -+ /* Save interrupt enable */ -+ __asm__ __volatile__ ("rcsr %0, IE" : "=r" (sr)); -+ sr = (sr & 1) << 1; -+ __asm__ __volatile__ ("wcsr IE, %0" : : "r" (sr)); -+ /* Branch to exception handler */ -+ __asm__ __volatile__ ("rcsr %0, EBA" : "=r" (eba)); -+ eba += 32 * 5; -+ __asm__ __volatile__ ("mv ea, ra"); -+ __asm__ __volatile__ ("b %0" : : "r" (eba)); -+ } -+ -+ return __udivmodsi4 (a, b, 1); -+} -+#endif -+ -+#if 0 -+ -+/* Shifts - Optimized versions implemented in assembly. Use these if code space is preferred to performance. */ -+ -+#ifdef L_ashlsi3 -+SItype -+__ashlsi3 (SItype a, SItype b) -+{ -+ int i; -+ -+ for (i = (b & 0x1f); i > 0; --i) -+ a += a; -+ return a; -+} -+#endif -+ -+#ifdef L_ashrsi3 -+SItype -+__ashrsi3 (SItype a, SItype b) -+{ -+ int i; -+ -+ for (i = (b & 0x1f); i > 0; --i) -+ __asm__ ("sri %0, %0, 1" : "=r" (a) : "0" (a)); -+ return a; -+} -+#endif -+ -+#ifdef L_lshrsi3 -+USItype -+__lshrsi3 (USItype a, USItype b) -+{ -+ int i; -+ -+ for (i = (b & 0x1f); i > 0; --i) -+ __asm__ ("srui %0, %0, 1" : "=r" (a) : "0" (a)); -+ return a; -+} -+#endif -+ -+#endif -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/crti.S gcc-4.4.5/gcc/config/lm32/crti.S ---- gcc-4.4.5.orig/gcc/config/lm32/crti.S 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/crti.S 2011-03-01 05:57:30.847523953 +0100 -@@ -0,0 +1,45 @@ -+# crti.S for Lattice Mico32 -+# Contributed by Jon Beniston -+# -+# Copyright (C) 2008 Free Software Foundation, Inc. -+# -+# This file 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. -+# -+# In addition to the permissions in the GNU General Public License, the -+# Free Software Foundation gives you unlimited permission to link the -+# compiled version of this file into combinations with other programs, -+# and to distribute those combinations without any restriction coming -+# from the use of this file. (The General Public License restrictions -+# do apply in other respects; for example, they cover modification of -+# the file, and distribution when not linked into a combine -+# executable.) -+# -+# This file is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; see the file COPYING. If not, write to -+# the Free Software Foundation, 51 Franklin Street, Fifth Floor, -+# Boston, MA 02110-1301, USA. -+# -+ -+ .section .init -+ .global _init -+ .type _init,@function -+ .align 4 -+_init: -+ addi sp, sp, -4 -+ sw (sp+4), ra -+ -+ .section .fini -+ .global _fini -+ .type _fini,@function -+ .align 4 -+_fini: -+ addi sp, sp, -4 -+ sw (sp+4), ra -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/crtn.S gcc-4.4.5/gcc/config/lm32/crtn.S ---- gcc-4.4.5.orig/gcc/config/lm32/crtn.S 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/crtn.S 2011-03-01 05:57:30.848523967 +0100 -@@ -0,0 +1,42 @@ -+# crtn.S for Lattice Mico32 -+# Contributed by Jon Beniston -+# -+# Copyright (C) 2008 Free Software Foundation, Inc. -+# -+# This file 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. -+# -+# In addition to the permissions in the GNU General Public License, the -+# Free Software Foundation gives you unlimited permission to link the -+# compiled version of this file into combinations with other programs, -+# and to distribute those combinations without any restriction coming -+# from the use of this file. (The General Public License restrictions -+# do apply in other respects; for example, they cover modification of -+# the file, and distribution when not linked into a combine -+# executable.) -+# -+# This file is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; see the file COPYING. If not, write to -+# the Free Software Foundation, 51 Franklin Street, Fifth Floor, -+# Boston, MA 02110-1301, USA. -+# -+ -+ .section .init -+ -+ lw ra, (sp+4) -+ addi sp, sp, 4 -+ ret -+ -+ .section .fini -+ -+ lw ra, (sp+4) -+ addi sp, sp, 4 -+ ret -+ -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/lib1funcs.S gcc-4.4.5/gcc/config/lm32/lib1funcs.S ---- gcc-4.4.5.orig/gcc/config/lm32/lib1funcs.S 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/lib1funcs.S 2011-03-01 05:57:30.848523967 +0100 -@@ -0,0 +1,429 @@ -+# lib1funcs.S for Lattice Mico32 -+# Contributed by Jon Beniston -+# -+# Copyright (C) 2008 Free Software Foundation, Inc. -+# -+# This file 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. -+# -+# In addition to the permissions in the GNU General Public License, the -+# Free Software Foundation gives you unlimited permission to link the -+# compiled version of this file into combinations with other programs, -+# and to distribute those combinations without any restriction coming -+# from the use of this file. (The General Public License restrictions -+# do apply in other respects; for example, they cover modification of -+# the file, and distribution when not linked into a combine -+# executable.) -+# -+# This file is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; see the file COPYING. If not, write to -+# the Free Software Foundation, 51 Franklin Street, Fifth Floor, -+# Boston, MA 02110-1301, USA. -+# -+ -+/* Arithmetic left shift */ -+ -+ .text -+ -+ .global __ashlsi3 -+ .type __ashlsi3,@function -+ .align 4 -+ -+__ashlsi3: -+ /* Only use 5 LSBs, as that's all the h/w shifter uses */ -+ andi r2, r2, 0x1f -+ /* Get address of offset into unrolled shift loop to jump to */ -+#ifdef __PIC__ -+ orhi r3, r0, gotoffhi16(__ashlsi3_table) -+ addi r3, r3, gotofflo16(__ashlsi3_table) -+ add r3, r3, gp -+#else -+ mvhi r3, hi(__ashlsi3_table) -+ ori r3, r3, lo(__ashlsi3_table) -+#endif -+ add r2, r2, r2 -+ add r2, r2, r2 -+ add r3, r3, r2 -+ lw r3, (r3+0) -+ b r3 -+ -+__ashlsi3_31: -+ add r1, r1, r1 -+__ashlsi3_30: -+ add r1, r1, r1 -+__ashlsi3_29: -+ add r1, r1, r1 -+__ashlsi3_28: -+ add r1, r1, r1 -+__ashlsi3_27: -+ add r1, r1, r1 -+__ashlsi3_26: -+ add r1, r1, r1 -+__ashlsi3_25: -+ add r1, r1, r1 -+__ashlsi3_24: -+ add r1, r1, r1 -+__ashlsi3_23: -+ add r1, r1, r1 -+__ashlsi3_22: -+ add r1, r1, r1 -+__ashlsi3_21: -+ add r1, r1, r1 -+__ashlsi3_20: -+ add r1, r1, r1 -+__ashlsi3_19: -+ add r1, r1, r1 -+__ashlsi3_18: -+ add r1, r1, r1 -+__ashlsi3_17: -+ add r1, r1, r1 -+__ashlsi3_16: -+ add r1, r1, r1 -+__ashlsi3_15: -+ add r1, r1, r1 -+__ashlsi3_14: -+ add r1, r1, r1 -+__ashlsi3_13: -+ add r1, r1, r1 -+__ashlsi3_12: -+ add r1, r1, r1 -+__ashlsi3_11: -+ add r1, r1, r1 -+__ashlsi3_10: -+ add r1, r1, r1 -+__ashlsi3_9: -+ add r1, r1, r1 -+__ashlsi3_8: -+ add r1, r1, r1 -+__ashlsi3_7: -+ add r1, r1, r1 -+__ashlsi3_6: -+ add r1, r1, r1 -+__ashlsi3_5: -+ add r1, r1, r1 -+__ashlsi3_4: -+ add r1, r1, r1 -+__ashlsi3_3: -+ add r1, r1, r1 -+__ashlsi3_2: -+ add r1, r1, r1 -+__ashlsi3_1: -+ add r1, r1, r1 -+__ashlsi3_0: -+ ret -+ -+#ifdef __PIC__ -+ .section .data -+#else -+ .section .rodata -+#endif -+ -+ .align 4 -+ -+__ashlsi3_table: -+ .word __ashlsi3_0 -+ .word __ashlsi3_1 -+ .word __ashlsi3_2 -+ .word __ashlsi3_3 -+ .word __ashlsi3_4 -+ .word __ashlsi3_5 -+ .word __ashlsi3_6 -+ .word __ashlsi3_7 -+ .word __ashlsi3_8 -+ .word __ashlsi3_9 -+ .word __ashlsi3_10 -+ .word __ashlsi3_11 -+ .word __ashlsi3_12 -+ .word __ashlsi3_13 -+ .word __ashlsi3_14 -+ .word __ashlsi3_15 -+ .word __ashlsi3_16 -+ .word __ashlsi3_17 -+ .word __ashlsi3_18 -+ .word __ashlsi3_19 -+ .word __ashlsi3_20 -+ .word __ashlsi3_21 -+ .word __ashlsi3_22 -+ .word __ashlsi3_23 -+ .word __ashlsi3_24 -+ .word __ashlsi3_25 -+ .word __ashlsi3_26 -+ .word __ashlsi3_27 -+ .word __ashlsi3_28 -+ .word __ashlsi3_29 -+ .word __ashlsi3_30 -+ .word __ashlsi3_31 -+ -+/* Logical right shift */ -+ -+ .text -+ -+ .global __lshrsi3 -+ .type __lshrsi3,@function -+ .align 4 -+ -+__lshrsi3: -+ /* Only use 5 LSBs, as that's all the h/w shifter uses */ -+ andi r2, r2, 0x1f -+ /* Get address of offset into unrolled shift loop to jump to */ -+#ifdef __PIC__ -+ orhi r3, r0, gotoffhi16(__lshrsi3_table) -+ addi r3, r3, gotofflo16(__lshrsi3_table) -+ add r3, r3, gp -+#else -+ mvhi r3, hi(__lshrsi3_table) -+ ori r3, r3, lo(__lshrsi3_table) -+#endif -+ add r2, r2, r2 -+ add r2, r2, r2 -+ add r3, r3, r2 -+ lw r3, (r3+0) -+ b r3 -+ -+__lshrsi3_31: -+ srui r1, r1, 1 -+__lshrsi3_30: -+ srui r1, r1, 1 -+__lshrsi3_29: -+ srui r1, r1, 1 -+__lshrsi3_28: -+ srui r1, r1, 1 -+__lshrsi3_27: -+ srui r1, r1, 1 -+__lshrsi3_26: -+ srui r1, r1, 1 -+__lshrsi3_25: -+ srui r1, r1, 1 -+__lshrsi3_24: -+ srui r1, r1, 1 -+__lshrsi3_23: -+ srui r1, r1, 1 -+__lshrsi3_22: -+ srui r1, r1, 1 -+__lshrsi3_21: -+ srui r1, r1, 1 -+__lshrsi3_20: -+ srui r1, r1, 1 -+__lshrsi3_19: -+ srui r1, r1, 1 -+__lshrsi3_18: -+ srui r1, r1, 1 -+__lshrsi3_17: -+ srui r1, r1, 1 -+__lshrsi3_16: -+ srui r1, r1, 1 -+__lshrsi3_15: -+ srui r1, r1, 1 -+__lshrsi3_14: -+ srui r1, r1, 1 -+__lshrsi3_13: -+ srui r1, r1, 1 -+__lshrsi3_12: -+ srui r1, r1, 1 -+__lshrsi3_11: -+ srui r1, r1, 1 -+__lshrsi3_10: -+ srui r1, r1, 1 -+__lshrsi3_9: -+ srui r1, r1, 1 -+__lshrsi3_8: -+ srui r1, r1, 1 -+__lshrsi3_7: -+ srui r1, r1, 1 -+__lshrsi3_6: -+ srui r1, r1, 1 -+__lshrsi3_5: -+ srui r1, r1, 1 -+__lshrsi3_4: -+ srui r1, r1, 1 -+__lshrsi3_3: -+ srui r1, r1, 1 -+__lshrsi3_2: -+ srui r1, r1, 1 -+__lshrsi3_1: -+ srui r1, r1, 1 -+__lshrsi3_0: -+ ret -+ -+#ifdef __PIC__ -+ .section .data -+#else -+ .section .rodata -+#endif -+ -+ .align 4 -+ -+__lshrsi3_table: -+ .word __lshrsi3_0 -+ .word __lshrsi3_1 -+ .word __lshrsi3_2 -+ .word __lshrsi3_3 -+ .word __lshrsi3_4 -+ .word __lshrsi3_5 -+ .word __lshrsi3_6 -+ .word __lshrsi3_7 -+ .word __lshrsi3_8 -+ .word __lshrsi3_9 -+ .word __lshrsi3_10 -+ .word __lshrsi3_11 -+ .word __lshrsi3_12 -+ .word __lshrsi3_13 -+ .word __lshrsi3_14 -+ .word __lshrsi3_15 -+ .word __lshrsi3_16 -+ .word __lshrsi3_17 -+ .word __lshrsi3_18 -+ .word __lshrsi3_19 -+ .word __lshrsi3_20 -+ .word __lshrsi3_21 -+ .word __lshrsi3_22 -+ .word __lshrsi3_23 -+ .word __lshrsi3_24 -+ .word __lshrsi3_25 -+ .word __lshrsi3_26 -+ .word __lshrsi3_27 -+ .word __lshrsi3_28 -+ .word __lshrsi3_29 -+ .word __lshrsi3_30 -+ .word __lshrsi3_31 -+ -+/* Arithmetic right shift */ -+ -+ .text -+ -+ .global __ashrsi3 -+ .type __ashrsi3,@function -+ .align 4 -+ -+__ashrsi3: -+ /* Only use 5 LSBs, as that's all the h/w shifter uses */ -+ andi r2, r2, 0x1f -+ /* Get address of offset into unrolled shift loop to jump to */ -+#ifdef __PIC__ -+ orhi r3, r0, gotoffhi16(__ashrsi3_table) -+ addi r3, r3, gotofflo16(__ashrsi3_table) -+ add r3, r3, gp -+#else -+ mvhi r3, hi(__ashrsi3_table) -+ ori r3, r3, lo(__ashrsi3_table) -+#endif -+ add r2, r2, r2 -+ add r2, r2, r2 -+ add r3, r3, r2 -+ lw r3, (r3+0) -+ b r3 -+ -+__ashrsi3_31: -+ sri r1, r1, 1 -+__ashrsi3_30: -+ sri r1, r1, 1 -+__ashrsi3_29: -+ sri r1, r1, 1 -+__ashrsi3_28: -+ sri r1, r1, 1 -+__ashrsi3_27: -+ sri r1, r1, 1 -+__ashrsi3_26: -+ sri r1, r1, 1 -+__ashrsi3_25: -+ sri r1, r1, 1 -+__ashrsi3_24: -+ sri r1, r1, 1 -+__ashrsi3_23: -+ sri r1, r1, 1 -+__ashrsi3_22: -+ sri r1, r1, 1 -+__ashrsi3_21: -+ sri r1, r1, 1 -+__ashrsi3_20: -+ sri r1, r1, 1 -+__ashrsi3_19: -+ sri r1, r1, 1 -+__ashrsi3_18: -+ sri r1, r1, 1 -+__ashrsi3_17: -+ sri r1, r1, 1 -+__ashrsi3_16: -+ sri r1, r1, 1 -+__ashrsi3_15: -+ sri r1, r1, 1 -+__ashrsi3_14: -+ sri r1, r1, 1 -+__ashrsi3_13: -+ sri r1, r1, 1 -+__ashrsi3_12: -+ sri r1, r1, 1 -+__ashrsi3_11: -+ sri r1, r1, 1 -+__ashrsi3_10: -+ sri r1, r1, 1 -+__ashrsi3_9: -+ sri r1, r1, 1 -+__ashrsi3_8: -+ sri r1, r1, 1 -+__ashrsi3_7: -+ sri r1, r1, 1 -+__ashrsi3_6: -+ sri r1, r1, 1 -+__ashrsi3_5: -+ sri r1, r1, 1 -+__ashrsi3_4: -+ sri r1, r1, 1 -+__ashrsi3_3: -+ sri r1, r1, 1 -+__ashrsi3_2: -+ sri r1, r1, 1 -+__ashrsi3_1: -+ sri r1, r1, 1 -+__ashrsi3_0: -+ ret -+ -+#ifdef __PIC__ -+ .section .data -+#else -+ .section .rodata -+#endif -+ -+ .align 4 -+ -+__ashrsi3_table: -+ .word __ashrsi3_0 -+ .word __ashrsi3_1 -+ .word __ashrsi3_2 -+ .word __ashrsi3_3 -+ .word __ashrsi3_4 -+ .word __ashrsi3_5 -+ .word __ashrsi3_6 -+ .word __ashrsi3_7 -+ .word __ashrsi3_8 -+ .word __ashrsi3_9 -+ .word __ashrsi3_10 -+ .word __ashrsi3_11 -+ .word __ashrsi3_12 -+ .word __ashrsi3_13 -+ .word __ashrsi3_14 -+ .word __ashrsi3_15 -+ .word __ashrsi3_16 -+ .word __ashrsi3_17 -+ .word __ashrsi3_18 -+ .word __ashrsi3_19 -+ .word __ashrsi3_20 -+ .word __ashrsi3_21 -+ .word __ashrsi3_22 -+ .word __ashrsi3_23 -+ .word __ashrsi3_24 -+ .word __ashrsi3_25 -+ .word __ashrsi3_26 -+ .word __ashrsi3_27 -+ .word __ashrsi3_28 -+ .word __ashrsi3_29 -+ .word __ashrsi3_30 -+ .word __ashrsi3_31 -+ -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/lm32.c gcc-4.4.5/gcc/config/lm32/lm32.c ---- gcc-4.4.5.orig/gcc/config/lm32/lm32.c 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/lm32.c 2011-03-01 05:57:30.849523981 +0100 -@@ -0,0 +1,869 @@ -+/* Subroutines used for code generation on the Lattice Mico32 architecture. -+ Contributed by Jon Beniston -+ -+ Copyright (C) 2008 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 3, 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 COPYING3. If not see -+ . */ -+ -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "tm.h" -+#include "rtl.h" -+#include "regs.h" -+#include "hard-reg-set.h" -+#include "basic-block.h" -+#include "real.h" -+#include "insn-config.h" -+#include "conditions.h" -+#include "insn-flags.h" -+#include "insn-attr.h" -+#include "insn-codes.h" -+#include "recog.h" -+#include "output.h" -+#include "tree.h" -+#include "expr.h" -+#include "flags.h" -+#include "reload.h" -+#include "tm_p.h" -+#include "function.h" -+#include "toplev.h" -+#include "optabs.h" -+#include "libfuncs.h" -+#include "ggc.h" -+#include "target.h" -+#include "target-def.h" -+#include "langhooks.h" -+#include "tm-constrs.h" -+#include "df.h" -+ -+struct lm32_frame_info -+{ -+ HOST_WIDE_INT total_size; /* number of bytes that the entire frame takes up. */ -+ HOST_WIDE_INT callee_size; /* number of bytes to save callee save registers */ -+ HOST_WIDE_INT pretend_size; /* number of bytes we push and pretend caller did. */ -+ HOST_WIDE_INT args_size; /* number of bytes that outgoing arguments take up. */ -+ HOST_WIDE_INT locals_size; /* number of bytes that local variables take up. */ -+ unsigned int reg_save_mask; /* mask of saved registers. */ -+}; -+ -+/* Prototypes for static functions */ -+static rtx emit_add (rtx dest, rtx src0, rtx src1); -+static void expand_save_restore (struct lm32_frame_info *info, int op); -+static void abort_with_insn (rtx insn, const char *reason); -+static void stack_adjust (HOST_WIDE_INT amount); -+static bool lm32_in_small_data_p (const_tree); -+static void lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, -+ tree type, int *pretend_size, int no_rtl); -+ -+/* Detemines if given constant can be used as a displacement */ -+#define OFFSET_INT(X) (((X) > -32768) && ((X) < 32768)) -+ -+#undef TARGET_ADDRESS_COST -+#define TARGET_ADDRESS_COST hook_int_rtx_bool_0 -+#undef TARGET_IN_SMALL_DATA_P -+#define TARGET_IN_SMALL_DATA_P lm32_in_small_data_p -+#undef TARGET_PROMOTE_FUNCTION_ARGS -+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true -+#undef TARGET_PROMOTE_FUNCTION_RETURN -+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true -+#undef TARGET_SETUP_INCOMING_VARARGS -+#define TARGET_SETUP_INCOMING_VARARGS lm32_setup_incoming_varargs -+#undef TARGET_PROMOTE_PROTOTYPES -+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true -+ -+struct gcc_target targetm = TARGET_INITIALIZER; -+ -+/* Current frame information calculated by lm32_compute_frame_size. */ -+static struct lm32_frame_info current_frame_info; -+ -+rtx lm32_compare_op0; -+rtx lm32_compare_op1; -+ -+/* Return non-zero if the specified return type should be returned in memory */ -+int -+lm32_return_in_memory (tree type) -+{ -+ HOST_WIDE_INT size; -+ -+ if (!AGGREGATE_TYPE_P (type)) -+ { -+ /* All simple types are returned in registers. */ -+ return 0; -+ } -+ -+ size = int_size_in_bytes (type); -+ if (size >=0 && size <= UNITS_PER_WORD) -+ { -+ /* If it can fit in one register */ -+ return 0; -+ } -+ -+ return 1; -+} -+ -+/* Determine if given constant can be used as a register displacement */ -+int -+const_ok_for_base_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -+{ -+ int val; -+ -+ val = INTVAL (op); -+ return OFFSET_INT (val); -+} -+ -+/* Generate an emit a word sized add instruction */ -+static rtx -+emit_add (rtx dest, rtx src0, rtx src1) -+{ -+ rtx insn; -+ insn = emit_insn (gen_addsi3 (dest, src0, src1)); -+ return insn; -+} -+ -+/* Generate the code to compare (and possibly branch) two integer values -+ TEST_CODE is the comparison code we are trying to emulate -+ (or implement directly) -+ RESULT is where to store the result of the comparison, -+ or null to emit a branch -+ CMP0 CMP1 are the two comparison operands -+ DESTINATION is the destination of the branch, or null to only compare -+ */ -+ -+void -+gen_int_relational (enum rtx_code code, /* relational test (EQ, etc) */ -+ rtx result, /* result to store comp. or 0 if branch */ -+ rtx cmp0, /* first operand to compare */ -+ rtx cmp1, /* second operand to compare */ -+ rtx destination) /* destination of the branch, or 0 if compare */ -+{ -+ enum machine_mode mode; -+ int branch_p; -+ -+ mode = GET_MODE (cmp0); -+ if (mode == VOIDmode) -+ mode = GET_MODE (cmp1); -+ -+ /* Is this a branch or compare */ -+ branch_p = (destination != 0); -+ -+ /* Instruction set doesn't support LE or LT, so swap operands and use GE, GT */ -+ switch (code) -+ { -+ case LE: -+ case LT: -+ case LEU: -+ case LTU: -+ code = swap_condition (code); -+ rtx temp = cmp0; -+ cmp0 = cmp1; -+ cmp1 = temp; -+ break; -+ default: -+ break; -+ } -+ -+ if (branch_p) -+ { -+ rtx insn; -+ -+ /* Operands must be in registers */ -+ if (!register_operand (cmp0, mode)) -+ cmp0 = force_reg (mode, cmp0); -+ if (!register_operand (cmp1, mode)) -+ cmp1 = force_reg (mode, cmp1); -+ -+ /* Generate conditional branch instruction */ -+ rtx cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1); -+ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination); -+ insn = gen_rtx_SET (VOIDmode, pc_rtx, -+ gen_rtx_IF_THEN_ELSE (VOIDmode, -+ cond, label, pc_rtx)); -+ emit_jump_insn (insn); -+ } -+ else -+ { -+ /* We can't have const_ints in cmp0, other than 0 */ -+ if ((GET_CODE (cmp0) == CONST_INT) && (INTVAL (cmp0) != 0)) -+ cmp0 = force_reg (mode, cmp0); -+ -+ /* If the comparison is against an int not in legal range -+ move it into a register */ -+ if (GET_CODE (cmp1) == CONST_INT) -+ { -+ HOST_WIDE_INT value = INTVAL (cmp1); -+ switch (code) -+ { -+ case EQ: case NE: case LE: case LT: case GE: case GT: -+ if (!MEDIUM_INT(value)) -+ cmp1 = force_reg (mode, cmp1); -+ break; -+ case LEU: case LTU: case GEU: case GTU: -+ if (!MEDIUM_UINT(value)) -+ cmp1 = force_reg (mode, cmp1); -+ break; -+ default: -+ abort (); -+ } -+ } -+ -+ /* Generate compare instruction */ -+ emit_move_insn (result, gen_rtx_fmt_ee (code, mode, cmp0, cmp1)); -+ } -+} -+ -+/* Generate and emit RTL to save or restore callee save registers */ -+static void -+expand_save_restore (struct lm32_frame_info *info, int op) -+{ -+ unsigned int reg_save_mask = info->reg_save_mask; -+ int regno; -+ HOST_WIDE_INT offset; -+ rtx insn; -+ -+ /* Callee saves are below locals and above outgoing arguments */ -+ offset = info->args_size + info->callee_size; -+ for (regno = 0; regno <= 31; regno++) -+ { -+ if ((reg_save_mask & (1 << regno)) != 0) -+ { -+ if (op == 0) -+ { -+ insn = emit_move_insn (gen_rtx_MEM (word_mode, -+ gen_rtx_PLUS (Pmode, -+ stack_pointer_rtx, -+ GEN_INT (offset))), -+ gen_rtx_REG (word_mode, regno)); -+ } -+ else -+ { -+ insn = emit_move_insn (gen_rtx_REG (word_mode, regno), -+ gen_rtx_MEM (word_mode, -+ gen_rtx_PLUS (Pmode, -+ stack_pointer_rtx, -+ GEN_INT (offset)))); -+ } -+ -+ /* only prologue instructions which set the sp fp or save a -+ register should be marked as frame related */ -+ if (op==0) -+ RTX_FRAME_RELATED_P (insn) = 1; -+ offset -= UNITS_PER_WORD; -+ } -+ } -+} -+ -+static void -+stack_adjust (HOST_WIDE_INT amount) -+{ -+ rtx insn; -+ -+ if (!MEDIUM_INT (amount)) -+ { -+ /* r10 is caller saved so it can be used as a temp reg */ -+ rtx r10; -+ r10 = gen_rtx_REG (word_mode, 10); -+ insn = emit_move_insn (r10, GEN_INT (amount)); -+ if (amount < 0) -+ RTX_FRAME_RELATED_P (insn) = 1; -+ insn = emit_add (stack_pointer_rtx, stack_pointer_rtx, r10); -+ if (amount < 0) -+ RTX_FRAME_RELATED_P (insn) = 1; -+ } -+ else -+ { -+ insn = emit_add (stack_pointer_rtx, -+ stack_pointer_rtx, -+ GEN_INT (amount)); -+ if (amount < 0) -+ RTX_FRAME_RELATED_P (insn) = 1; -+ } -+} -+ -+ -+/* Create and emit instructions for a functions prologue */ -+void -+lm32_expand_prologue (void) -+{ -+ rtx insn; -+ -+ lm32_compute_frame_size (get_frame_size ()); -+ -+ if (current_frame_info.total_size > 0) -+ { -+ /* Add space on stack new frame */ -+ stack_adjust (-current_frame_info.total_size); -+ -+ /* Save callee save registers */ -+ if (current_frame_info.reg_save_mask != 0) -+ expand_save_restore (¤t_frame_info, 0); -+ -+ /* Setup frame pointer if it's needed */ -+ if (frame_pointer_needed == 1) -+ { -+ /* Load offset - Don't use total_size, as that includes pretend_size, which isn't part of this frame? */ -+ insn = emit_move_insn (frame_pointer_rtx, GEN_INT ( current_frame_info.args_size -+ + current_frame_info.callee_size -+ + current_frame_info.locals_size)); -+ RTX_FRAME_RELATED_P (insn) = 1; -+ -+ /* Add in sp */ -+ insn = emit_add (frame_pointer_rtx, -+ frame_pointer_rtx, -+ stack_pointer_rtx); -+ RTX_FRAME_RELATED_P (insn) = 1; -+ } -+ -+ /* Prevent prologue from being scheduled into function body */ -+ emit_insn (gen_blockage ()); -+ } -+} -+ -+/* Create an emit instructions for a functions epilogue */ -+void -+lm32_expand_epilogue (void) -+{ -+ rtx ra_rtx = gen_rtx_REG (Pmode, RA_REGNUM); -+ -+ lm32_compute_frame_size (get_frame_size ()); -+ -+ if (current_frame_info.total_size > 0) -+ { -+ /* Prevent stack code from being reordered */ -+ emit_insn (gen_blockage ()); -+ -+ /* Restore callee save registers */ -+ if (current_frame_info.reg_save_mask != 0) -+ expand_save_restore (¤t_frame_info, 1); -+ -+ /* Deallocate stack */ -+ stack_adjust (current_frame_info.total_size); -+ -+ /* Return to calling function */ -+ emit_jump_insn (gen_return_internalsi (ra_rtx)); -+ } -+ else -+ { -+ /* Return to calling function */ -+ emit_jump_insn (gen_return_internalsi (ra_rtx)); -+ } -+} -+ -+/* Return the bytes needed to compute the frame pointer from the current -+ stack pointer. */ -+HOST_WIDE_INT -+lm32_compute_frame_size (int size) -+{ -+ int regno; -+ HOST_WIDE_INT total_size, locals_size, args_size, pretend_size, callee_size; -+ unsigned int reg_save_mask; -+ -+ locals_size = size; -+ args_size = crtl->outgoing_args_size; -+ pretend_size = crtl->args.pretend_args_size; -+ callee_size = 0; -+ reg_save_mask = 0; -+ -+ /* Build mask that actually determines which regsiters we save -+ and calculate size required to store them in the stack. */ -+ for (regno = 1; regno < SP_REGNUM; regno++) -+ { -+ if (df_regs_ever_live_p(regno) && !call_used_regs[regno]) -+ { -+ reg_save_mask |= 1 << regno; -+ callee_size += UNITS_PER_WORD; -+ } -+ } -+ if (df_regs_ever_live_p(RA_REGNUM) || !current_function_is_leaf || !optimize) -+ { -+ reg_save_mask |= 1 << RA_REGNUM; -+ callee_size += UNITS_PER_WORD; -+ } -+ if (!(reg_save_mask & (1 << FP_REGNUM)) && frame_pointer_needed) -+ { -+ reg_save_mask |= 1 << FP_REGNUM; -+ callee_size += UNITS_PER_WORD; -+ } -+ -+ /* Compute total frame size */ -+ total_size = pretend_size + args_size + locals_size + callee_size; -+ -+ /* Align frame to appropriate boundary */ -+ total_size = (total_size+3) & ~3; -+ -+ /* Save computed information. */ -+ current_frame_info.total_size = total_size; -+ current_frame_info.callee_size = callee_size; -+ current_frame_info.pretend_size = pretend_size; -+ current_frame_info.locals_size = locals_size; -+ current_frame_info.args_size = args_size; -+ current_frame_info.reg_save_mask = reg_save_mask; -+ -+ return total_size; -+} -+ -+void -+lm32_print_operand (FILE *file, rtx op, int letter) -+{ -+ register enum rtx_code code; -+ -+ if (! op) -+ { -+ error ("PRINT_OPERAND null pointer"); -+ abort (); -+ } -+ -+ code = GET_CODE (op); -+ -+ if (code == SIGN_EXTEND) -+ op = XEXP (op, 0), code = GET_CODE (op); -+ else if (code == REG || code == SUBREG) -+ { -+ int regnum; -+ -+ if (code == REG) -+ regnum = REGNO (op); -+ else -+ regnum = true_regnum (op); -+ -+ if ( (letter == 'H' && !WORDS_BIG_ENDIAN) -+ || (letter == 'L' && WORDS_BIG_ENDIAN)) -+ { -+ abort(); -+ regnum++; -+ } -+ -+ fprintf (file, "%s", reg_names[regnum]); -+ } -+ else if (code == MEM) -+ output_address (XEXP (op, 0)); -+ else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0) -+ fprintf (file, "%s", reg_names[0]); -+ else if (GET_CODE (op) == CONST_DOUBLE) -+ { -+ if ((CONST_DOUBLE_LOW (op) != 0) || (CONST_DOUBLE_HIGH (op) != 0)) -+ output_operand_lossage ("Only 0.0 can be loaded as an immediate"); -+ else -+ fprintf (file, "0"); -+ } -+ else if (code == EQ) -+ fprintf (file, "e "); -+ else if (code == NE) -+ fprintf (file, "ne "); -+ else if (code == GT) -+ fprintf (file, "g "); -+ else if (code == GTU) -+ fprintf (file, "gu "); -+ else if (code == LT) -+ fprintf (file, "l "); -+ else if (code == LTU) -+ fprintf (file, "lu "); -+ else if (code == GE) -+ fprintf (file, "ge "); -+ else if (code == GEU) -+ fprintf (file, "geu"); -+ else if (code == LE) -+ fprintf (file, "le "); -+ else if (code == LEU) -+ fprintf (file, "leu"); -+ else -+ output_addr_const (file, op); -+} -+ -+/* A C compound statement to output to stdio stream STREAM the -+ assembler syntax for an instruction operand that is a memory -+ reference whose address is ADDR. ADDR is an RTL expression. -+ -+ On some machines, the syntax for a symbolic address depends on -+ the section that the address refers to. On these machines, -+ define the macro `ENCODE_SECTION_INFO' to store the information -+ into the `symbol_ref', and then check for it here. */ -+ -+void -+lm32_print_operand_address (FILE *file, rtx addr) -+{ -+ switch (GET_CODE (addr)) -+ { -+ case REG: -+ fprintf (file, "(%s+0)", reg_names [REGNO (addr)]); -+ break; -+ -+ case MEM: -+ output_address (XEXP (addr, 0)); -+ break; -+ -+ case PLUS: -+ { -+ rtx arg0 = XEXP (addr, 0); -+ rtx arg1 = XEXP (addr, 1); -+ -+ if (GET_CODE (arg0) == REG && CONSTANT_P (arg1)) -+ { -+ if (GET_CODE(arg1) == CONST_INT) -+ fprintf (file, "(%s+%ld)", reg_names [REGNO (arg0)], INTVAL (arg1)); -+ else -+ { -+ fprintf (file, "(%s+", reg_names [REGNO (arg0)]); -+ output_addr_const (file, arg1); -+ fprintf (file, ")"); -+ } -+ } -+ else if (CONSTANT_P (arg0) && CONSTANT_P (arg1)) -+ output_addr_const (file, addr); -+ else -+ abort_with_insn (addr, "bad operand"); -+ } -+ break; -+ -+ case SYMBOL_REF: -+ if (SYMBOL_REF_SMALL_P (addr)) -+ { -+ fprintf (file, "gp("); -+ output_addr_const (file, addr); -+ fprintf (file, ")"); -+ } -+ else -+ abort_with_insn (addr, "can't use non gp relative absolute address"); -+ break; -+ -+ default: -+ abort_with_insn (addr, "invalid addressing mode"); -+ break; -+ } -+} -+ -+/* Determine where to put an argument to a function. -+ Value is zero to push the argument on the stack, -+ or a hard register in which to store the argument. -+ -+ MODE is the argument's machine mode. -+ TYPE is the data type of the argument (as a tree). -+ This is null for libcalls where that information may -+ not be available. -+ CUM is a variable of type CUMULATIVE_ARGS which gives info about -+ the preceding args and about the function being called. -+ NAMED is nonzero if this argument is a named parameter -+ (otherwise it is an extra parameter matching an ellipsis). */ -+ -+rtx -+lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode, -+ tree type, int named) -+{ -+ if (mode == VOIDmode) -+ /* Compute operand 2 of the call insn. */ -+ return GEN_INT (0); -+ -+ if (targetm.calls.must_pass_in_stack (mode, type)) -+ return NULL_RTX; -+ -+ if (!named || (cum + LM32_NUM_REGS2(mode, type) > LM32_NUM_ARG_REGS)) -+ return NULL_RTX; -+ -+ return gen_rtx_REG (mode, cum + LM32_FIRST_ARG_REG); -+} -+ -+HOST_WIDE_INT -+lm32_compute_initial_elimination_offset (int from, int to) -+{ -+ HOST_WIDE_INT offset = 0; -+ -+ switch (from) -+ { -+ /*case FRAME_POINTER_REGNUM: - Same as ARG_POINTER_REGNUM */ -+ case ARG_POINTER_REGNUM: -+ switch (to) -+ { -+ case FRAME_POINTER_REGNUM: -+ offset = 0; -+ break; -+ case STACK_POINTER_REGNUM: -+ offset = lm32_compute_frame_size (get_frame_size ()) - current_frame_info.pretend_size; -+ break; -+ default: -+ abort (); -+ } -+ break; -+ default: -+ abort (); -+ } -+ -+ return offset; -+} -+ -+static void -+lm32_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, -+ tree type, int *pretend_size, int no_rtl) -+{ -+ int first_anon_arg; -+ tree fntype; -+ int stdarg_p; -+ -+ fntype = TREE_TYPE (current_function_decl); -+ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0 -+ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) -+ != void_type_node)); -+ -+ if (stdarg_p) -+ first_anon_arg = *cum + LM32_FIRST_ARG_REG; -+ else -+ { -+ /* this is the common case, we have been passed details setup -+ for the last named argument, we want to skip over the -+ registers, if any used in passing this named paramter in -+ order to determine which is the first registers used to pass -+ anonymous arguments */ -+ int size; -+ -+ if (mode==BLKmode) -+ size = int_size_in_bytes (type); -+ else -+ size = GET_MODE_SIZE (mode); -+ -+ first_anon_arg = *cum + LM32_FIRST_ARG_REG + ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD); -+ } -+ -+ if ((first_anon_arg < (LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS)) && !no_rtl) -+ { -+ int first_reg_offset = first_anon_arg; -+ int size = LM32_FIRST_ARG_REG + LM32_NUM_ARG_REGS - first_anon_arg; -+ rtx regblock; -+ -+ regblock = gen_rtx_MEM (BLKmode, -+ plus_constant (arg_pointer_rtx, -+ FIRST_PARM_OFFSET (0))); -+ move_block_from_reg (first_reg_offset, regblock, size); -+ -+ *pretend_size = size * UNITS_PER_WORD; -+ } -+} -+ -+/* Abort after printing out a specific insn. */ -+static void -+abort_with_insn (rtx insn, const char *reason) -+{ -+ error (reason); -+ debug_rtx (insn); -+ abort (); -+} -+ -+/* Override command line options */ -+void -+lm32_override_options (void) -+{ -+ /* We must have sign-extend enabled if barrel-shift isn't */ -+ if (!MASK_BARREL_SHIFT_ENABLED) -+ { -+ warning (0, "neither -mbarrel-shift-enabled nor -msign-extend-enabled specified. Assuming -msign-extend-enabled"); -+ target_flags |= MASK_SIGN_EXTEND_ENABLED; -+ } -+} -+ -+/* Return nonzero if this function is known to have a null epilogue. -+ This allows the optimizer to omit jumps to jumps if no stack -+ was created. */ -+int -+lm32_can_use_return (void) -+{ -+ if (!reload_completed) -+ return 0; -+ -+ if (df_regs_ever_live_p(RA_REGNUM) || crtl->profile) -+ return 0; -+ -+ if (lm32_compute_frame_size (get_frame_size ()) != 0) -+ return 0; -+ -+ return 1; -+} -+ -+/* Support function to determine the return address of the function -+ 'count' frames back up the stack. */ -+rtx -+lm32_return_addr_rtx (int count, rtx frame) -+{ -+ rtx r; -+ if (count == 0) -+ { -+ /* *mjs* This test originally used leaf_function_p (), we now use -+ the regs_ever_live test which I *think* is more accurate. */ -+ if (!df_regs_ever_live_p(RA_REGNUM)) -+ { -+ r = gen_rtx_REG (Pmode, RA_REGNUM); -+ } -+ else -+ { -+ r = gen_rtx_MEM (Pmode, -+ gen_rtx_PLUS (Pmode, frame, -+ GEN_INT(- 2 * UNITS_PER_WORD))); -+ set_mem_alias_set (r, get_frame_alias_set ()); -+ } -+ } -+ else if (flag_omit_frame_pointer) -+ r = NULL_RTX; -+ else -+ { -+ r = gen_rtx_MEM (Pmode, -+ gen_rtx_PLUS (Pmode, frame, -+ GEN_INT(- 2 * UNITS_PER_WORD))); -+ set_mem_alias_set (r, get_frame_alias_set ()); -+ } -+ return r; -+} -+ -+/* Return true if EXP should be placed in the small data section. */ -+ -+static bool -+lm32_in_small_data_p (const_tree exp) -+{ -+ /* We want to merge strings, so we never consider them small data. */ -+ if (TREE_CODE (exp) == STRING_CST) -+ return false; -+ -+ /* Functions are never in the small data area. Duh. */ -+ if (TREE_CODE (exp) == FUNCTION_DECL) -+ return false; -+ -+ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) -+ { -+ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); -+ if (strcmp (section, ".sdata") == 0 -+ || strcmp (section, ".sbss") == 0) -+ return true; -+ } -+ else -+ { -+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); -+ -+ /* If this is an incomplete type with size 0, then we can't put it -+ in sdata because it might be too big when completed. */ -+ if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value) -+ return true; -+ } -+ -+ return false; -+} -+ -+/* Emit straight-line code to move LENGTH bytes from SRC to DEST. -+ Assume that the areas do not overlap. */ -+ -+static void -+lm32_block_move_inline (rtx dest, rtx src, HOST_WIDE_INT length, HOST_WIDE_INT alignment) -+{ -+ HOST_WIDE_INT offset, delta; -+ unsigned HOST_WIDE_INT bits; -+ int i; -+ enum machine_mode mode; -+ rtx *regs; -+ -+ /* Work out how many bits to move at a time. */ -+ switch (alignment) -+ { -+ case 1: -+ bits = 8; -+ break; -+ case 2: -+ bits = 16; -+ break; -+ case 4: -+ bits = 32; -+ break; -+ default: -+ abort (); -+ } -+ -+ mode = mode_for_size (bits, MODE_INT, 0); -+ delta = bits / BITS_PER_UNIT; -+ -+ /* Allocate a buffer for the temporary registers. */ -+ regs = alloca (sizeof (rtx) * length / delta); -+ -+ /* Load as many BITS-sized chunks as possible. */ -+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++) -+ { -+ regs[i] = gen_reg_rtx (mode); -+ emit_move_insn (regs[i], adjust_address (src, mode, offset)); -+ } -+ -+ /* Copy the chunks to the destination. */ -+ for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++) -+ emit_move_insn (adjust_address (dest, mode, offset), regs[i]); -+ -+ /* Mop up any left-over bytes. */ -+ if (offset < length) -+ { -+ src = adjust_address (src, BLKmode, offset); -+ dest = adjust_address (dest, BLKmode, offset); -+ move_by_pieces (dest, src, length - offset, -+ MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), 0); -+ } -+} -+ -+/* Expand string/block move operations. -+ -+ operands[0] is the pointer to the destination. -+ operands[1] is the pointer to the source. -+ operands[2] is the number of bytes to move. -+ operands[3] is the alignment. */ -+ -+int -+lm32_expand_block_move (rtx *operands) -+{ -+ if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) <= 32)) -+ { -+ lm32_block_move_inline (operands[0], operands[1], INTVAL (operands[2]), INTVAL (operands[3])); -+ return 1; -+ } -+ return 0; -+} -+ -+/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol -+ isn't protected by a PIC unspec. */ -+int -+nonpic_symbol_mentioned_p (rtx x) -+{ -+ register const char *fmt; -+ register int i; -+ -+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF -+ || GET_CODE (x) == PC) -+ return 1; -+ -+ /* We don't want to look into the possible MEM location of a -+ CONST_DOUBLE, since we're not going to use it, in general. */ -+ if (GET_CODE (x) == CONST_DOUBLE) -+ return 0; -+ -+ if (GET_CODE (x) == UNSPEC) -+ return 0; -+ -+ fmt = GET_RTX_FORMAT (GET_CODE (x)); -+ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) -+ { -+ if (fmt[i] == 'E') -+ { -+ register int j; -+ -+ for (j = XVECLEN (x, i) - 1; j >= 0; j--) -+ if (nonpic_symbol_mentioned_p (XVECEXP (x, i, j))) -+ return 1; -+ } -+ else if (fmt[i] == 'e' && nonpic_symbol_mentioned_p (XEXP (x, i))) -+ return 1; -+ } -+ -+ return 0; -+} -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/lm32.h gcc-4.4.5/gcc/config/lm32/lm32.h ---- gcc-4.4.5.orig/gcc/config/lm32/lm32.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/lm32.h 2011-03-01 05:57:30.850523995 +0100 -@@ -0,0 +1,657 @@ -+/* Definitions of target machine for GNU compiler, Lattice Mico32 architecture. -+ Contributed by Jon Beniston -+ -+ Copyright (C) 2008 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 3, 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 COPYING3. If not see -+ . */ -+ -+/*-------------------------------*/ -+/* Run-time Target Specification */ -+/*-------------------------------*/ -+ -+/* Print subsidiary information on the compiler version in use. */ -+#ifndef TARGET_VERSION -+#define TARGET_VERSION fprintf (stderr, " (LatticeMico32)") -+#endif -+ -+/* Target CPU builtins. */ -+#define TARGET_CPU_CPP_BUILTINS() \ -+ do \ -+ { \ -+ builtin_define ("__lm32__"); \ -+ builtin_define_std ("lm32"); \ -+ builtin_assert ("cpu=lm32"); \ -+ builtin_assert ("machine=lm32"); \ -+ } \ -+ while (0) -+ -+#define CPP_SPEC "\ -+%{mmultiply-enabled:-D__multiply_enabled__} \ -+%{mdivide-enabled:-D__divide_enabled__} \ -+%{mbarrel-shift-enabled:-D__barrel_shift_enabled__} \ -+%{msign-extend-enabled:-D__sign_extend_enabled__} \ -+%{muser-enabled:-D__user_enabled__} \ -+" -+ -+#undef ASM_SPEC -+#define ASM_SPEC "\ -+%{mmultiply-enabled} \ -+%{mdivide-enabled} \ -+%{mbarrel-shift-enabled} \ -+%{msign-extend-enabled} \ -+%{muser-extend-enabled} \ -+%{v} \ -+" -+ -+/* Let link script define all link options. -+ Default to using simulator link script. */ -+ -+#undef STARTFILE_SPEC -+#define STARTFILE_SPEC "" -+#undef ENDFILE_SPEC -+#define ENDFILE_SPEC "" -+#undef LIB_SPEC -+#define LIB_SPEC "%{!T*:-T sim.ld}" -+ -+#define OVERRIDE_OPTIONS lm32_override_options() -+ -+extern int target_flags; -+ -+/* Add -G xx support. */ -+ -+#undef SWITCH_TAKES_ARG -+#define SWITCH_TAKES_ARG(CHAR) \ -+(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') -+ -+#undef CC1_SPEC -+#define CC1_SPEC "%{G*}" -+ -+extern struct rtx_def *lm32_compare_op0; -+extern struct rtx_def *lm32_compare_op1; -+ -+/*---------------------------------*/ -+/* Target machine storage layout. */ -+/*---------------------------------*/ -+ -+#define BITS_BIG_ENDIAN 0 -+#define BYTES_BIG_ENDIAN 1 -+#define WORDS_BIG_ENDIAN 1 -+#define LIBGCC2_WORDS_BIG_ENDIAN 1 -+ -+#define BITS_PER_UNIT 8 -+#define BITS_PER_WORD 32 -+#define UNITS_PER_WORD 4 -+ -+#define POINTER_SIZE 32 -+ -+#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ -+do { \ -+ if (GET_MODE_CLASS (MODE) == MODE_INT \ -+ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ -+ (MODE) = word_mode; \ -+} while (0) -+ -+#define PARM_BOUNDARY 32 -+ -+#define STACK_BOUNDARY 32 -+ -+#define BIGGEST_ALIGNMENT 64 -+ -+#define FUNCTION_BOUNDARY 32 -+ -+#define EMPTY_FIELD_BOUNDARY 32 -+ -+#define STRICT_ALIGNMENT 1 -+ -+#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT -+ -+/* Make strings word-aligned so strcpy from constants will be faster. */ -+#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ -+ (TREE_CODE (EXP) == STRING_CST \ -+ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) -+ -+/* Make arrays and structures word-aligned to allow faster copying etc. */ -+#define DATA_ALIGNMENT(TYPE, ALIGN) \ -+ ((((ALIGN) < BITS_PER_WORD) \ -+ && (TREE_CODE (TYPE) == ARRAY_TYPE \ -+ || TREE_CODE (TYPE) == UNION_TYPE \ -+ || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN)) -+ -+/* We need this for the same reason as DATA_ALIGNMENT, namely to cause -+ character arrays to be word-aligned so that `strcpy' calls that copy -+ constants to character arrays can be done inline, and 'strcmp' can be -+ optimised to use word loads. */ -+#define LOCAL_ALIGNMENT(TYPE, ALIGN) \ -+ DATA_ALIGNMENT (TYPE, ALIGN) -+ -+/*----------------------------------------*/ -+/* Layout of source language data types. */ -+/*----------------------------------------*/ -+ -+#define INT_TYPE_SIZE 32 -+#define SHORT_TYPE_SIZE 16 -+#define LONG_TYPE_SIZE 32 -+#define LONG_LONG_TYPE_SIZE 64 -+ -+#define FLOAT_TYPE_SIZE 32 -+#define DOUBLE_TYPE_SIZE 64 -+#define LONG_DOUBLE_TYPE_SIZE 64 -+ -+#define DEFAULT_SIGNED_CHAR 0 -+ -+#define SIZE_TYPE "unsigned int" -+ -+#define PTRDIFF_TYPE "int" -+ -+/*---------------------------*/ -+/* Standard register usage. */ -+/*---------------------------*/ -+ -+#define FIRST_PSEUDO_REGISTER 32 -+ -+#define RV_REGNUM 1 -+#define GP_REGNUM 26 -+#define FP_REGNUM 27 -+#define SP_REGNUM 28 -+#define RA_REGNUM 29 -+ -+#define G_REG_P(X) ((X)<32) -+#define PSEUDO_REG_P(X) ((X)>=FIRST_PSEUDO_REGISTER) -+ -+#define FIXED_REGISTERS \ -+{ 1, 0, 0, 0, 0, 0, 0, 0, \ -+ 0, 0, 0, 0, 0, 0, 0, 0, \ -+ 0, 0, 0, 0, 0, 0, 0, 0, \ -+ 0, 0, 1, 0, 1, 0, 1, 1} -+ -+#define CALL_USED_REGISTERS \ -+{ 1, 1, 1, 1, 1, 1, 1, 1, \ -+ 1, 1, 1, 0, 0, 0, 0, 0, \ -+ 0, 0, 0, 0, 0, 0, 0, 0, \ -+ 0, 0, 1, 0, 1, 0, 1, 1} -+ -+#define HARD_REGNO_NREGS(REGNO, MODE) \ -+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) -+ -+#define HARD_REGNO_MODE_OK(REGNO, MODE) G_REG_P(REGNO) -+ -+#define MODES_TIEABLE_P(MODE1, MODE2) \ -+( GET_MODE_CLASS (MODE1) == MODE_INT \ -+ && GET_MODE_CLASS (MODE2) == MODE_INT \ -+ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \ -+ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD) -+ -+#define AVOID_CCMODE_COPIES -+ -+/*----------------------------------*/ -+/* Register classes and constants. */ -+/*----------------------------------*/ -+ -+enum reg_class { -+ NO_REGS, -+ GENERAL_REGS, -+ ALL_REGS, -+ LIM_REG_CLASSES -+}; -+ -+#define N_REG_CLASSES (int) LIM_REG_CLASSES -+ -+#define REG_CLASS_NAMES { "NO_REGS", "GENERAL_REGS", "ALL_REGS" } -+ -+#define REG_CLASS_CONTENTS \ -+{ {0x00000000}, \ -+ {0xffffffff}, \ -+ {0xffffffff} \ -+} -+ -+#define REGNO_REG_CLASS(REGNO) \ -+ (G_REG_P(REGNO) ? GENERAL_REGS : NO_REGS) -+ -+#define CLASS_MAX_NREGS(CLASS, MODE) \ -+ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) -+ -+#define INDEX_REG_CLASS NO_REGS -+ -+#define BASE_REG_CLASS GENERAL_REGS -+ -+#define REG_CLASS_FROM_LETTER(C) NO_REGS -+ -+#ifdef REG_OK_STRICT -+#define REGNO_OK_FOR_BASE_P(REGNO) \ -+(G_REG_P (REGNO) || G_REG_P (reg_renumber[REGNO])) -+#else -+#define REGNO_OK_FOR_BASE_P(REGNO) \ -+(G_REG_P (REGNO) || PSEUDO_REG_P (REGNO)) -+#endif -+ -+#define REGNO_OK_FOR_INDEX_P(REGNO) 0 -+ -+#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) -+ -+/* The letters I, J, K, L, M, N, O, P in a register constraint string -+ can be used to stand for particular ranges of immediate operands. -+ This macro defines what the ranges are. -+ C is the letter, and VALUE is a constant value. -+ Return 1 if VALUE is in the range specified by C. -+ -+ Lattice usage: -+ -+ J - 0 -+ K - 16-bit signed -+ L - 16-bit unsigned -+ M - 32-bit signed -+ */ -+#define MEDIUM_INT(X) ((((HOST_WIDE_INT)(X)) >= -32768) && (((HOST_WIDE_INT)(X)) < 32768)) -+#define MEDIUM_UINT(X) (((unsigned HOST_WIDE_INT)(X)) < 65536) -+#define LARGE_INT(X) \ -+((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \ -+ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff) -+ -+#define CONST_OK_FOR_LETTER_P(VALUE, C) \ -+( (C) == 'J' ? (VALUE) == 0 \ -+ : (C) == 'K' ? MEDIUM_INT (VALUE) \ -+ : (C) == 'L' ? MEDIUM_UINT (VALUE) \ -+ : (C) == 'M' ? LARGE_INT (VALUE) \ -+ : 0 \ -+) -+ -+#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 -+ -+/*----------------------------------------*/ -+/* Stack Layout and Calling Conventions. */ -+/*----------------------------------------*/ -+ -+#define STACK_GROWS_DOWNWARD 1 -+ -+#define FRAME_GROWS_DOWNWARD 1 -+ -+#define STACK_POINTER_OFFSET (UNITS_PER_WORD) -+ -+#define STARTING_FRAME_OFFSET (UNITS_PER_WORD) -+ -+#define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD) -+ -+#define STACK_POINTER_REGNUM SP_REGNUM -+ -+#define FRAME_POINTER_REGNUM FP_REGNUM -+ -+#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM -+ -+#define FRAME_POINTER_REQUIRED (cfun->calls_alloca) -+ -+#define RETURN_ADDR_RTX(count, frame) \ -+ lm32_return_addr_rtx (count, frame) -+ -+/* FIXME! */ -+#define STATIC_CHAIN_REGNUM 3 -+ -+#define ELIMINABLE_REGS \ -+{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ -+ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ -+} -+ -+#define CAN_ELIMINATE(FROM, TO) \ -+ (((TO) == STACK_POINTER_REGNUM && frame_pointer_needed) ? 0 : 1) -+ -+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ -+ (OFFSET) = lm32_compute_initial_elimination_offset (FROM, TO) -+ -+/*-----------------------------*/ -+/* Function argument passing. */ -+/*-----------------------------*/ -+ -+#define ACCUMULATE_OUTGOING_ARGS 1 -+ -+#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0 -+ -+/*--------------------------------*/ -+/* Passing Arguments in Registers */ -+/*--------------------------------*/ -+ -+/* The first argument register */ -+#define LM32_FIRST_ARG_REG 1 -+ -+/* The number of (integer) argument register available. */ -+#define LM32_NUM_ARG_REGS 8 -+ -+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ -+ lm32_function_arg ((CUM), (MODE), (TYPE), (NAMED)) -+ -+#define CUMULATIVE_ARGS int -+ -+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \ -+ (CUM) = 0 -+ -+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ -+ (CUM) += LM32_NUM_REGS2 (MODE, TYPE) -+ -+#define FUNCTION_ARG_REGNO_P(r) (((r) >= 1) && ((r) <= LM32_NUM_ARG_REGS)) -+ -+/*--------------------*/ -+/* Function results. */ -+/*--------------------*/ -+ -+#define FUNCTION_VALUE(VALTYPE, FUNC) \ -+ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \ -+ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ -+ ? word_mode \ -+ : TYPE_MODE (VALTYPE), \ -+ RV_REGNUM) -+ -+#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RV_REGNUM) -+ -+#define FUNCTION_VALUE_REGNO_P(N) ((N) == RV_REGNUM) -+ -+#define RETURN_IN_MEMORY(TYPE) lm32_return_in_memory (TYPE) -+ -+#define DEFAULT_PCC_STRUCT_RETURN 0 -+ -+/* Convert from bytes to ints. */ -+#define LM32_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) -+ -+/* The number of (integer) registers required to hold a quantity of -+ type MODE. */ -+#define LM32_NUM_REGS(MODE) LM32_NUM_INTS (GET_MODE_SIZE (MODE)) -+ -+/* The number of (integer) registers required to hold a quantity of -+ TYPE MODE. */ -+#define LM32_NUM_REGS2(MODE, TYPE) \ -+ LM32_NUM_INTS ((MODE) == BLKmode ? \ -+ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) -+ -+#define STRUCT_VALUE 0 -+ -+/*---------------------------*/ -+/* Function entry and exit. */ -+/*---------------------------*/ -+ -+/*-------------*/ -+/* Profiling. */ -+/*-------------*/ -+ -+#define FUNCTION_PROFILER(FILE, LABELNO) -+ -+/*---------------*/ -+/* Trampolines. */ -+/*---------------*/ -+ -+#define INITIALIZE_TRAMPOLINE -+#define TRAMPOLINE_SIZE 0 -+ -+/*---------------------*/ -+/* Addressing Modes. */ -+/*---------------------*/ -+ -+#define CONSTANT_ADDRESS_P(X) \ -+ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ -+ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \ -+ || (GET_CODE (X) == CONST))) -+ -+#define MAX_REGS_PER_ADDRESS 1 -+ -+#ifdef REG_OK_STRICT -+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM) -+#else -+#define REG_OK_FOR_FRAME_PTR_P(X) (REGNO (X) == FRAME_POINTER_REGNUM) -+#endif -+ -+#define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X)) -+#define RTX_OK_FOR_STACK_P(X) (REG_P (X) && (REGNO (X) == STACK_POINTER_REGNUM)) -+#define CONST_OK_FOR_BASE_OFFSET(X, MODE) const_ok_for_base_offset ((X), (MODE)) -+ -+#define LEGITIMATE_BASE_INDEX_P(ADDR, MODE) \ -+( GET_CODE (ADDR)==PLUS \ -+ && RTX_OK_FOR_BASE_P (XEXP (ADDR, 0)) \ -+ && GET_CODE (XEXP (ADDR, 1)) == CONST_INT \ -+ && CONST_OK_FOR_BASE_OFFSET (XEXP ((ADDR), 1), (MODE))) -+ -+#define LEGITIMATE_GPREL_P(ADDR) \ -+( GET_CODE (ADDR) == SYMBOL_REF \ -+ && SYMBOL_REF_SMALL_P (ADDR)) -+ -+#ifdef REG_OK_STRICT -+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X))) -+#else -+#define REG_OK_FOR_BASE_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X))) -+#endif -+ -+#ifdef REG_OK_STRICT -+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X))) -+#else -+#define REG_OK_FOR_INDEX_P(X) (G_REG_P (REGNO (X)) || PSEUDO_REG_P (REGNO (X))) -+#endif -+ -+#define GO_IF_LEGITIMATE_ADDRESS(m,x,l) \ -+{ \ -+ if (RTX_OK_FOR_BASE_P (x)) goto l; /* (rM) */ \ -+ else if (LEGITIMATE_BASE_INDEX_P (x, m)) goto l; /* (rM)+literal) */ \ -+ else if (LEGITIMATE_GPREL_P (x)) goto l; \ -+} -+ -+#define ARM_LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ -+do { \ -+ if (flag_pic) \ -+ X = lm32_legitimize_pic_address (OLDX, MODE, NULL_RTX); \ -+} while (0) -+ -+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \ -+ if (GET_CODE (ADDR) == PLUS) goto LABEL; \ -+ -+#define LEGITIMATE_CONSTANT_P(X) 1 -+ -+/*-------------------------*/ -+/* Condition Code Status. */ -+/*-------------------------*/ -+ -+#define REVERSIBLE_CC_MODE(MODE) 1 -+ -+/*---------*/ -+/* Costs. */ -+/*---------*/ -+ -+#define SLOW_BYTE_ACCESS 1 -+ -+#define NO_FUNCTION_CSE -+ -+#define BRANCH_COST(speed_p, predictable_p) 4 -+ -+#define MOVE_RATIO(speed) (speed ? 24 : 3) -+ -+/*------------*/ -+/* Sections. */ -+/*------------*/ -+ -+#define TEXT_SECTION_ASM_OP "\t.section\t.text" -+#define DATA_SECTION_ASM_OP "\t.section\t.data" -+#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\"" -+#define BSS_SECTION_ASM_OP "\t.section\t.bss" -+#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\"" -+ -+/*-------*/ -+/* PIC. */ -+/*-------*/ -+ -+#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? GP_REGNUM : INVALID_REGNUM) -+ -+#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) -+ -+#define LEGITIMATE_PIC_OPERAND_P(X) \ -+ (!(nonpic_symbol_mentioned_p (X))) -+ -+/*-------------*/ -+/* Assembler. */ -+/*-------------*/ -+ -+#define ASM_COMMENT_START "#" -+ -+#define ASM_APP_ON "#APP\n" -+ -+#define ASM_APP_OFF "#NO_APP\n" -+ -+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ -+ do { \ -+ fputc ( '\t', FILE); \ -+ assemble_name (FILE, LABEL1); \ -+ fputs ( " = ", FILE); \ -+ assemble_name (FILE, LABEL2); \ -+ fputc ( '\n', FILE); \ -+ } while (0) -+ -+/* Override default implementation in elfos.h to support -G. */ -+#undef ASM_OUTPUT_ALIGNED_LOCAL -+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ -+do { \ -+ if ((SIZE) <= g_switch_value) \ -+ switch_to_section (sbss_section); \ -+ else \ -+ switch_to_section (bss_section); \ -+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ -+ if (!flag_inhibit_size_directive) \ -+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ -+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ -+ ASM_OUTPUT_LABEL(FILE, NAME); \ -+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ -+} while (0) -+ -+/* Override default implementation in elfos.h to support -G. */ -+#undef ASM_OUTPUT_ALIGNED_COMMON -+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ -+do \ -+{ \ -+ if ((SIZE) <= g_switch_value) \ -+ { \ -+ switch_to_section (sbss_section); \ -+ (*targetm.asm_out.globalize_label) (FILE, NAME); \ -+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ -+ if (!flag_inhibit_size_directive) \ -+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ -+ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ -+ ASM_OUTPUT_LABEL(FILE, NAME); \ -+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ -+ } \ -+ else \ -+ { \ -+ switch_to_section (bss_section); \ -+ fprintf ((FILE), "%s", COMMON_ASM_OP); \ -+ assemble_name ((FILE), (NAME)); \ -+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ -+ } \ -+} \ -+while (0) -+ -+#define ASM_OUTPUT_LABEL(FILE, NAME) \ -+ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) -+ -+#define ASM_OUTPUT_LABELREF(FILE,NAME) \ -+ do { \ -+ const char *xname = (NAME); \ -+ if (xname[0] == '@') \ -+ xname += 1; \ -+ if (xname[0] == '*') \ -+ xname += 1; \ -+ fputs (xname, FILE); \ -+ } while (0) -+ -+#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \ -+ do { \ -+ assemble_name (STREAM, XSTR (SYMBOL, 0)); \ -+ } while (0) -+ -+#define GLOBAL_ASM_OP "\t.global\t" -+ -+#define REGISTER_NAMES \ -+{ \ -+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ -+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ -+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ -+ "r24", "r25", "gp", "fp", "sp", "ra", "ea", "ba"} -+ -+#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ -+ (((CHAR) == '&') || ((CHAR) == '@') || ((CHAR) == '*')) -+ -+#define PRINT_OPERAND(FILE, X, CODE) \ -+ lm32_print_operand (FILE, X, CODE) -+ -+#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ -+ lm32_print_operand_address (FILE, ADDR) -+ -+#ifndef LOCAL_LABEL_PREFIX -+#define LOCAL_LABEL_PREFIX "." -+#endif -+ -+#define ASM_OUTPUT_ALIGN(FILE,LOG) \ -+ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", (1 << (LOG))); } while (0) -+ -+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ -+do { \ -+ char label[64]; \ -+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \ -+ fprintf (FILE, "\n\t.word\t"); \ -+ assemble_name (FILE, label); \ -+ fprintf (FILE, "\n"); \ -+} while (0) -+ -+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ -+do { \ -+ char label[64]; \ -+ fprintf (FILE, "\t.word\t("); \ -+ ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \ -+ assemble_name (FILE, label); \ -+ fprintf (FILE, "-"); \ -+ ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \ -+ assemble_name (FILE, label); \ -+ fprintf (FILE, ")\n"); \ -+} while (0) -+ -+/*-------------*/ -+/* Debugging. */ -+/*-------------*/ -+ -+#define DBX_REGISTER_NUMBER(REGNO) (REGNO) -+ -+#define CAN_DEBUG_WITHOUT_FP -+ -+#define DEFAULT_GDB_EXTENSIONS 1 -+ -+/*--------*/ -+/* Misc. */ -+/*--------*/ -+ -+#define CASE_VECTOR_MODE Pmode -+ -+#define WORD_REGISTER_OPERATIONS -+ -+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND -+ -+#define SHORT_IMMEDIATES_SIGN_EXTEND -+ -+#define MOVE_MAX UNITS_PER_WORD -+#define MAX_MOVE_MAX 4 -+ -+#define SHIFT_COUNT_TRUNCATED 1 -+ -+#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 -+ -+#define Pmode SImode -+ -+#define FUNCTION_MODE SImode -+ -+#ifndef NO_IMPLICIT_EXTERN_C -+#define NO_IMPLICIT_EXTERN_C -+#endif -+ -+#define STORE_FLAG_VALUE 1 -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/lm32.md gcc-4.4.5/gcc/config/lm32/lm32.md ---- gcc-4.4.5.orig/gcc/config/lm32/lm32.md 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/lm32.md 2011-03-01 05:57:30.851524009 +0100 -@@ -0,0 +1,1233 @@ -+;; Machine description of the Lattice Mico32 architecture for GNU C compiler. -+;; Contributed by Jon Beniston -+ -+;; 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 3, 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 COPYING3. If not see -+;; . -+ -+;; Include predicate definitions -+(include "predicates.md") -+ -+;; Register numbers -+(define_constants -+ [(RA_REGNUM 29) ; return address register. -+ ] -+) -+ -+;; LM32 specific volatile operations -+(define_constants -+ [(UNSPECV_BLOCKAGE 1)] ; use to prevent scheduler from optimising accross bounaries -+) -+ -+;; LM32 specific operations -+(define_constants -+ [(UNSPEC_GOT 2) -+ (UNSPEC_GOTOFF_HI16 3) -+ (UNSPEC_GOTOFF_LO16 4)] -+) -+ -+;; --------------------------------- -+;; instruction types -+;; --------------------------------- -+ -+(define_attr "type" -+ "unknown,load,store,arith,compare,shift,multiply,divide,call,icall,ubranch,uibranch,cbranch" -+ (const_string "unknown")) -+ -+;; --------------------------------- -+;; instruction lengths -+;; --------------------------------- -+ -+; All instructions are 4 bytes -+; Except for branches that are out of range, and have to be implemented -+; as two instructions -+(define_attr "length" "" -+ (cond [ -+ (eq_attr "type" "cbranch") -+ (if_then_else -+ (lt (abs (minus (match_dup 2) (pc))) -+ (const_int 32768) -+ ) -+ (const_int 4) -+ (const_int 8) -+ ) -+ ] -+ (const_int 4)) -+) -+ -+;; --------------------------------- -+;; scheduling -+;; --------------------------------- -+ -+(define_automaton "lm32") -+ -+(define_cpu_unit "x" "lm32") -+(define_cpu_unit "m" "lm32") -+(define_cpu_unit "w" "lm32") -+ -+(define_insn_reservation "singlecycle" 1 -+ (eq_attr "type" "store,arith,call,icall,ubranch,uibranch,cbranch") -+ "x") -+ -+(define_insn_reservation "twocycle" 2 -+ (eq_attr "type" "compare,shift,divide") -+ "x,m") -+ -+(define_insn_reservation "threecycle" 3 -+ (eq_attr "type" "load,multiply") -+ "x,m,w") -+ -+;; --------------------------------- -+;; mov -+;; --------------------------------- -+ -+(define_expand "movqi" -+ [(set (match_operand:QI 0 "general_operand" "") -+ (match_operand:QI 1 "general_operand" ""))] -+ "" -+ " -+{ -+ if (can_create_pseudo_p ()) -+ { -+ if (GET_CODE (operand0) == MEM) -+ { -+ /* Source operand for store must be in a register */ -+ operands[1] = force_reg (QImode, operands[1]); -+ } -+ } -+ if ( GET_CODE (operands[1]) == CONST_INT -+ && GET_CODE (operands[0]) == REG) -+ { -+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0); -+ emit_insn (gen_movsi (operands[0], operands[1])); -+ DONE; -+ } -+}") -+ -+(define_expand "movhi" -+ [(set (match_operand:HI 0 "general_operand" "") -+ (match_operand:HI 1 "general_operand" ""))] -+ "" -+ " -+{ -+ if (can_create_pseudo_p ()) -+ { -+ if (GET_CODE (operands[0]) == MEM) -+ { -+ /* Source operand for store must be in a register */ -+ operands[1] = force_reg (HImode, operands[1]); -+ } -+ } -+ if (GET_CODE (operands[1]) == CONST_INT) -+ { -+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0); -+ if (MEDIUM_INT (INTVAL (operands[1]))) -+ emit_insn (gen_movsi_kimm (operands[0], operands[1])); -+ else if (MEDIUM_UINT (INTVAL (operands[1]))) -+ emit_insn (gen_movsi_limm (operands[0], operands[1])); -+ else -+ { -+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1])))); -+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1])))); -+ } -+ DONE; -+ } -+}") -+ -+(define_expand "movsi" -+ [(set (match_operand:SI 0 "general_operand" "") -+ (match_operand:SI 1 "general_operand" ""))] -+ "" -+ " -+{ -+ if (can_create_pseudo_p ()) -+ { -+ if (GET_CODE (operands[0]) == MEM -+ || (GET_CODE (operands[0]) == SUBREG -+ && GET_CODE (SUBREG_REG (operands[0])) == MEM)) -+ { -+ /* Source operand for store must be in a register */ -+ operands[1] = force_reg (SImode, operands[1]); -+ } -+ } -+ -+ if (flag_pic && symbolic_operand (operands[1], SImode)) -+ { -+ if (GET_CODE (operands[1]) == LABEL_REF -+ || (GET_CODE (operands[1]) == SYMBOL_REF -+ && SYMBOL_REF_LOCAL_P (operands[1]) -+ && !SYMBOL_REF_WEAK (operands[1]))) -+ { -+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], operands[1])); -+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx)); -+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], operands[1])); -+ } -+ else -+ { -+ emit_insn (gen_movsi_got (operands[0], operands[1])); -+ } -+ crtl->uses_pic_offset_table = 1; -+ DONE; -+ } -+ else if (flag_pic && GET_CODE (operands[1]) == CONST) -+ { -+ rtx op = XEXP (operands[1], 0); -+ if (GET_CODE (op) == PLUS) -+ { -+ rtx arg0 = XEXP (op, 0); -+ rtx arg1 = XEXP (op, 1); -+ if (GET_CODE (arg0) == LABEL_REF -+ || (GET_CODE (arg0) == SYMBOL_REF -+ && SYMBOL_REF_LOCAL_P (arg0) -+ && !SYMBOL_REF_WEAK (arg0))) -+ { -+ emit_insn (gen_movsi_gotoff_hi16 (operands[0], arg0)); -+ emit_insn (gen_addsi3 (operands[0], operands[0], pic_offset_table_rtx)); -+ emit_insn (gen_movsi_gotoff_lo16 (operands[0], operands[0], arg0)); -+ } -+ else -+ { -+ emit_insn (gen_movsi_got (operands[0], arg0)); -+ } -+ emit_insn (gen_addsi3 (operands[0], operands[0], arg1)); -+ crtl->uses_pic_offset_table = 1; -+ DONE; -+ } -+ } -+ else if (!flag_pic && ( GET_CODE (operands[1]) == SYMBOL_REF -+ && SYMBOL_REF_SMALL_P (operands[1]) -+ ) -+ ) -+ { -+ emit_insn (gen_movsi_reloc_gprel (operands[0], operands[1])); -+ DONE; -+ } -+ else if (!flag_pic && ( GET_CODE (operands[1]) == LABEL_REF -+ || GET_CODE (operands[1]) == SYMBOL_REF -+ || GET_CODE (operands[1]) == CONST -+ ) -+ ) -+ { -+ emit_insn (gen_movsi_reloc_hi (operands[0], operands[1])); -+ emit_insn (gen_movsi_reloc_lo (operands[0], operands[0], operands[1])); -+ DONE; -+ } -+ else if (GET_CODE (operands[1]) == CONST_INT) -+ { -+ if (MEDIUM_INT (INTVAL (operands[1]))) -+ emit_insn (gen_movsi_kimm (operands[0], operands[1])); -+ else if (MEDIUM_UINT (INTVAL (operands[1]))) -+ emit_insn (gen_movsi_limm (operands[0], operands[1])); -+ else -+ { -+ emit_insn (gen_movsi_imm_hi (operands[0], GEN_INT (INTVAL (operands[1])))); -+ emit_insn (gen_movsi_imm_lo (operands[0], operands[0], GEN_INT (INTVAL (operands[1])))); -+ } -+ DONE; -+ } -+}") -+ -+;;(define_expand "movmemsi" -+;; [(parallel [(set (match_operand:BLK 0 "general_operand" "") -+;; (match_operand:BLK 1 "general_operand" "")) -+;; (use (match_operand:SI 2 "" "")) -+;; (use (match_operand:SI 3 "const_int_operand" ""))])] -+;; "" -+;;{ -+;; if (!lm32_expand_block_move (operands)) -+;; FAIL; -+;; DONE; -+;;}) -+ -+;; --------------------------------- -+;; load/stores/moves -+;; --------------------------------- -+ -+(define_insn "movsi_kimm" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (match_operand:SI 1 "constant_K_operand" "K"))] -+ "" -+ "addi %0, r0, %1" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_limm" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (match_operand:SI 1 "constant_L_operand" "L"))] -+ "" -+ "ori %0, r0, %1" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_imm_hi" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (high:SI (match_operand:SI 1 "immediate_operand" "i")))] -+ "" -+ "orhi %0, r0, hi(%1)" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_imm_lo" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0") -+ (match_operand:SI 2 "immediate_operand" "i")))] -+ "" -+ "ori %0, %0, lo(%2)" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_reloc_gprel" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (match_operand:SI 1 "reloc_operand" "i"))] -+ "GET_CODE (operands[1]) == SYMBOL_REF && SYMBOL_REF_SMALL_P (operands[1])" -+ "mva %0, gp(%1)" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_got" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOT))] -+ "flag_pic" -+ "lw %0, (gp+got(%1))" -+ [(set_attr "type" "load")] -+) -+ -+(define_insn "movsi_gotoff_hi16" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF_HI16))] -+ "flag_pic" -+ "orhi %0, r0, gotoffhi16(%1)" -+ [(set_attr "type" "load")] -+) -+ -+(define_insn "movsi_gotoff_lo16" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (unspec:SI [(plus:SI (match_operand:SI 1 "register_operand" "0") -+ (match_operand 2 "" ""))] UNSPEC_GOTOFF_LO16))] -+ "flag_pic" -+ "addi %0, %1, gotofflo16(%2)" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_reloc_hi" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (high:SI (match_operand:SI 1 "reloc_operand" "i")))] -+ "!flag_pic" -+ "orhi %0, r0, hi(%1)" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "movsi_reloc_lo" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (lo_sum:SI (match_operand:SI 1 "register_operand" "0") -+ (match_operand:SI 2 "reloc_operand" "i")))] -+ "!flag_pic" -+ "ori %0, %0, lo(%2)" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "*movqi_insn" -+ [(set (match_operand:QI 0 "register_or_memory_operand" "=r,r,m") -+ (match_operand:QI 1 "register_or_memory_operand" "m,r,r"))] -+ "" -+ "@ -+ lbu %0, %1 -+ or %0, %1, r0 -+ sb %0, %1" -+ [(set_attr "type" "load,arith,store")] -+) -+ -+(define_insn "*movhi_insn" -+ [(set (match_operand:HI 0 "register_or_memory_operand" "=r,r,m") -+ (match_operand:HI 1 "register_or_memory_operand" "m,r,r"))] -+ "" -+ "@ -+ lhu %0, %1 -+ or %0, %1, r0 -+ sh %0, %1" -+ [(set_attr "type" "load,arith,store")] -+) -+ -+(define_insn "*movsi_insn" -+ [(set (match_operand:SI 0 "register_or_memory_operand" "=r,r,m") -+ (match_operand:SI 1 "register_or_memory_operand" "m,r,r"))] -+ "" -+ "@ -+ lw %0, %1 -+ or %0, %1, r0 -+ sw %0, %1" -+ [(set_attr "type" "load,arith,store")] -+) -+ -+;; --------------------------------- -+;; sign and zero extension -+;; --------------------------------- -+ -+(define_insn "*extendqihi2" -+ [(set (match_operand:HI 0 "register_operand" "=r,r") -+ (sign_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] -+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)" -+ "@ -+ lb %0, %1 -+ sextb %0, %1" -+ [(set_attr "type" "load,arith")] -+) -+ -+(define_insn "zero_extendqihi2" -+ [(set (match_operand:HI 0 "register_operand" "=r,r") -+ (zero_extend:HI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] -+ "" -+ "@ -+ lbu %0, %1 -+ andi %0, %1, 0xff" -+ [(set_attr "type" "load,arith")] -+) -+ -+(define_insn "*extendqisi2" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (sign_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] -+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)" -+ "@ -+ lb %0, %1 -+ sextb %0, %1" -+ [(set_attr "type" "load,arith")] -+) -+ -+(define_insn "zero_extendqisi2" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (zero_extend:SI (match_operand:QI 1 "register_or_memory_operand" "m,r")))] -+ "" -+ "@ -+ lbu %0, %1 -+ andi %0, %1, 0xff" -+ [(set_attr "type" "load,arith")] -+) -+ -+(define_insn "*extendhisi2" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (sign_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))] -+ "TARGET_SIGN_EXTEND_ENABLED || (GET_CODE (operands[1]) != REG)" -+ "@ -+ lh %0, %1 -+ sexth %0, %1" -+ [(set_attr "type" "load,arith")] -+) -+ -+(define_insn "zero_extendhisi2" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (zero_extend:SI (match_operand:HI 1 "register_or_memory_operand" "m,r")))] -+ "" -+ "@ -+ lhu %0, %1 -+ andi %0, %1, 0xffff" -+ [(set_attr "type" "load,arith")] -+) -+ -+;; --------------------------------- -+;; compare -+;; --------------------------------- -+ -+(define_expand "cmpsi" -+ [(set (cc0) -+ (compare:CC (match_operand:SI 0 "register_operand" "") -+ (match_operand:SI 1 "register_or_K_operand" "")))] -+ "" -+ " -+{ -+ lm32_compare_op0 = operands[0]; -+ lm32_compare_op1 = operands[1]; -+ DONE; -+}") -+ -+ -+(define_expand "tstsi" -+ [(set (cc0) -+ (match_operand:SI 0 "register_operand" ""))] -+ "" -+ " -+{ -+ lm32_compare_op0 = operands[0]; -+ lm32_compare_op1 = const0_rtx; -+ DONE; -+}") -+ -+(define_expand "seq" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (eq:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_insn "*seq" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (eq:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,K")))] -+ "" -+ "@ -+ cmpe %0, %z1, %2 -+ cmpei %0, %z1, %2" -+ [(set_attr "type" "compare")] -+) -+ -+(define_expand "sne" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (ne:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_insn "*sne" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (ne:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,K")))] -+ "" -+ "@ -+ cmpne %0, %z1, %2 -+ cmpnei %0, %z1, %2" -+ [(set_attr "type" "compare")] -+) -+ -+(define_expand "sgt" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (gt:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_insn "*sgt" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (gt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,K")))] -+ "" -+ "@ -+ cmpg %0, %z1, %2 -+ cmpgi %0, %z1, %2" -+ [(set_attr "type" "compare")] -+) -+ -+(define_expand "slt" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (lt:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_expand "sge" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (ge:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_insn "*sge" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (ge:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,K")))] -+ "" -+ "@ -+ cmpge %0, %z1, %2 -+ cmpgei %0, %z1, %2" -+ [(set_attr "type" "compare")] -+) -+ -+(define_expand "sle" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (le:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_expand "sgtu" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (gtu:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_insn "*sgtu" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (gtu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,L")))] -+ "" -+ "@ -+ cmpgu %0, %z1, %2 -+ cmpgui %0, %z1, %2" -+ [(set_attr "type" "compare")] -+) -+ -+(define_expand "sltu" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (ltu:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_expand "sgeu" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (geu:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+(define_insn "*sgeu" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (geu:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,L")))] -+ "" -+ "@ -+ cmpgeu %0, %z1, %2 -+ cmpgeui %0, %z1, %2" -+ [(set_attr "type" "compare")] -+) -+ -+(define_expand "sleu" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (leu:SI (match_dup 1) -+ (match_dup 2)))] -+ "" -+{ -+ operands[1] = lm32_compare_op0; -+ operands[2] = lm32_compare_op1; -+ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX); -+ DONE; -+}) -+ -+;; --------------------------------- -+;; unconditional branch -+;; --------------------------------- -+ -+(define_insn "jump" -+ [(set (pc) (label_ref (match_operand 0 "" "")))] -+ "" -+ "bi %0" -+ [(set_attr "type" "ubranch")] -+) -+ -+(define_expand "indirect_jump" -+ [(set (pc) (match_operand 0 "register_operand" ""))] -+ "" -+ " -+{ -+ emit_jump_insn (gen_indirect_jumpsi (operands[0])); -+ DONE; -+}") -+ -+(define_insn "indirect_jumpsi" -+ [(set (pc) (match_operand:SI 0 "register_operand" "r"))] -+ "" -+ "b %0" -+ [(set_attr "type" "uibranch")] -+) -+ -+;; --------------------------------- -+;; conditional branch -+;; --------------------------------- -+ -+(define_expand "beq" -+ [(set (pc) -+ (if_then_else (eq:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (EQ, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bne" -+ [(set (pc) -+ (if_then_else (ne:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (NE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bgt" -+ [(set (pc) -+ (if_then_else (gt:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (GT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bge" -+ [(set (pc) -+ (if_then_else (ge:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (GE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "ble" -+ [(set (pc) -+ (if_then_else (le:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (LE, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "blt" -+ [(set (pc) -+ (if_then_else (lt:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (LT, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bgtu" -+ [(set (pc) -+ (if_then_else (gtu:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (GTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bgeu" -+ [(set (pc) -+ (if_then_else (geu:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (GEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bleu" -+ [(set (pc) -+ (if_then_else (leu:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (LEU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_expand "bltu" -+ [(set (pc) -+ (if_then_else (ltu:CC (cc0) -+ (const_int 0)) -+ (label_ref (match_operand 0 "" "")) -+ (pc)))] -+ "" -+ " -+{ -+ gen_int_relational (LTU, NULL_RTX, lm32_compare_op0, lm32_compare_op1, operands[0]); -+ DONE; -+}") -+ -+(define_insn "*beq" -+ [(set (pc) -+ (if_then_else (eq:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") -+ (match_operand:SI 1 "register_or_zero_operand" "rJ")) -+ (label_ref (match_operand 2 "" "")) -+ (pc)))] -+ "" -+{ -+ return get_attr_length (insn) == 4 -+ ? "be %z0,%z1,%2" -+ : "bne %z0,%z1,8\n\tbi %2"; -+} -+ [(set_attr "type" "cbranch")]) -+ -+(define_insn "*bne" -+ [(set (pc) -+ (if_then_else (ne:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") -+ (match_operand:SI 1 "register_or_zero_operand" "rJ")) -+ (label_ref (match_operand 2 "" "")) -+ (pc)))] -+ "" -+{ -+ return get_attr_length (insn) == 4 -+ ? "bne %z0,%z1,%2" -+ : "be %z0,%z1,8\n\tbi %2"; -+} -+ [(set_attr "type" "cbranch")]) -+ -+(define_insn "*bgt" -+ [(set (pc) -+ (if_then_else (gt:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") -+ (match_operand:SI 1 "register_or_zero_operand" "rJ")) -+ (label_ref (match_operand 2 "" "")) -+ (pc)))] -+ "" -+{ -+ return get_attr_length (insn) == 4 -+ ? "bg %z0,%z1,%2" -+ : "bge %z1,%z0,8\n\tbi %2"; -+} -+ [(set_attr "type" "cbranch")]) -+ -+(define_insn "*bge" -+ [(set (pc) -+ (if_then_else (ge:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") -+ (match_operand:SI 1 "register_or_zero_operand" "rJ")) -+ (label_ref (match_operand 2 "" "")) -+ (pc)))] -+ "" -+{ -+ return get_attr_length (insn) == 4 -+ ? "bge %z0,%z1,%2" -+ : "bg %z1,%z0,8\n\tbi %2"; -+} -+ [(set_attr "type" "cbranch")]) -+ -+(define_insn "*bgtu" -+ [(set (pc) -+ (if_then_else (gtu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") -+ (match_operand:SI 1 "register_or_zero_operand" "rJ")) -+ (label_ref (match_operand 2 "" "")) -+ (pc)))] -+ "" -+{ -+ return get_attr_length (insn) == 4 -+ ? "bgu %z0,%z1,%2" -+ : "bgeu %z1,%z0,8\n\tbi %2"; -+} -+ [(set_attr "type" "cbranch")]) -+ -+(define_insn "*bgeu" -+ [(set (pc) -+ (if_then_else (geu:SI (match_operand:SI 0 "register_or_zero_operand" "rJ") -+ (match_operand:SI 1 "register_or_zero_operand" "rJ")) -+ (label_ref (match_operand 2 "" "")) -+ (pc)))] -+ "" -+{ -+ return get_attr_length (insn) == 4 -+ ? "bgeu %z0,%z1,%2" -+ : "bgu %z1,%z0,8\n\tbi %2"; -+} -+ [(set_attr "type" "cbranch")]) -+ -+;; --------------------------------- -+;; call -+;; --------------------------------- -+ -+(define_expand "call" -+ [(parallel [(call (match_operand 0 "memory_operand" "m") -+ (match_operand 1 "" "")) -+ (clobber (reg:SI RA_REGNUM)) -+ ])] -+ "" -+ " -+{ -+ rtx addr = XEXP (operands[0], 0); -+ if (!CONSTANT_ADDRESS_P (addr)) -+ { -+ emit_call_insn (gen_call_via_regsi (addr, operands[1])); -+ DONE; -+ } -+}") -+ -+(define_insn "call_via_regsi" -+ [(call (mem:SI (match_operand:SI 0 "register_operand" "r")) -+ (match_operand 1 "" "")) -+ (clobber (reg:SI RA_REGNUM))] -+ "" -+ "call %0" -+ [(set_attr "type" "icall")] -+) -+ -+(define_insn "*call_via_labelsi" -+ [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "X")) -+ (match_operand 1 "" "")) -+ (clobber (reg:SI RA_REGNUM))] -+ "" -+ "calli %0" -+ [(set_attr "type" "call")] -+) -+ -+(define_expand "call_value" -+ [(parallel [(set (match_operand 0 "register_operand" "=r") -+ (call (match_operand 1 "memory_operand" "m") -+ (match_operand 2 "" ""))) -+ (clobber (reg:SI RA_REGNUM)) -+ ])] -+ "" -+ " -+{ -+ rtx addr = XEXP (operands[1], 0); -+ if (!CONSTANT_ADDRESS_P (addr)) -+ { -+ emit_call_insn (gen_call_value_via_regsi (operands[0], addr, operands[2])); -+ DONE; -+ } -+}") -+ -+(define_insn "call_value_via_regsi" -+ [(set (match_operand 0 "register_operand" "=r") -+ (call (mem:SI (match_operand:SI 1 "register_operand" "r")) -+ (match_operand 2 "" ""))) -+ (clobber (reg:SI RA_REGNUM))] -+ "" -+ "call %1" -+ [(set_attr "type" "icall")] -+) -+ -+(define_insn "*call_value_via_labelsi" -+ [(set (match_operand 0 "register_operand" "=r") -+ (call (mem:SI (match_operand:SI 1 "symbolic_operand" "X")) -+ (match_operand 2 "" ""))) -+ (clobber (reg:SI RA_REGNUM))] -+ "" -+ "calli %1" -+ [(set_attr "type" "call")] -+) -+ -+(define_insn "return_internalsi" -+ [(use (match_operand:SI 0 "register_operand" "r")) -+ (return)] -+ "" -+ "b %0" -+ [(set_attr "type" "uibranch")] -+) -+ -+(define_insn "return" -+ [(return)] -+ "lm32_can_use_return ()" -+ "ret" -+ [(set_attr "type" "uibranch")] -+) -+ -+;; --------------------------------- -+;; switch/case statements -+;; --------------------------------- -+ -+(define_expand "tablejump" -+ [(set (pc) (match_operand 0 "register_operand" "")) -+ (use (label_ref (match_operand 1 "" "")))] -+ "" -+ " -+{ -+ rtx target = operands[0]; -+ if (flag_pic) -+ { -+ /* For PIC, the table entry is relative to the start of the table. */ -+ rtx label = gen_reg_rtx (SImode); -+ target = gen_reg_rtx (SImode); -+ emit_move_insn (label, gen_rtx_LABEL_REF (SImode, operands[1])); -+ emit_insn (gen_addsi3 (target, operands[0], label)); -+ } -+ emit_jump_insn (gen_tablejumpsi (target, operands[1])); -+ DONE; -+}") -+ -+(define_insn "tablejumpsi" -+ [(set (pc) (match_operand:SI 0 "register_operand" "r")) -+ (use (label_ref (match_operand 1 "" "")))] -+ "" -+ "b %0" -+ [(set_attr "type" "ubranch")] -+) -+ -+;; --------------------------------- -+;; arithmetic -+;; --------------------------------- -+ -+(define_insn "addsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (plus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,K")))] -+ "" -+ "@ -+ add %0, %z1, %2 -+ addi %0, %z1, %2" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "subsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ") -+ (match_operand:SI 2 "register_or_zero_operand" "rJ")))] -+ "" -+ "sub %0, %z1, %z2" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "mulsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (mult:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_K_operand" "r,K")))] -+ "TARGET_MULTIPLY_ENABLED" -+ "@ -+ mul %0, %z1, %2 -+ muli %0, %z1, %2" -+ [(set_attr "type" "multiply")] -+) -+ -+(define_insn "udivsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (udiv:SI (match_operand:SI 1 "register_or_zero_operand" "rJ") -+ (match_operand:SI 2 "register_operand" "r")))] -+ "TARGET_DIVIDE_ENABLED" -+ "divu %0, %z1, %2" -+ [(set_attr "type" "divide")] -+) -+ -+(define_insn "umodsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (umod:SI (match_operand:SI 1 "register_or_zero_operand" "rJ") -+ (match_operand:SI 2 "register_operand" "r")))] -+ "TARGET_DIVIDE_ENABLED" -+ "modu %0, %z1, %2" -+ [(set_attr "type" "divide")] -+) -+ -+;; --------------------------------- -+;; negation and inversion -+;; --------------------------------- -+ -+(define_insn "negsi2" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (neg:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))] -+ "" -+ "sub %0, r0, %z1" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "one_cmplsi2" -+ [(set (match_operand:SI 0 "register_operand" "=r") -+ (not:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")))] -+ "" -+ "not %0, %z1" -+ [(set_attr "type" "arith")] -+) -+ -+;; --------------------------------- -+;; logical -+;; --------------------------------- -+ -+(define_insn "andsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (and:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L")))] -+ "" -+ "@ -+ and %0, %z1, %2 -+ andi %0, %z1, %2" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "iorsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L")))] -+ "" -+ "@ -+ or %0, %z1, %2 -+ ori %0, %z1, %2" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "xorsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L")))] -+ "" -+ "@ -+ xor %0, %z1, %2 -+ xori %0, %z1, %2" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "*norsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (not:SI (ior:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))] -+ "" -+ "@ -+ nor %0, %z1, %2 -+ nori %0, %z1, %2" -+ [(set_attr "type" "arith")] -+) -+ -+(define_insn "*xnorsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (not:SI (xor:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L"))))] -+ "" -+ "@ -+ xnor %0, %z1, %2 -+ xnori %0, %z1, %2" -+ [(set_attr "type" "arith")] -+) -+ -+;; --------------------------------- -+;; shifts -+;; --------------------------------- -+ -+(define_insn "ashlsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (ashift:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L")))] -+ "TARGET_BARREL_SHIFT_ENABLED" -+ "@ -+ sl %0, %z1, %2 -+ sli %0, %z1, %2" -+ [(set_attr "type" "shift")] -+) -+ -+(define_insn "ashrsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (ashiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L")))] -+ "TARGET_BARREL_SHIFT_ENABLED" -+ "@ -+ sr %0, %z1, %2 -+ sri %0, %z1, %2" -+ [(set_attr "type" "shift")] -+) -+ -+(define_insn "lshrsi3" -+ [(set (match_operand:SI 0 "register_operand" "=r,r") -+ (lshiftrt:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ") -+ (match_operand:SI 2 "register_or_L_operand" "r,L")))] -+ "TARGET_BARREL_SHIFT_ENABLED" -+ "@ -+ sru %0, %z1, %2 -+ srui %0, %z1, %2" -+ [(set_attr "type" "shift")] -+) -+ -+;; --------------------------------- -+;; function entry / exit -+;; --------------------------------- -+ -+(define_expand "prologue" -+ [(const_int 1)] -+ "" -+ " -+{ -+ lm32_expand_prologue (); -+ DONE; -+}") -+ -+(define_expand "epilogue" -+ [(return)] -+ "" -+ " -+{ -+ lm32_expand_epilogue (); -+ DONE; -+}") -+ -+;; --------------------------------- -+;; nop -+;; --------------------------------- -+ -+(define_insn "nop" -+ [(const_int 0)] -+ "" -+ "nop" -+ [(set_attr "type" "arith")] -+) -+ -+;; --------------------------------- -+;; blockage -+;; --------------------------------- -+ -+;; used to stop the scheduler from -+;; scheduling code across certain boundaries -+ -+(define_insn "blockage" -+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] -+ "" -+ "" -+ [(set_attr "length" "0")] -+) -+ -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/lm32.opt gcc-4.4.5/gcc/config/lm32/lm32.opt ---- gcc-4.4.5.orig/gcc/config/lm32/lm32.opt 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/lm32.opt 2011-03-01 05:57:30.851524009 +0100 -@@ -0,0 +1,40 @@ -+; Options for the Lattice Mico32 port of the compiler. -+; Contributed by Jon Beniston -+; -+; Copyright (C) 2008 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 3, 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 COPYING3. If not see -+; . -+ -+mmultiply-enabled -+Target Report Mask(MULTIPLY_ENABLED) -+Enable multiply instructions -+ -+mdivide-enabled -+Target Report Mask(DIVIDE_ENABLED) -+Enable divide and modulus instructions -+ -+mbarrel-shift-enabled -+Target Report Mask(BARREL_SHIFT_ENABLED) -+Enable barrel shift instructions -+ -+msign-extend-enabled -+Target Report Mask(SIGN_EXTEND_ENABLED) -+Enable sign extend instructions -+ -+muser-enabled -+Target Report Mask(USER_ENABLED) -+Enable user-defined instructions -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/lm32-protos.h gcc-4.4.5/gcc/config/lm32/lm32-protos.h ---- gcc-4.4.5.orig/gcc/config/lm32/lm32-protos.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/lm32-protos.h 2011-03-01 05:57:30.851524009 +0100 -@@ -0,0 +1,52 @@ -+/* Prototypes of target machine functions, Lattice Mico32 architecture. -+ Contributed by Jon Beniston -+ -+ Copyright (C) 2008 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 3, 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 COPYING3. If not see -+ . */ -+ -+extern int lm32_return_in_memory (tree type); -+extern void lm32_declare_object (FILE *stream, char *name, char *init_string, -+ char *final_string, int size); -+extern int symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED); -+extern int register_or_zero_operand (rtx op, enum machine_mode mode); -+extern int register_or_K_operand (rtx op, enum machine_mode mode); -+extern int constant_K_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED); -+extern int register_or_L_operand (rtx op, enum machine_mode mode); -+extern int constant_L_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED); -+extern int register_or_memory_operand (rtx op, enum machine_mode mode); -+extern int register_operand (rtx op, enum machine_mode mode); -+extern int const_ok_for_base_offset (rtx op, enum machine_mode mode); -+extern void lm32_expand_prologue (void); -+extern void lm32_expand_epilogue (void); -+extern HOST_WIDE_INT lm32_compute_frame_size (int size); -+extern void lm32_print_operand (FILE *file, rtx op, int letter); -+extern void lm32_print_operand_address (FILE *file, rtx addr); -+extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode, -+ tree type, int named); -+extern void lm32_override_options (void); -+extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from, -+ int to); -+extern int lm32_can_use_return (void); -+extern rtx lm32_return_addr_rtx (int count, rtx frame); -+#ifdef RTX_CODE -+extern void gen_int_relational (enum rtx_code code, rtx result, rtx cmp0, -+ rtx cmp1, rtx destination); -+#endif -+extern int lm32_expand_block_move (rtx *); -+extern int nonpic_symbol_mentioned_p (rtx); -+extern rtx lm32_legitimize_pic_address (rtx, enum machine_mode, rtx); -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/predicates.md gcc-4.4.5/gcc/config/lm32/predicates.md ---- gcc-4.4.5.orig/gcc/config/lm32/predicates.md 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/predicates.md 2011-03-01 05:57:30.851524009 +0100 -@@ -0,0 +1,58 @@ -+;; Predicate definitions for Lattice Mico32. -+;; Contributed by Jon Beniston -+;; -+;; Copyright (C) 2008 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 3, 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 COPYING3. If not see -+;; . -+ -+(define_predicate "const0_operand" -+ (and (match_code "const_int,const_double,const_vector") -+ (match_test "op == CONST0_RTX (GET_MODE (op))"))) -+ -+(define_predicate "constant_K_operand" -+ (and (match_code "const_int") -+ (match_test "MEDIUM_INT (INTVAL (op))"))) -+ -+(define_predicate "constant_L_operand" -+ (and (match_code "const_int") -+ (match_test "MEDIUM_UINT (INTVAL (op))"))) -+ -+(define_predicate "register_or_zero_operand" -+ (ior (match_operand 0 "register_operand") -+ (match_operand 0 "const0_operand"))) -+ -+(define_predicate "register_or_memory_operand" -+ (ior (match_operand 0 "register_operand") -+ (match_operand 0 "memory_operand"))) -+ -+(define_predicate "register_or_K_operand" -+ (ior (match_operand 0 "register_operand") -+ (match_operand 0 "constant_K_operand"))) -+ -+(define_predicate "register_or_L_operand" -+ (ior (match_operand 0 "register_operand") -+ (match_operand 0 "constant_L_operand"))) -+ -+(define_predicate "reloc_operand" -+ (ior (ior (match_code "label_ref") -+ (match_code "symbol_ref")) -+ (match_code "const"))) -+ -+(define_predicate "symbolic_operand" -+ (ior (match_code "label_ref") -+ (match_code "symbol_ref"))) -+ -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/rtems.h gcc-4.4.5/gcc/config/lm32/rtems.h ---- gcc-4.4.5.orig/gcc/config/lm32/rtems.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/rtems.h 2011-03-01 05:57:30.851524009 +0100 -@@ -0,0 +1,32 @@ -+/* Definitions for rtems targeting a lm32 using ELF. -+ Copyright (C) 2009, 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 3, 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 COPYING3. If not see -+. */ -+ -+/* Target OS builtins. */ -+#undef TARGET_OS_CPP_BUILTINS -+#define TARGET_OS_CPP_BUILTINS() \ -+ do \ -+ { \ -+ builtin_define ("__rtems__"); \ -+ builtin_define ("__USE_INIT_FINI__"); \ -+ builtin_assert ("system=rtems"); \ -+ } \ -+ while (0) -+ -+/* Use the default */ -+#undef LINK_GCC_C_SEQUENCE_SPEC -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/sfp-machine.h gcc-4.4.5/gcc/config/lm32/sfp-machine.h ---- gcc-4.4.5.orig/gcc/config/lm32/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/sfp-machine.h 2011-03-01 05:57:30.851524009 +0100 -@@ -0,0 +1,51 @@ -+#define _FP_W_TYPE_SIZE 32 -+#define _FP_W_TYPE unsigned long -+#define _FP_WS_TYPE signed long -+#define _FP_I_TYPE long -+ -+#define _FP_MUL_MEAT_S(R,X,Y) \ -+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_D(R,X,Y) \ -+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_Q(R,X,Y) \ -+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) -+ -+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y) -+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) -+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) -+ -+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) -+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 -+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 -+#define _FP_NANSIGN_S 0 -+#define _FP_NANSIGN_D 0 -+#define _FP_NANSIGN_Q 0 -+ -+#define _FP_KEEPNANFRACP 1 -+ -+/* Someone please check this. */ -+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ -+ do { \ -+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ -+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ -+ { \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R,Y); \ -+ } \ -+ else \ -+ { \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R,X); \ -+ } \ -+ R##_c = FP_CLS_NAN; \ -+ } while (0) -+ -+#define __LITTLE_ENDIAN 1234 -+#define __BIG_ENDIAN 4321 -+ -+#define __BYTE_ORDER __BIG_ENDIAN -+ -+/* Define ALIASNAME as a strong alias for NAME. */ -+# define strong_alias(name, aliasname) _strong_alias(name, aliasname) -+# define _strong_alias(name, aliasname) \ -+ extern __typeof (name) aliasname __attribute__ ((alias (#name))); -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/t-fprules-softfp gcc-4.4.5/gcc/config/lm32/t-fprules-softfp ---- gcc-4.4.5.orig/gcc/config/lm32/t-fprules-softfp 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/t-fprules-softfp 2011-03-01 05:57:30.852524023 +0100 -@@ -0,0 +1,5 @@ -+softfp_float_modes := sf df -+softfp_int_modes := si di -+softfp_extensions := sfdf -+softfp_truncations := dfsf -+softfp_machine_header := lm32/sfp-machine.h -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/t-lm32 gcc-4.4.5/gcc/config/lm32/t-lm32 ---- gcc-4.4.5.orig/gcc/config/lm32/t-lm32 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/t-lm32 2011-03-01 05:57:30.852524023 +0100 -@@ -0,0 +1,19 @@ -+LIB1ASMSRC = lm32/lib1funcs.S -+LIB1ASMFUNCS = _ashlsi3 _ashrsi3 _lshrsi3 -+ -+LM32_LIB1CSRC = $(srcdir)/config/lm32/arithmetic.c -+LIB2FUNCS_EXTRA = _mulsi3.c \ -+ _udivmodsi4.c _divsi3.c _modsi3.c _udivsi3.c _umodsi3.c -+# Size optimised versions: _ashlsi3.c _ashrsi3.c _lshrsi3.c -+ -+# The fixed-point arithmetic code is in one file -+# similar to libgcc2.c (or the old libgcc1.c). We need to -+# "split it up" with one file per define. -+$(LIB2FUNCS_EXTRA): $(LM32_LIB1CSRC) -+ name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \ -+ echo "#define L$$name" > tmp-$@ \ -+ && echo '#include "$<"' >> tmp-$@ \ -+ && mv -f tmp-$@ $@ -+ -+MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled -+# Don't bother building multilib with mdivide-enabled, not much of a gain -diff -Naur gcc-4.4.5.orig/gcc/config/lm32/uclinux-elf.h gcc-4.4.5/gcc/config/lm32/uclinux-elf.h ---- gcc-4.4.5.orig/gcc/config/lm32/uclinux-elf.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/gcc/config/lm32/uclinux-elf.h 2011-03-01 05:57:30.852524023 +0100 -@@ -0,0 +1,85 @@ -+/* Definitions for LM32 running Linux-based GNU systems using ELF -+ Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -+ 2008 Free Software Foundation, Inc. -+ Contributed by Philip Blundell -+ -+ 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 3, 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 COPYING3. If not see -+ . */ -+ -+/* elfos.h should have already been included. Now just override -+ any conflicting definitions and add any extras. */ -+ -+/* Run-time Target Specification. */ -+#undef TARGET_VERSION -+#define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr); -+ -+/* Do not assume anything about header files. */ -+#undef NO_IMPLICIT_EXTERN_C -+#define NO_IMPLICIT_EXTERN_C -+ -+/* The GNU C++ standard library requires that these macros be defined. */ -+#undef CPLUSPLUS_CPP_SPEC -+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" -+ -+/* Now we define the strings used to build the spec file. */ -+#undef LIB_SPEC -+#define LIB_SPEC \ -+ "%{pthread:-lpthread} \ -+ %{shared:-lc} \ -+ %{!shared:-lc} " -+ -+#define LIBGCC_SPEC "-lgcc" -+ -+/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add -+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which -+ provides part of the support for getting C++ file-scope static -+ object constructed before entering `main'. */ -+ -+#undef STARTFILE_SPEC -+#define STARTFILE_SPEC \ -+ "%{!shared: \ -+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ -+ %{!p:%{profile:gcrt1.o%s} \ -+ %{!profile:crt1.o%s}}}} \ -+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" -+ -+/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on -+ the GNU/Linux magical crtend.o file (see crtstuff.c) which -+ provides part of the support for getting C++ file-scope static -+ object constructed before entering `main', followed by a normal -+ GNU/Linux "finalizer" file, `crtn.o'. */ -+ -+#undef ENDFILE_SPEC -+#define ENDFILE_SPEC \ -+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" -+ -+#undef LINK_SPEC -+#define LINK_SPEC "%{h*} %{version:-v} \ -+ %{b} %{Wl,*:%*} \ -+ %{static:-Bstatic} \ -+ %{shared:-shared} \ -+ %{symbolic:-Bsymbolic} \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}" -+ -+#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() -+ -+#define LINK_GCC_C_SEQUENCE_SPEC \ -+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" -+ -+#undef CC1_SPEC -+#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}" -+ -diff -Naur gcc-4.4.5.orig/gcc/config/m32c/rtems.h gcc-4.4.5/gcc/config/m32c/rtems.h ---- gcc-4.4.5.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100 -+++ gcc-4.4.5/gcc/config/m32c/rtems.h 2011-03-01 05:57:30.852524023 +0100 -@@ -29,5 +29,9 @@ - } \ - while (0) - --/* Use the default */ -+/* Use the defaults */ - #undef LINK_GCC_C_SEQUENCE_SPEC -+ -+#undef WCHAR_TYPE -+ -+#undef WCHAR_TYPE_SIZE -diff -Naur gcc-4.4.5.orig/gcc/config/m68k/rtemself.h gcc-4.4.5/gcc/config/m68k/rtemself.h ---- gcc-4.4.5.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.4.5/gcc/config/m68k/rtemself.h 2011-03-01 05:57:30.852524023 +0100 -@@ -31,3 +31,8 @@ - builtin_assert ("system=rtems"); \ - } \ - while (0) -+ -+/* Use the defaults */ -+#undef WCHAR_TYPE -+ -+#undef WCHAR_TYPE_SIZE -diff -Naur gcc-4.4.5.orig/gcc/config/mips/elf.h gcc-4.4.5/gcc/config/mips/elf.h ---- gcc-4.4.5.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.4.5/gcc/config/mips/elf.h 2011-03-01 05:57:30.853524036 +0100 -@@ -48,6 +48,4 @@ - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend%O%s crtn%O%s" - --#define NO_IMPLICIT_EXTERN_C 1 -- - #define HANDLE_PRAGMA_PACK_PUSH_POP 1 -diff -Naur gcc-4.4.5.orig/gcc/config/rs6000/rtems.h gcc-4.4.5/gcc/config/rs6000/rtems.h ---- gcc-4.4.5.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.4.5/gcc/config/rs6000/rtems.h 2011-03-01 05:57:30.853524036 +0100 -@@ -49,8 +49,22 @@ - %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \ - %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \ - %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \ --%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }" -+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \ -+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }" - - #undef SUBSUBTARGET_EXTRA_SPECS - #define SUBSUBTARGET_EXTRA_SPECS \ - { "cpp_os_rtems", CPP_OS_RTEMS_SPEC } -+ -+#undef SUBSUBTARGET_OVERRIDE_OPTIONS -+#define SUBSUBTARGET_OVERRIDE_OPTIONS \ -+ do { \ -+ if (TARGET_E500) \ -+ { \ -+ rs6000_float_gprs = 1; \ -+ } \ -+ } while(0) -+ -+#undef WCHAR_TYPE -+ -+#undef WCHAR_TYPE_SIZE -diff -Naur gcc-4.4.5.orig/gcc/config/rs6000/t-rtems gcc-4.4.5/gcc/config/rs6000/t-rtems ---- gcc-4.4.5.orig/gcc/config/rs6000/t-rtems 2009-03-25 13:54:16.000000000 +0100 -+++ gcc-4.4.5/gcc/config/rs6000/t-rtems 2011-03-01 06:06:18.706820035 +0100 -@@ -1,13 +1,29 @@ - # Multilibs for powerpc RTEMS targets. -+# -+# Copyright (C) 2004, 2005, 2009 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 3, 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 COPYING3. If not see -+# . - - MULTILIB_OPTIONS = \ --mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \ --Dmpc8260 \ -+mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \ - msoft-float - - MULTILIB_DIRNAMES = \ --m403 m505 m601 m603e m604 m860 m7400 \ --mpc8260 \ -+m403 m505 m601 m603e m604 m860 m7400 m8540 \ - nof - - # MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} -@@ -29,6 +45,9 @@ - # Map 750 to . - MULTILIB_MATCHES += mcpu?750= - -+# Map 8548 to 8540 -+MULTILIB_MATCHES += mcpu?8540=mcpu?8548 -+ - # Soft-float only, default implies msoft-float - # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES - MULTILIB_SOFTFLOAT_ONLY = \ -@@ -55,10 +74,3 @@ - - # Special rules - # Take out all variants we don't want --MULTILIB_EXCEPTIONS += *mcpu=403/Dmpc* --MULTILIB_EXCEPTIONS += *mcpu=505/Dmpc* --MULTILIB_EXCEPTIONS += *mcpu=601/Dmpc* --MULTILIB_EXCEPTIONS += *mcpu=604/Dmpc* --MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc* --MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc* --MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc* -diff -Naur gcc-4.4.5.orig/gcc/config/rtems.h gcc-4.4.5/gcc/config/rtems.h ---- gcc-4.4.5.orig/gcc/config/rtems.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.4.5/gcc/config/rtems.h 2011-03-01 05:57:30.853524036 +0100 -@@ -38,6 +38,5 @@ - #undef LIB_SPEC - #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \ - "%{!nostdlib: %{qrtems: --start-group \ -- %{!qrtems_debug: -lrtemsbsp -lrtemscpu} \ -- %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \ -+ -lrtemsbsp -lrtemscpu \ - -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}" -diff -Naur gcc-4.4.5.orig/gcc/config/sh/rtemself.h gcc-4.4.5/gcc/config/sh/rtemself.h ---- gcc-4.4.5.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.4.5/gcc/config/sh/rtemself.h 2011-03-01 05:57:30.853524036 +0100 -@@ -24,3 +24,8 @@ - builtin_define( "__rtems__" ); \ - builtin_assert( "system=rtems" ); \ - } while (0) -+ -+/* Use the defaults */ -+#undef WCHAR_TYPE -+ -+#undef WCHAR_TYPE_SIZE -diff -Naur gcc-4.4.5.orig/gcc/config/sparc/rtemself.h gcc-4.4.5/gcc/config/sparc/rtemself.h ---- gcc-4.4.5.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.4.5/gcc/config/sparc/rtemself.h 2011-03-01 05:57:30.854524049 +0100 -@@ -29,5 +29,9 @@ - } \ - while (0) - --/* Use the default */ -+/* Use the defaults */ - #undef LINK_GCC_C_SEQUENCE_SPEC -+ -+#undef WCHAR_TYPE -+ -+#undef WCHAR_TYPE_SIZE -diff -Naur gcc-4.4.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc ---- gcc-4.4.5.orig/gcc/config.gcc 2010-06-14 00:16:50.000000000 +0200 -+++ gcc-4.4.5/gcc/config.gcc 2011-03-01 05:57:30.855524063 +0100 -@@ -1376,6 +1376,23 @@ - out_file=iq2000/iq2000.c - md_file=iq2000/iq2000.md - ;; -+lm32-*-elf*) -+ tm_file="dbxelf.h elfos.h ${tm_file}" -+ tmake_file="lm32/t-lm32" -+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp" -+ ;; -+lm32-*-rtems*) -+ tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h" -+ tmake_file="lm32/t-lm32" -+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp" -+ tmake_file="${tmake_file} t-rtems" -+ extra_parts="crtbegin.o crtend.o crti.o crtn.o" -+ ;; -+lm32-*-uclinux*) -+ tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h" -+ tmake_file="lm32/t-lm32" -+ tmake_file="${tmake_file} lm32/t-fprules-softfp soft-fp/t-softfp" -+ ;; - m32r-*-elf*) - tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" - extra_parts="crtinit.o crtfini.o" -diff -Naur gcc-4.4.5.orig/gcc/doc/contrib.texi gcc-4.4.5/gcc/doc/contrib.texi ---- gcc-4.4.5.orig/gcc/doc/contrib.texi 2009-02-20 16:20:38.000000000 +0100 -+++ gcc-4.4.5/gcc/doc/contrib.texi 2011-03-01 05:57:30.855524063 +0100 -@@ -55,7 +55,7 @@ - Wolfgang Bangerth for processing tons of bug reports. - - @item --Jon Beniston for his Microsoft Windows port of Java. -+Jon Beniston for his Microsoft Windows port of Java and port to Lattice Mico32. - - @item - Daniel Berlin for better DWARF2 support, faster/better optimizations, -diff -Naur gcc-4.4.5.orig/gcc/doc/install.texi gcc-4.4.5/gcc/doc/install.texi ---- gcc-4.4.5.orig/gcc/doc/install.texi 2010-07-15 11:26:30.000000000 +0200 -+++ gcc-4.4.5/gcc/doc/install.texi 2011-03-01 05:57:30.856524077 +0100 -@@ -2660,6 +2660,10 @@ - @item - @uref{#iq2000-x-elf,,iq2000-*-elf} - @item -+@uref{#lm32-x-elf,,lm32-*-elf} -+@item -+@uref{#lm32-x-uclinux,,lm32-*-uclinux} -+@item - @uref{#m32c-x-elf,,m32c-*-elf} - @item - @uref{#m32r-x-elf,,m32r-*-elf} -@@ -3472,6 +3476,20 @@ - @html -
- @end html -+@heading @anchor{lm32-x-elf}lm32-*-elf -+Lattice Mico32 processor. -+This configuration is intended for embedded systems. -+ -+@html -+
-+@end html -+@heading @anchor{lm32-x-uclinux}lm32-*-uclinux -+Lattice Mico32 processor. -+This configuration is intended for embedded systems running uClinux. -+ -+@html -+
-+@end html - @heading @anchor{m32c-x-elf}m32c-*-elf - Renesas M32C processor. - This configuration is intended for embedded systems. -diff -Naur gcc-4.4.5.orig/gcc/doc/invoke.texi gcc-4.4.5/gcc/doc/invoke.texi ---- gcc-4.4.5.orig/gcc/doc/invoke.texi 2010-09-08 20:13:03.000000000 +0200 -+++ gcc-4.4.5/gcc/doc/invoke.texi 2011-03-01 05:57:30.861524147 +0100 -@@ -606,6 +606,10 @@ - -mno-sched-prefer-non-control-spec-insns @gol - -mno-sched-count-spec-in-critical-path} - -+@emph{LM32 Options} -+@gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol -+-msign-extend-enabled -muser-enabled} -+ - @emph{M32R/D Options} - @gccoptlist{-m32r2 -m32rx -m32r @gol - -mdebug @gol -@@ -8858,6 +8862,7 @@ - * i386 and x86-64 Options:: - * i386 and x86-64 Windows Options:: - * IA-64 Options:: -+* LM32 Options:: - * M32C Options:: - * M32R/D Options:: - * M680x0 Options:: -@@ -11842,6 +11847,35 @@ - - @end table - -+@node LM32 Options -+@subsection LM32 Options -+@cindex LM32 options -+ -+These @option{-m} options are defined for the Lattice Mico32 architecture: -+ -+@table @gcctabopt -+@item -mbarrel-shift-enabled -+@opindex mbarrel-shift-enabled -+Enable barrel-shift instructions. -+ -+@item -mdivide-enabled -+@opindex mdivide-enabled -+Enable divide and modulus instructions. -+ -+@item -mmultiply-enabled -+@opindex multiply-enabled -+Enable multiply instructions. -+ -+@item -msign-extend-enabled -+@opindex msign-extend-enabled -+Enable sign extend instructions. -+ -+@item -muser-enabled -+@opindex muser-enabled -+Enable user-defined instructions. -+ -+@end table -+ - @node M32R/D Options - @subsection M32R/D Options - @cindex M32R/D options -diff -Naur gcc-4.4.5.orig/libgcc/ChangeLog.rtems gcc-4.4.5/libgcc/ChangeLog.rtems ---- gcc-4.4.5.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/libgcc/ChangeLog.rtems 2011-03-01 05:57:30.861524147 +0100 -@@ -0,0 +1,5 @@ -+ Jon Beniston -+ -+ * libgcc/config/lm32/t-elf, libgcc/config/lm32/t-uclinux, -+ libgcc/config/lm32/t-uclinux: New (lm32 port). -+ * libgcc/config.host: Add lm32* targets. -diff -Naur gcc-4.4.5.orig/libgcc/config/lm32/t-elf gcc-4.4.5/libgcc/config/lm32/t-elf ---- gcc-4.4.5.orig/libgcc/config/lm32/t-elf 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/libgcc/config/lm32/t-elf 2011-03-01 05:57:30.861524147 +0100 -@@ -0,0 +1,12 @@ -+# Assemble startup files. -+ -+$(T)crti.o: $(gcc_srcdir)/config/lm32/crti.S $(GCC_PASSES) -+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -+ -c -o $(T)crti.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crti.S -+ -+$(T)crtn.o: $(gcc_srcdir)/config/lm32/crtn.S $(GCC_PASSES) -+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -+ -c -o $(T)crtn.o -x assembler-with-cpp $(gcc_srcdir)/config/lm32/crtn.S -+ -+CRTSTUFF_T_CFLAGS = -G 0 -+TARGET_LIBGCC2_CFLAGS = -G 0 -diff -Naur gcc-4.4.5.orig/libgcc/config/lm32/t-uclinux gcc-4.4.5/libgcc/config/lm32/t-uclinux ---- gcc-4.4.5.orig/libgcc/config/lm32/t-uclinux 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.5/libgcc/config/lm32/t-uclinux 2011-03-01 05:57:30.861524147 +0100 -@@ -0,0 +1,2 @@ -+CRTSTUFF_T_CFLAGS = -fPIC -+TARGET_LIBGCC2_CFLAGS = -fPIC -diff -Naur gcc-4.4.5.orig/libgcc/config.host gcc-4.4.5/libgcc/config.host ---- gcc-4.4.5.orig/libgcc/config.host 2009-04-17 13:58:41.000000000 +0200 -+++ gcc-4.4.5/libgcc/config.host 2011-03-01 05:57:30.862524160 +0100 -@@ -95,6 +95,9 @@ - hppa*-*-*) - cpu_type=pa - ;; -+lm32*-*-*) -+ cpu_type=lm32 -+ ;; - m32r*-*-*) - cpu_type=m32r - ;; -@@ -355,6 +358,14 @@ - ;; - iq2000*-*-elf*) - ;; -+lm32-*-elf* | lm32-*-rtems*) -+ extra_parts="crtbegin.o crtend.o crti.o crtn.o" -+ tmake_file="lm32/t-elf" -+ ;; -+lm32-*-uclinux*) -+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" -+ tmake_file="lm32/t-uclinux" -+ ;; - m32r-*-elf*|m32r-*-rtems*) - ;; - m32rle-*-elf*) -- cgit v1.2.3 From a1bfb335c0cc274513e144da46e203bff29e000b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 1 Sep 2011 18:24:57 +0000 Subject: 2011-09-01 Joel Sherrill PR 1895/cpukit * posix/src/mqueuerecvsupp.c, posix/src/pthreadjoin.c, score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c, score/src/timespectoticks.c: Ensure time conversions to ticks do not ignore partial tick and return 1 less than desired. --- cpukit/ChangeLog | 8 ++++++++ cpukit/posix/src/mqueuerecvsupp.c | 9 ++++++--- cpukit/posix/src/pthreadjoin.c | 21 +++++++++++---------- cpukit/score/src/coretodmsecstoticks.c | 17 +++++++++++++++-- cpukit/score/src/coretodusectoticks.c | 17 +++++++++++++++-- cpukit/score/src/timespectoticks.c | 18 ++++++++++++------ 6 files changed, 67 insertions(+), 23 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 7cd189174a..7ba750ce9b 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,11 @@ +2011-09-01 Joel Sherrill + + PR 1895/cpukit + * posix/src/mqueuerecvsupp.c, posix/src/pthreadjoin.c, + score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c, + score/src/timespectoticks.c: Ensure time conversions to ticks do not + ignore partial tick and return 1 less than desired. + 2011-07-31 Joel Sherrill PR 1855/cpukit diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c index 9c3fb47371..717fef8c9d 100644 --- a/cpukit/posix/src/mqueuerecvsupp.c +++ b/cpukit/posix/src/mqueuerecvsupp.c @@ -11,7 +11,7 @@ * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open * time. * - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -105,8 +105,11 @@ ssize_t _POSIX_Message_queue_Receive_support( ); _Thread_Enable_dispatch(); - *msg_prio = - _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); + if (msg_prio) { + *msg_prio = _POSIX_Message_queue_Priority_from_core( + _Thread_Executing->Wait.count + ); + } if ( !_Thread_Executing->Wait.return_code ) return length_out; diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c index 0b7e103614..38f2389ea4 100644 --- a/cpukit/posix/src/pthreadjoin.c +++ b/cpukit/posix/src/pthreadjoin.c @@ -55,20 +55,21 @@ on_EINTR: if ( the_thread->current_state == (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) ) { - return_pointer = the_thread->Wait.return_argument; - _Thread_Clear_state( - the_thread, - (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) - ); + return_pointer = the_thread->Wait.return_argument; + _Thread_Clear_state( + the_thread, + (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) + ); + _Thread_Enable_dispatch(); } else { - _Thread_Executing->Wait.return_argument = &return_pointer; + _Thread_Executing->Wait.return_argument = &return_pointer; _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); - } - _Thread_Enable_dispatch(); + _Thread_Enable_dispatch(); - if ( _Thread_Executing->Wait.return_code == EINTR ) - goto on_EINTR; + if ( _Thread_Executing->Wait.return_code == EINTR ) + goto on_EINTR; + } if ( value_ptr ) *value_ptr = return_pointer; diff --git a/cpukit/score/src/coretodmsecstoticks.c b/cpukit/score/src/coretodmsecstoticks.c index cddd3d646d..0b6fa6dede 100644 --- a/cpukit/score/src/coretodmsecstoticks.c +++ b/cpukit/score/src/coretodmsecstoticks.c @@ -1,4 +1,4 @@ -/* COPYRIGHT (c) 1989-2008. +/* COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -21,5 +21,18 @@ uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { - return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); + uint32_t ticks; + uint32_t milliseconds_per_tick; + + /** + * We should ensure the ticks not be truncated by integer division. We + * need to have it be greater than or equal to the requested time. It + * should not be shorter. + */ + milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); + ticks = milliseconds / milliseconds_per_tick; + if ( (milliseconds % milliseconds_per_tick) != 0 ) + ticks += 1; + + return ticks; } diff --git a/cpukit/score/src/coretodusectoticks.c b/cpukit/score/src/coretodusectoticks.c index be2cbd7024..b62e15cd27 100644 --- a/cpukit/score/src/coretodusectoticks.c +++ b/cpukit/score/src/coretodusectoticks.c @@ -1,4 +1,4 @@ -/* COPYRIGHT (c) 1989-2008. +/* COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -21,5 +21,18 @@ uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { - return (microseconds / rtems_configuration_get_microseconds_per_tick()); + uint32_t ticks; + uint32_t microseconds_per_tick; + + /** + * We should ensure the ticks not be truncated by integer division. We + * need to have it be greater than or equal to the requested time. It + * should not be shorter. + */ + microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); + ticks = microseconds / microseconds_per_tick; + if ( (microseconds % microseconds_per_tick) != 0 ) + ticks += 1; + + return ticks; } diff --git a/cpukit/score/src/timespectoticks.c b/cpukit/score/src/timespectoticks.c index ddd82e67a7..10d462976b 100644 --- a/cpukit/score/src/timespectoticks.c +++ b/cpukit/score/src/timespectoticks.c @@ -35,16 +35,22 @@ uint32_t _Timespec_To_ticks( ) { uint32_t ticks; + uint32_t nanoseconds_per_tick; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; - ticks = time->tv_sec * TOD_TICKS_PER_SECOND; + /** + * We should ensure the ticks not be truncated by integer division. We + * need to have it be greater than or equal to the requested time. It + * should not be shorter. + */ + ticks = time->tv_sec * TOD_TICKS_PER_SECOND; + nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); + ticks += time->tv_nsec / nanoseconds_per_tick; - ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); + if ( (time->tv_nsec % nanoseconds_per_tick) != 0 ) + ticks += 1; - if (ticks) - return ticks; - - return 1; + return ticks; } -- cgit v1.2.3 From 84019c592b9674f704bd67b3c6a6ab1665bcc611 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 19 Sep 2011 22:42:33 +0000 Subject: Sync with CVS-HEAD. --- contrib/crossrpms/gdb/build.add | 11 ++------- contrib/crossrpms/gdb/gdb.add | 45 ++++++++++++++---------------------- contrib/crossrpms/gdb/install.add | 12 ++++++---- contrib/crossrpms/gdb/target-gdb.add | 1 + 4 files changed, 28 insertions(+), 41 deletions(-) diff --git a/contrib/crossrpms/gdb/build.add b/contrib/crossrpms/gdb/build.add index a60965ff99..ba4478d74c 100644 --- a/contrib/crossrpms/gdb/build.add +++ b/contrib/crossrpms/gdb/build.add @@ -17,16 +17,9 @@ --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/@tool_target@-gdb \ --with-sysroot=%{_prefix}/@tool_target@/sys-root \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ diff --git a/contrib/crossrpms/gdb/gdb.add b/contrib/crossrpms/gdb/gdb.add index 00d666554a..4b4bef829d 100644 --- a/contrib/crossrpms/gdb/gdb.add +++ b/contrib/crossrpms/gdb/gdb.add @@ -12,14 +12,27 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim + +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} %if "@tool_target@" == "powerpc-rtems@rtems_api@" %if "%{_build}" != "%{_host}" # psim doesn't support Cdn-X -%define build_sim --disable-sim +%global build_sim --disable-sim %else -%define build_sim --enable-sim --enable-sim-trace +%global build_sim --enable-sim --enable-sim-trace %endif %endif %if "@tool_target@" == "sparc-rtems@rtems_api@" @@ -53,7 +66,6 @@ BuildRequires: %{_host_rpmprefix}gcc %endif %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -61,40 +73,17 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - %if %build_infos # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 -%endif - -%if %build_infos - Requires: @rpmprefix@gdb-common -%endif +%endif @SOURCES@ %description diff --git a/contrib/crossrpms/gdb/install.add b/contrib/crossrpms/gdb/install.add index 1bdff46101..182c846f5c 100644 --- a/contrib/crossrpms/gdb/install.add +++ b/contrib/crossrpms/gdb/install.add @@ -26,19 +26,23 @@ # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib@tool_target@-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/python +%endif +%endif cd .. diff --git a/contrib/crossrpms/gdb/target-gdb.add b/contrib/crossrpms/gdb/target-gdb.add index 84cb7cf6b6..88789ad854 100644 --- a/contrib/crossrpms/gdb/target-gdb.add +++ b/contrib/crossrpms/gdb/target-gdb.add @@ -15,6 +15,7 @@ GNU gdb targetting @tool_target@. %defattr(-,root,root) %sysdir %{_prefix} %sysdir %{_prefix}/share +%{?with_python:%{_datadir}/@tool_target@-gdb} %sysdir %{_mandir} %sysdir %{_mandir}/man1 -- cgit v1.2.3 From 224463dd16246ec7907ae7637e832ceb11e96b42 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 19 Sep 2011 22:43:38 +0000 Subject: Upgrade to gdb-7.3.1 --- contrib/crossrpms/rtems4.10/bfin/Makefile.am | 4 +- contrib/crossrpms/rtems4.10/bfin/gdb-sources.add | 16 ++++- .../bfin/rtems-4.10-bfin-rtems4.10-gdb.spec | 80 +++++++++++----------- 3 files changed, 55 insertions(+), 45 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/bfin/Makefile.am b/contrib/crossrpms/rtems4.10/bfin/Makefile.am index 84a57ba38f..e5a74cc292 100644 --- a/contrib/crossrpms/rtems4.10/bfin/Makefile.am +++ b/contrib/crossrpms/rtems4.10/bfin/Makefile.am @@ -19,8 +19,8 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` include ../gcc.am GCC_OPTS += --languages=cxx -GDB_VERS = 6.5 +GDB_VERS = 7.3.1 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 12 +GDB_RPMREL = 1 include ../gdb.am GDB_OPTS += --disable-infos diff --git a/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add b/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add index 79f6651c12..c309de489c 100644 --- a/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add +++ b/contrib/crossrpms/rtems4.10/bfin/gdb-sources.add @@ -1,3 +1,13 @@ -Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2 -%{?_without_sources:NoSource: 0} -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-6.5-bfinrtems-20090122.diff +BuildRequires: @rpmprefix@bfin-rtems4.10-binutils +BuildRequires: texinfo + +# The bfin simulator silently tries to conditionally build an SDL based GUI, +# but fails to link correctly +# Force not building the GUI. +%{!?suse:BuildConflicts: SDL-devel} +%{?suse:BuildConflicts: libSDL-devel} + +%if "%{gdb_version}" == "7.3.1" +Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.3.1.tar.bz2 +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.3.1-rtems4.10-20110919.diff +%endif diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec index 197dad3f76..85dba12f95 100644 --- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec @@ -45,24 +45,37 @@ %define _host_rpmprefix %{nil} %endif -%define gdb_version 6.5 -%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)} +%define gdb_version 7.3.1 +%define gdb_rpmvers %{expand:%(echo 7.3.1 | tr - _)} Name: rtems-4.10-bfin-rtems4.10-gdb Summary: Gdb for target bfin-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 12%{?dist} +Release: 1%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -70,34 +83,23 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - +BuildRequires: rtems-4.10-bfin-rtems4.10-binutils +BuildRequires: texinfo +# The bfin simulator silently tries to conditionally build an SDL based GUI, +# but fails to link correctly +# Force not building the GUI. +%{!?suse:BuildConflicts: SDL-devel} +%{?suse:BuildConflicts: libSDL-devel} -Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2 -%{?_without_sources:NoSource: 0} -Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-6.5-bfinrtems-20090122.diff +%if "%{gdb_version}" == "7.3.1" +Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-7.3.1.tar.bz2 +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-7.3.1-rtems4.10-20110919.diff +%endif %description GDB for target bfin-rtems4.10 @@ -128,16 +130,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/bfin-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -161,20 +156,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libbfin-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -225,6 +224,7 @@ GNU gdb targetting bfin-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/bfin-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 -- cgit v1.2.3 From 234e2806053b77398e31fac859f9cf4ae90274eb Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 19 Sep 2011 22:44:36 +0000 Subject: Renamer from CVS-HEAD. --- .../patches/gdb-7.3.1-rtems4.10-20110919.diff | 586 +++++++++++++++++++++ 1 file changed, 586 insertions(+) create mode 100644 contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff diff --git a/contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff b/contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff new file mode 100644 index 0000000000..0a201a586a --- /dev/null +++ b/contrib/crossrpms/patches/gdb-7.3.1-rtems4.10-20110919.diff @@ -0,0 +1,586 @@ +diff -Naur gdb-7.3.1.orig/gdb/lm32-tdep.c gdb-7.3.1/gdb/lm32-tdep.c +--- gdb-7.3.1.orig/gdb/lm32-tdep.c 2011-03-18 19:52:30.000000000 +0100 ++++ gdb-7.3.1/gdb/lm32-tdep.c 2011-09-05 05:15:58.049769734 +0200 +@@ -35,7 +35,7 @@ + #include "regcache.h" + #include "trad-frame.h" + #include "reggroups.h" +-#include "opcodes/lm32-desc.h" ++#include "../opcodes/lm32-desc.h" + + #include "gdb_string.h" + +diff -Naur gdb-7.3.1.orig/gdb/sparc-tdep.c gdb-7.3.1/gdb/sparc-tdep.c +--- gdb-7.3.1.orig/gdb/sparc-tdep.c 2011-03-18 19:52:32.000000000 +0100 ++++ gdb-7.3.1/gdb/sparc-tdep.c 2011-09-05 05:15:58.049769734 +0200 +@@ -1117,7 +1117,7 @@ + sparc32_store_return_value (struct type *type, struct regcache *regcache, + const gdb_byte *valbuf) + { +- int len = TYPE_LENGTH (type); ++ size_t len = TYPE_LENGTH (type); + gdb_byte buf[8]; + + gdb_assert (!sparc_structure_or_union_p (type)); +diff -Naur gdb-7.3.1.orig/sim/common/gentmap.c gdb-7.3.1/sim/common/gentmap.c +--- gdb-7.3.1.orig/sim/common/gentmap.c 2006-11-07 20:29:59.000000000 +0100 ++++ gdb-7.3.1/sim/common/gentmap.c 2011-09-05 05:15:58.064769977 +0200 +@@ -2,6 +2,7 @@ + + #include + #include ++#include + + struct tdefs { + char *symbol; +diff -Naur gdb-7.3.1.orig/sim/erc32/configure gdb-7.3.1/sim/erc32/configure +--- gdb-7.3.1.orig/sim/erc32/configure 2010-01-09 22:11:39.000000000 +0100 ++++ gdb-7.3.1/sim/erc32/configure 2011-09-05 05:15:58.075770156 +0200 +@@ -591,8 +591,9 @@ + ac_subst_vars='LTLIBOBJS + LIBOBJS + cgen_breaks ++READLINE_CFLAGS ++READLINE_DEPS + READLINE +-TERMCAP + REPORT_BUGS_TEXI + REPORT_BUGS_TO + PKGVERSION +@@ -716,6 +717,7 @@ + enable_sim_profile + with_pkgversion + with_bugurl ++with_system_readline + ' + ac_precious_vars='build_alias + host_alias +@@ -1358,6 +1360,7 @@ + --with-zlib include zlib support (auto/yes/no) default=auto + --with-pkgversion=PKG Use PKG in the version string in place of "GDB" + --with-bugurl=URL Direct users to URL to report a bug ++ --with-system-readline use installed readline library + + Some influential environment variables: + CC C compiler command +@@ -2416,7 +2419,6 @@ + + + +- + # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around + # it by inlining the macro's contents. + # This file contains common code used by all simulators. +@@ -2916,18 +2918,18 @@ + int + main () + { +- ++return 0; + ; + return 0; + } + _ACEOF + ac_clean_files_save=$ac_clean_files +-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" ++ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +-$as_echo_n "checking for C compiler default output file name... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 ++$as_echo_n "checking whether the C compiler works... " >&6; } + ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + + # The possible output files: +@@ -2989,10 +2991,10 @@ + else + ac_file='' + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +-$as_echo "$ac_file" >&6; } + if test -z "$ac_file"; then : +- $as_echo "$as_me: failed program was:" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +@@ -3000,51 +3002,18 @@ + { as_fn_set_status 77 + as_fn_error "C compiler cannot create executables + See \`config.log' for more details." "$LINENO" 5; }; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 ++$as_echo_n "checking for C compiler default output file name... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 ++$as_echo "$ac_file" >&6; } + ac_exeext=$ac_cv_exeext + +-# Check that the compiler produces executables we can run. If not, either +-# the compiler is broken, or we cross compile. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +-$as_echo_n "checking whether the C compiler works... " >&6; } +-# If not cross compiling, check that we can run a simple program. +-if test "$cross_compiling" != yes; then +- if { ac_try='./$ac_file' +- { { case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +-$as_echo "$ac_try_echo"; } >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; }; then +- cross_compiling=no +- else +- if test "$cross_compiling" = maybe; then +- cross_compiling=yes +- else +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot run C compiled programs. +-If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." "$LINENO" 5; } +- fi +- fi +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save +-# Check that the compiler produces executables we can run. If not, either +-# the compiler is broken, or we cross compile. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +-$as_echo_n "checking whether we are cross compiling... " >&6; } +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +-$as_echo "$cross_compiling" >&6; } +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 + $as_echo_n "checking for suffix of executables... " >&6; } + if { { ac_try="$ac_link" +@@ -3084,6 +3053,63 @@ + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++ac_clean_files="$ac_clean_files conftest.out" ++# Check that the compiler produces executables we can run. If not, either ++# the compiler is broken, or we cross compile. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 ++$as_echo_n "checking whether we are cross compiling... " >&6; } ++if test "$cross_compiling" != yes; then ++ { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if { ac_try='./conftest$ac_cv_exeext' ++ { { case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then ++ cross_compiling=no ++ else ++ if test "$cross_compiling" = maybe; then ++ cross_compiling=yes ++ else ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "cannot run C compiled programs. ++If you meant to cross compile, use \`--host'. ++See \`config.log' for more details." "$LINENO" 5; } ++ fi ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 ++$as_echo "$cross_compiling" >&6; } ++ ++rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ++ac_clean_files=$ac_clean_files_save + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 + $as_echo_n "checking for suffix of object files... " >&6; } + if test "${ac_cv_objext+set}" = set; then : +@@ -4532,86 +4558,41 @@ + done + + +-# In the Cygwin environment, we need some additional flags. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 +-$as_echo_n "checking for cygwin... " >&6; } +-if test "${sim_cv_os_cygwin+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#ifdef __CYGWIN__ +-lose +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "lose" >/dev/null 2>&1; then : +- sim_cv_os_cygwin=yes +-else +- sim_cv_os_cygwin=no ++# Check whether --with-system-readline was given. ++if test "${with_system_readline+set}" = set; then : ++ withval=$with_system_readline; + fi +-rm -f conftest* + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5 +-$as_echo "$sim_cv_os_cygwin" >&6; } + +-if test x$sim_cv_os_cygwin = xyes; then +- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5 +-$as_echo_n "checking for main in -ltermcap... " >&6; } +-if test "${ac_cv_lib_termcap_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-ltermcap $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++if test "$with_system_readline" = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5 ++$as_echo_n "checking for readline... " >&6; } ++ save_LIBS="$LIBS" ++ LIBS="-lreadline $save_LIBS" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char add_history (); + int + main () + { +-return main (); ++return add_history (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_termcap_main=yes +-else +- ac_cv_lib_termcap_main=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5 +-$as_echo "$ac_cv_lib_termcap_main" >&6; } +-if test "x$ac_cv_lib_termcap_main" = x""yes; then : +- TERMCAP=-ltermcap +-else +- TERMCAP="" +-fi +- +-fi +- +- +-# We prefer the in-tree readline. Top-level dependencies make sure +-# src/readline (if it's there) is configured before src/sim. +-if test -r ../../readline/Makefile; then +- READLINE=../../readline/libreadline.a +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 +-$as_echo_n "checking for readline in -lreadline... " >&6; } +-if test "${ac_cv_lib_readline_readline+set}" = set; then : +- $as_echo_n "(cached) " >&6 ++ READLINE=-lreadline + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lreadline $TERMCAP $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ LIBS="-lreadline -lncurses $save_LIBS" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -4620,33 +4601,39 @@ + #ifdef __cplusplus + extern "C" + #endif +-char readline (); ++char add_history (); + int + main () + { +-return readline (); ++return add_history (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_readline_readline=yes ++ READLINE="-lreadline -lncurses" + else +- ac_cv_lib_readline_readline=no ++ as_fn_error "unable to detect readline" "$LINENO" 5 + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 +-$as_echo "$ac_cv_lib_readline_readline" >&6; } +-if test "x$ac_cv_lib_readline_readline" = x""yes; then : +- READLINE=-lreadline +-else +- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5 ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ LIBS="$save_LIBS" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5 ++$as_echo "$READLINE" >&6; } ++ READLINE_DEPS= ++ READLINE_CFLAGS= ++else ++ READLINE='../../readline/libreadline.a -lncurses' ++ READLINE_DEPS='$(READLINE)' ++ READLINE_CFLAGS='-I$(READLINE_SRC)/..' + fi + +-fi ++ ++ + + + ac_sources="$sim_link_files" +diff -Naur gdb-7.3.1.orig/sim/erc32/configure.ac gdb-7.3.1/sim/erc32/configure.ac +--- gdb-7.3.1.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100 ++++ gdb-7.3.1/sim/erc32/configure.ac 2011-09-05 05:15:58.075770156 +0200 +@@ -11,27 +11,32 @@ + + AC_CHECK_HEADERS(stdlib.h) + +-# In the Cygwin environment, we need some additional flags. +-AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, +-[AC_EGREP_CPP(lose, [ +-#ifdef __CYGWIN__ +-lose +-#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) ++AC_ARG_WITH([system-readline], ++ [AS_HELP_STRING([--with-system-readline], ++ [use installed readline library])]) + +-if test x$sim_cv_os_cygwin = xyes; then +- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' ++if test "$with_system_readline" = yes; then ++ AC_MSG_CHECKING([for readline]) ++ save_LIBS="$LIBS" ++ LIBS="-lreadline $save_LIBS" ++ AC_LINK_IFELSE([AC_LANG_CALL([], ++ [add_history])], [READLINE=-lreadline], ++ [ LIBS="-lreadline -lncurses $save_LIBS" ++ AC_LINK_IFELSE([AC_LANG_CALL([], ++ [add_history])], [READLINE="-lreadline -lncurses"], ++ [AC_MSG_ERROR([unable to detect readline])]) ++ ]) ++ LIBS="$save_LIBS" ++ AC_MSG_RESULT($READLINE) ++ READLINE_DEPS= ++ READLINE_CFLAGS= + else +- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="") +-fi +-AC_SUBST(TERMCAP) +- +-# We prefer the in-tree readline. Top-level dependencies make sure +-# src/readline (if it's there) is configured before src/sim. +-if test -r ../../readline/Makefile; then +- READLINE=../../readline/libreadline.a +-else +- AC_CHECK_LIB(readline, readline, READLINE=-lreadline, +- AC_ERROR([the required "readline" library is missing]), $TERMCAP) ++ READLINE='../../readline/libreadline.a -lncurses' ++ READLINE_DEPS='$(READLINE)' ++ READLINE_CFLAGS='-I$(READLINE_SRC)/..' + fi + AC_SUBST(READLINE) ++AC_SUBST(READLINE_DEPS) ++AC_SUBST(READLINE_CFLAGS) ++ + SIM_AC_OUTPUT +diff -Naur gdb-7.3.1.orig/sim/erc32/erc32.c gdb-7.3.1/sim/erc32/erc32.c +--- gdb-7.3.1.orig/sim/erc32/erc32.c 2010-05-11 16:18:20.000000000 +0200 ++++ gdb-7.3.1/sim/erc32/erc32.c 2011-09-05 05:15:58.076770172 +0200 +@@ -414,7 +414,7 @@ + if (rom8) mec_memcfg &= ~0x20000; + else mec_memcfg |= 0x20000; + +- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7); ++ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7); + mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7); + + if (sparclite_board) { +diff -Naur gdb-7.3.1.orig/sim/erc32/Makefile.in gdb-7.3.1/sim/erc32/Makefile.in +--- gdb-7.3.1.orig/sim/erc32/Makefile.in 2011-01-01 16:33:58.000000000 +0100 ++++ gdb-7.3.1/sim/erc32/Makefile.in 2011-09-05 05:15:58.076770172 +0200 +@@ -19,12 +19,12 @@ + + ## COMMON_PRE_CONFIG_FRAG + +-TERMCAP_LIB = @TERMCAP@ ++# TERMCAP_LIB = -lncurses + READLINE_LIB = @READLINE@ + + SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o + SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm +-SIM_EXTRA_ALL = sis ++SIM_EXTRA_ALL = sis$(EXEEXT) + SIM_EXTRA_INSTALL = install-sis + SIM_EXTRA_CLEAN = clean-sis + +@@ -38,8 +38,8 @@ + # `sis' doesn't need interf.o. + SIS_OFILES = exec.o erc32.o func.o help.o float.o + +-sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS) +- $(CC) $(ALL_CFLAGS) -o sis \ ++sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS) ++ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \ + sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS) + + # FIXME: This computes the build host's endianness, doesn't it? +@@ -52,11 +52,11 @@ + + # Copy the files into directories where they will be run. + install-sis: installdirs +- n=`echo sis | sed '$(program_transform_name)'`; \ +- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) ++ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \ ++ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n + + clean-sis: +- rm -f sis end end.h ++ rm -f sis$(EXEEXT) end end.h + + configure: + @echo "Rebuilding configure..." +diff -Naur gdb-7.3.1.orig/sim/h8300/compile.c gdb-7.3.1/sim/h8300/compile.c +--- gdb-7.3.1.orig/sim/h8300/compile.c 2011-01-11 15:19:32.000000000 +0100 ++++ gdb-7.3.1/sim/h8300/compile.c 2011-09-05 05:15:58.085770319 +0200 +@@ -38,6 +38,12 @@ + # define SIGTRAP 5 + #endif + ++#ifdef _WIN32 ++#ifndef SIGBUS ++#define SIGBUS 10 ++#endif ++#endif ++ + int debug; + + host_callback *sim_callback; +diff -Naur gdb-7.3.1.orig/sim/m32c/Makefile.in gdb-7.3.1/sim/m32c/Makefile.in +--- gdb-7.3.1.orig/sim/m32c/Makefile.in 2011-01-01 16:34:01.000000000 +0100 ++++ gdb-7.3.1/sim/m32c/Makefile.in 2011-09-05 05:15:58.098770530 +0200 +@@ -56,7 +56,7 @@ + ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c + + opc2c : opc2c.o safe-fgets.o +- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ -o $@ $(BUILD_LIBS) ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@ $(BUILD_LIBS) + + sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld + ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o +@@ -90,8 +90,8 @@ + r8c.o : cpu.h mem.h misc.h int.h + + opc2c.o : opc2c.c safe-fgets.h +- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/opc2c.c ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c + + safe-fgets.o : safe-fgets.c safe-fgets.h +- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/safe-fgets.c ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c + +diff -Naur gdb-7.3.1.orig/sim/ppc/device.c gdb-7.3.1/sim/ppc/device.c +--- gdb-7.3.1.orig/sim/ppc/device.c 2011-02-14 06:14:27.000000000 +0100 ++++ gdb-7.3.1/sim/ppc/device.c 2011-09-05 05:15:58.112770758 +0200 +@@ -1816,7 +1816,7 @@ + /* I/O */ + + EXTERN_DEVICE\ +-(void volatile) ++(void) + device_error(device *me, + const char *fmt, + ...) +diff -Naur gdb-7.3.1.orig/sim/ppc/device.h gdb-7.3.1/sim/ppc/device.h +--- gdb-7.3.1.orig/sim/ppc/device.h 2001-12-14 01:22:12.000000000 +0100 ++++ gdb-7.3.1/sim/ppc/device.h 2011-09-05 05:15:58.112770758 +0200 +@@ -727,7 +727,7 @@ + */ + + EXTERN_DEVICE\ +-(void volatile) device_error ++(void) device_error + (device *me, + const char *fmt, + ...) __attribute__ ((format (printf, 2, 3))); +diff -Naur gdb-7.3.1.orig/sim/ppc/hw_glue.c gdb-7.3.1/sim/ppc/hw_glue.c +--- gdb-7.3.1.orig/sim/ppc/hw_glue.c 1999-04-16 03:35:09.000000000 +0200 ++++ gdb-7.3.1/sim/ppc/hw_glue.c 2011-09-05 05:15:58.112770758 +0200 +@@ -194,13 +194,13 @@ + if (glue->sizeof_output == 0) + device_error(me, "at least one reg property size must be nonzero"); + if (glue->sizeof_output % sizeof(unsigned_word) != 0) +- device_error(me, "reg property size must be %d aligned", sizeof(unsigned_word)); ++ device_error(me, "reg property size must be %zd aligned", sizeof(unsigned_word)); + /* and the address */ + device_address_to_attach_address(device_parent(me), + &unit.address, &glue->space, &glue->address, + me); + if (glue->address % (sizeof(unsigned_word) * max_nr_interrupts) != 0) +- device_error(me, "reg property address must be %d aligned", ++ device_error(me, "reg property address must be %zd aligned", + sizeof(unsigned_word) * max_nr_interrupts); + glue->nr_outputs = glue->sizeof_output / sizeof(unsigned_word); + glue->output = zalloc(glue->sizeof_output); -- cgit v1.2.3 From 9b0be4d6d7d389b0517021a40a48c30dcd6a80cb Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 19 Sep 2011 22:45:24 +0000 Subject: Bump GDB_RPMREL. --- contrib/crossrpms/rtems4.10/arm/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/avr/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/h8300/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/i386/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/lm32/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m32c/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m32r/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m68k/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/mips/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/mipstx39/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/powerpc/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/sh/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/sparc/Makefile.am | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/Makefile.am b/contrib/crossrpms/rtems4.10/arm/Makefile.am index a6e1089f37..1be9c90095 100644 --- a/contrib/crossrpms/rtems4.10/arm/Makefile.am +++ b/contrib/crossrpms/rtems4.10/arm/Makefile.am @@ -22,6 +22,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/avr/Makefile.am b/contrib/crossrpms/rtems4.10/avr/Makefile.am index 058582304d..c62829d251 100644 --- a/contrib/crossrpms/rtems4.10/avr/Makefile.am +++ b/contrib/crossrpms/rtems4.10/avr/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/h8300/Makefile.am b/contrib/crossrpms/rtems4.10/h8300/Makefile.am index 7fee4c05d8..16e49df29d 100644 --- a/contrib/crossrpms/rtems4.10/h8300/Makefile.am +++ b/contrib/crossrpms/rtems4.10/h8300/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/i386/Makefile.am b/contrib/crossrpms/rtems4.10/i386/Makefile.am index 3f6d00b8c4..286f6e8a69 100644 --- a/contrib/crossrpms/rtems4.10/i386/Makefile.am +++ b/contrib/crossrpms/rtems4.10/i386/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/lm32/Makefile.am b/contrib/crossrpms/rtems4.10/lm32/Makefile.am index 7e1ceb088a..2bb6b5f6dc 100644 --- a/contrib/crossrpms/rtems4.10/lm32/Makefile.am +++ b/contrib/crossrpms/rtems4.10/lm32/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/m32c/Makefile.am b/contrib/crossrpms/rtems4.10/m32c/Makefile.am index 61edccee7a..1a34bbbd30 100644 --- a/contrib/crossrpms/rtems4.10/m32c/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m32c/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/m32r/Makefile.am b/contrib/crossrpms/rtems4.10/m32r/Makefile.am index 6fecabb60e..9e4c353008 100644 --- a/contrib/crossrpms/rtems4.10/m32r/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m32r/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/m68k/Makefile.am b/contrib/crossrpms/rtems4.10/m68k/Makefile.am index 973b81f850..019438205b 100644 --- a/contrib/crossrpms/rtems4.10/m68k/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m68k/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/mips/Makefile.am b/contrib/crossrpms/rtems4.10/mips/Makefile.am index 2a719e0537..f056672fda 100644 --- a/contrib/crossrpms/rtems4.10/mips/Makefile.am +++ b/contrib/crossrpms/rtems4.10/mips/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am b/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am index 2afe5638b2..ec9cbd1706 100644 --- a/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am +++ b/contrib/crossrpms/rtems4.10/mipstx39/Makefile.am @@ -7,6 +7,6 @@ include $(top_srcdir)/mkspec.am # We only want a gdb with a tx39 simulator in it. We share the other tools GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am index f96869441c..f7b76d97c5 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am +++ b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/sh/Makefile.am b/contrib/crossrpms/rtems4.10/sh/Makefile.am index 0336f69268..727edaaef1 100644 --- a/contrib/crossrpms/rtems4.10/sh/Makefile.am +++ b/contrib/crossrpms/rtems4.10/sh/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += diff --git a/contrib/crossrpms/rtems4.10/sparc/Makefile.am b/contrib/crossrpms/rtems4.10/sparc/Makefile.am index 3ade84a16d..a6938b0972 100644 --- a/contrib/crossrpms/rtems4.10/sparc/Makefile.am +++ b/contrib/crossrpms/rtems4.10/sparc/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.2 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += -- cgit v1.2.3 From 981a831e72385f50b980c3334572e754b1b0e46b Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 19 Sep 2011 22:45:55 +0000 Subject: Regenerate. --- .../arm/rtems-4.10-arm-rtems4.10-gdb.spec | 65 +++++++++------------ .../avr/rtems-4.10-avr-rtems4.10-gdb.spec | 65 +++++++++------------ .../h8300/rtems-4.10-h8300-rtems4.10-gdb.spec | 65 +++++++++------------ .../i386/rtems-4.10-i386-rtems4.10-gdb.spec | 65 +++++++++------------ .../lm32/rtems-4.10-lm32-rtems4.10-gdb.spec | 65 +++++++++------------ .../m32c/rtems-4.10-m32c-rtems4.10-gdb.spec | 65 +++++++++------------ .../m32r/rtems-4.10-m32r-rtems4.10-gdb.spec | 65 +++++++++------------ .../m68k/rtems-4.10-m68k-rtems4.10-gdb.spec | 65 +++++++++------------ .../mips/rtems-4.10-mips-rtems4.10-gdb.spec | 65 +++++++++------------ .../rtems-4.10-mipstx39-rtems4.10-gdb.spec | 65 +++++++++------------ .../powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec | 67 +++++++++------------- .../rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec | 65 +++++++++------------ .../sparc/rtems-4.10-sparc-rtems4.10-gdb.spec | 65 +++++++++------------ 13 files changed, 352 insertions(+), 495 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec index acfc61b455..421e6ca09b 100644 --- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-arm-rtems4.10-gdb Summary: Gdb for target arm-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/arm-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libarm-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting arm-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/arm-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec index f9b7a33591..b5264d6b0d 100644 --- a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-avr-rtems4.10-gdb Summary: Gdb for target avr-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/avr-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libavr-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting avr-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/avr-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec index 0510a37a86..6a6d8425cd 100644 --- a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gdb.spec @@ -52,22 +52,34 @@ Name: rtems-4.10-h8300-rtems4.10-gdb Summary: Gdb for target h8300-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace %ifos mingw mingw32 # Mingw lacks functions required by the h8300 simulator %define build_sim --disable-sim %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -75,34 +87,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -144,16 +135,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/h8300-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -183,20 +167,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libh8300-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -247,6 +235,7 @@ GNU gdb targetting h8300-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/h8300-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec index 2c9afea19b..e8c9584c63 100644 --- a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-i386-rtems4.10-gdb Summary: Gdb for target i386-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/i386-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libi386-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting i386-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/i386-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec index 090bbf58b8..f9ac6c0479 100644 --- a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gdb.spec @@ -52,22 +52,34 @@ Name: rtems-4.10-lm32-rtems4.10-gdb Summary: Gdb for target lm32-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace %ifos mingw mingw32 # Mingw lacks functions required by the lm32 simulator %define build_sim --disable-sim %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -75,34 +87,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -144,16 +135,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/lm32-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -183,20 +167,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/liblm32-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -247,6 +235,7 @@ GNU gdb targetting lm32-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/lm32-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec index d518c8fc29..47d6a136c9 100644 --- a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec @@ -52,22 +52,34 @@ Name: rtems-4.10-m32c-rtems4.10-gdb Summary: Gdb for target m32c-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace %ifos mingw mingw32 # Mingw lacks functions required by the m32c simulator %define build_sim --disable-sim %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -75,34 +87,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -144,16 +135,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/m32c-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -183,20 +167,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm32c-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -247,6 +235,7 @@ GNU gdb targetting m32c-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/m32c-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec index 8396af614e..321356912a 100644 --- a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-m32r-rtems4.10-gdb Summary: Gdb for target m32r-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/m32r-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm32r-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting m32r-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/m32r-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec index 529cc8229a..2708f303f6 100644 --- a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-m68k-rtems4.10-gdb Summary: Gdb for target m68k-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/m68k-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm68k-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting m68k-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/m68k-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec index 841f60a3f4..caa2ac35d6 100644 --- a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-mips-rtems4.10-gdb Summary: Gdb for target mips-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/mips-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmips-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting mips-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/mips-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec index be26d60a71..3d9df4fb26 100644 --- a/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/mipstx39/rtems-4.10-mipstx39-rtems4.10-gdb.spec @@ -52,22 +52,34 @@ Name: rtems-4.10-mipstx39-rtems4.10-gdb Summary: Gdb for target mipstx39-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace %ifos mingw mingw32 # Mingw lacks functions required by the mipstx39 simulator %define build_sim --disable-sim %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -75,34 +87,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -144,16 +135,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/mipstx39-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -183,20 +167,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmipstx39-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -247,6 +235,7 @@ GNU gdb targetting mipstx39-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/mipstx39-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec index a89978fd0a..5f8f40b60e 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec @@ -52,23 +52,35 @@ Name: rtems-4.10-powerpc-rtems4.10-gdb Summary: Gdb for target powerpc-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim + +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} %if "%{_build}" != "%{_host}" # psim doesn't support Cdn-X -%define build_sim --disable-sim +%global build_sim --disable-sim %else -%define build_sim --enable-sim --enable-sim-trace +%global build_sim --enable-sim --enable-sim-trace %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -76,34 +88,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -145,16 +136,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/powerpc-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -184,20 +168,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libpowerpc-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -248,6 +236,7 @@ GNU gdb targetting powerpc-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/powerpc-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec index 4a013c986e..ee7a66162f 100644 --- a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-sh-rtems4.10-gdb Summary: Gdb for target sh-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/sh-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsh-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting sh-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/sh-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 diff --git a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec index 4e16ee826b..05a2e1dcf5 100644 --- a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gdb.spec @@ -52,22 +52,34 @@ Name: rtems-4.10-sparc-rtems4.10-gdb Summary: Gdb for target sparc-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# Whether to build against system readline +# Default: yes +%bcond_without system_readline + +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%bcond_without python +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + +%global build_sim --enable-sim --enable-sim-trace %ifos mingw mingw32 # Mingw lacks functions required by the sparc simulator %define build_sim --disable-sim %endif -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -75,34 +87,13 @@ BuildRequires: libexpat-devel # Fedora/CentOS/Cygwin/MinGW BuildRequires: %{_host_rpmprefix}expat-devel %endif -%endif -%if "%{gdb_version}" < "6.7" -%if "%{_build}" != "%{_host}" -BuildRequires: %{_host_rpmprefix}termcap-devel -%endif -%bcond_with system_readline -%else -%bcond_without system_readline -%endif %{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel} BuildRequires: %{_host_rpmprefix}ncurses-devel -%if "%{gdb_version}" >= "6.8.50" -%if "%{_build}" != "%{_host}" -# Can't build python Cdn-X -%bcond_with python -%else -%bcond_without python -%endif -%endif -%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -144,16 +135,9 @@ cd .. --disable-werror \ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ -%if "%{gdb_version}" >= "6.6" --with-expat \ -%endif -%if "%{gdb_version}" >= "6.8.50" -%if %{with python} - --with-python \ -%else - --without-python \ -%endif -%endif + %{?with_python:--with-python}%{!?with_python:--without-python} \ + --with-gdb-datadir=%{_datadir}/sparc-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -183,20 +167,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsparc-rtems4.10-sim.a -%if "%{gdb_version}" >= "7.0" # Bug in gdb-7.0, bogusly installs linux-only files somethinguseful=0 - for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do + for f in ${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.10-gdb/syscalls/*.xml; do case $f in *linux.xml) rm -f $f;; *.xml) somethinguseful=1;; esac done if test $somethinguseful -eq 0; then - rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls" + rm -rf "${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.10-gdb/syscalls" fi -%endif +%if "{gdb_version}" >= "7.3" +%if ! %{with python} +# gdb-7.3 doesn't honor --without-python correctly + rm -rf ${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -247,6 +235,7 @@ GNU gdb targetting sparc-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/sparc-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 -- cgit v1.2.3 From 424b1bddeb3b5a2f69ef8fc9e05320fe6c739e54 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sun, 9 Oct 2011 04:48:19 +0000 Subject: =?UTF-8?q?2011-10-09=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libmisc/serdbg/serdbg.h (putDebugChar, getDebugChar): Remove duplicate decls. --- cpukit/ChangeLog | 5 +++++ cpukit/libmisc/serdbg/serdbg.h | 36 ------------------------------------ 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 7ba750ce9b..53561686a8 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2011-10-09 Ralf Corsépius + + * libmisc/serdbg/serdbg.h (putDebugChar, getDebugChar): + Remove duplicate decls. + 2011-09-01 Joel Sherrill PR 1895/cpukit diff --git a/cpukit/libmisc/serdbg/serdbg.h b/cpukit/libmisc/serdbg/serdbg.h index 375b03b5d5..c6d26d0260 100644 --- a/cpukit/libmisc/serdbg/serdbg.h +++ b/cpukit/libmisc/serdbg/serdbg.h @@ -139,42 +139,6 @@ int serdbg_open | 0 on success, -1 and errno otherwise | \*=========================================================================*/ -/*=========================================================================*\ -| Function: | -\*-------------------------------------------------------------------------*/ -void putDebugChar -/*-------------------------------------------------------------------------*\ -| Purpose: | -| send one character to serial port | -+---------------------------------------------------------------------------+ -| Input Parameters: | -\*-------------------------------------------------------------------------*/ -( - char c /* character to print */ - ); -/*-------------------------------------------------------------------------*\ -| Return Value: | -| | -\*=========================================================================*/ - -/*=========================================================================*\ -| Function: | -\*-------------------------------------------------------------------------*/ -int getDebugChar -/*-------------------------------------------------------------------------*\ -| Purpose: | -| wait for one character from serial port | -+---------------------------------------------------------------------------+ -| Input Parameters: | -\*-------------------------------------------------------------------------*/ -( - void /* none */ - ); -/*-------------------------------------------------------------------------*\ -| Return Value: | -| received character | -\*=========================================================================*/ - /* * Assumed to be provided by the BSP */ -- cgit v1.2.3 From 478fb7eb99b17e320a8e7eade62d6a2128e58341 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 31 Oct 2011 08:08:47 +0000 Subject: GDB_RPMREL = 2. --- contrib/crossrpms/rtems4.10/bfin/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/bfin/Makefile.am b/contrib/crossrpms/rtems4.10/bfin/Makefile.am index e5a74cc292..78333b62b1 100644 --- a/contrib/crossrpms/rtems4.10/bfin/Makefile.am +++ b/contrib/crossrpms/rtems4.10/bfin/Makefile.am @@ -21,6 +21,6 @@ GCC_OPTS += --languages=cxx GDB_VERS = 7.3.1 GDB_PKGVERS = $(GDB_VERS) -GDB_RPMREL = 1 +GDB_RPMREL = 2 include ../gdb.am GDB_OPTS += --disable-infos diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec index 85dba12f95..83d37da7e8 100644 --- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec @@ -52,7 +52,7 @@ Name: rtems-4.10-bfin-rtems4.10-gdb Summary: Gdb for target bfin-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -- cgit v1.2.3 From 4c5e2fcf7e6e5df37670c50d6cd7cb0f12f5908a Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 3 Nov 2011 04:23:07 +0000 Subject: 2011-11-03 Chris Johns PR 1948/filesystem * libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-rtems.c: Add support for mount passing an ASCIIZ string containing configuration options. * libblock/src/bdbuf.c: Fix state labels in trace output. --- cpukit/ChangeLog | 10 ++++++++ cpukit/libblock/src/bdbuf.c | 2 +- cpukit/libfs/src/rfs/rtems-rfs-file-system.c | 3 ++- cpukit/libfs/src/rfs/rtems-rfs-file-system.h | 3 +++ cpukit/libfs/src/rfs/rtems-rfs-format.c | 4 +++- cpukit/libfs/src/rfs/rtems-rfs-rtems.c | 34 +++++++++++++++++++++++++++- 6 files changed, 52 insertions(+), 4 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 53561686a8..e687eedddf 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,13 @@ +2011-11-03 Chris Johns + + PR 1948/filesystem + * libfs/src/rfs/rtems-rfs-file-system.c, + libfs/src/rfs/rtems-rfs-file-system.h, + libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-rtems.c: + Add support for mount passing an ASCIIZ string containing + configuration options. + * libblock/src/bdbuf.c: Fix state labels in trace output. + 2011-10-09 Ralf Corsépius * libmisc/serdbg/serdbg.h (putDebugChar, getDebugChar): diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c index ce579d3730..2c972db882 100644 --- a/cpukit/libblock/src/bdbuf.c +++ b/cpukit/libblock/src/bdbuf.c @@ -291,7 +291,7 @@ void rtems_bdbuf_show_users (const char* where, rtems_bdbuf_buffer* bd) { const char* states[] = - { "EM", "FR", "CH", "AC", "AM", "MD", "SY", "TR" }; + { "FR", "EM", "CH", "AC", "AM", "MD", "SY", "TR" }; printf ("bdbuf:users: %15s: [%" PRIu32 " (%s)] %td:%td = %" PRIu32 " %s\n", where, diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file-system.c b/cpukit/libfs/src/rfs/rtems-rfs-file-system.c index c972e13247..b739ea1ba8 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-file-system.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-file-system.c @@ -196,6 +196,7 @@ int rtems_rfs_fs_open (const char* name, void* user, uint32_t flags, + uint32_t max_held_buffers, rtems_rfs_file_system** fs) { rtems_rfs_group* group; @@ -224,7 +225,7 @@ rtems_rfs_fs_open (const char* name, rtems_chain_initialize_empty (&(*fs)->release_modified); rtems_chain_initialize_empty (&(*fs)->file_shares); - (*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS; + (*fs)->max_held_buffers = max_held_buffers; (*fs)->buffers_count = 0; (*fs)->release_count = 0; (*fs)->release_modified_count = 0; diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h index 9ca0e4754f..0ceade228e 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h @@ -384,11 +384,14 @@ uint64_t rtems_rfs_fs_media_size (rtems_rfs_file_system* fs); * @param name The device to open. * @param fs The file system data filled in by this call. * @param user A pointer to user data. + * @param flags The initial set of user flags for the file system. + * @param max_held_buffers The maximum number of buffers the RFS holds. * @return int The error number (errno). No error if 0. */ int rtems_rfs_fs_open (const char* name, void* user, uint32_t flags, + uint32_t max_held_buffers, rtems_rfs_file_system** fs); /** diff --git a/cpukit/libfs/src/rfs/rtems-rfs-format.c b/cpukit/libfs/src/rfs/rtems-rfs-format.c index 8199466bfb..77aa02c0cd 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-format.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-format.c @@ -465,7 +465,9 @@ rtems_rfs_write_root_dir (const char* name) /* * External API so returns -1. */ - rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs); + rc = rtems_rfs_fs_open (name, NULL, + RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE, + 0, &fs); if (rc < 0) { printf ("rtems-rfs: format: file system open failed: %d: %s\n", diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c index ac9ae4abdd..26b57ff062 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c @@ -1268,8 +1268,40 @@ rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry, { rtems_rfs_rtems_private* rtems; rtems_rfs_file_system* fs; + uint32_t flags = 0; + uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS; + const char* options = data; int rc; + /* + * Parse the options the user specifiies. + */ + while (options) + { + printf ("options=%s\n", options); + if (strncmp (options, "hold-bitmaps", + sizeof ("hold-bitmaps") - 1) == 0) + flags |= RTEMS_RFS_FS_BITMAPS_HOLD; + else if (strncmp (options, "no-local-cache", + sizeof ("no-local-cache") - 1) == 0) + flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE; + else if (strncmp (options, "max-held-bufs", + sizeof ("max-held-bufs") - 1) == 0) + { + max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0); + } + else + return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL); + + options = strchr (options, ','); + if (options) + { + ++options; + if (*options == '\0') + options = NULL; + } + } + rtems = malloc (sizeof (rtems_rfs_rtems_private)); if (!rtems) return rtems_rfs_rtems_error ("initialise: local data", ENOMEM); @@ -1291,7 +1323,7 @@ rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry, return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc); } - rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs); + rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs); if (rc) { free (rtems); -- cgit v1.2.3 From 41fb7c43f3ea20fe30864c797ab2b68869ad31f5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 7 Nov 2011 21:42:37 +0000 Subject: 2011-11-07 Ralf Corsepius PR 1952/cpukit * libmisc/untar/untar.c: Add return code for failure when unable to write file. --- cpukit/ChangeLog | 6 ++++++ cpukit/libmisc/untar/untar.c | 1 + 2 files changed, 7 insertions(+) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e687eedddf..4f82858e09 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2011-11-07 Ralf Corsepius + + PR 1952/cpukit + * libmisc/untar/untar.c: Add return code for failure when unable to + write file. + 2011-11-03 Chris Johns PR 1948/filesystem diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c index 2c5c8e9cf3..71669a40b3 100644 --- a/cpukit/libmisc/untar/untar.c +++ b/cpukit/libmisc/untar/untar.c @@ -205,6 +205,7 @@ Untar_FromMemory( if (n != len) { printk("untar: Error during write\n"); + retval = UNTAR_FAIL; break; } ptr += 512; -- cgit v1.2.3 From c937e8fc18edb877c7436d0bfb7c389404f81b52 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Nov 2011 15:15:40 +0000 Subject: 2011-11-09 Werner Almesberger PR 1955/cpukit * rtems/score/cpu.h: Convert CPU_swap_u16 into a static inline. --- cpukit/score/cpu/lm32/ChangeLog | 5 +++++ cpukit/score/cpu/lm32/rtems/score/cpu.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cpukit/score/cpu/lm32/ChangeLog b/cpukit/score/cpu/lm32/ChangeLog index 43beca0f6c..873f24bbab 100644 --- a/cpukit/score/cpu/lm32/ChangeLog +++ b/cpukit/score/cpu/lm32/ChangeLog @@ -1,3 +1,8 @@ +2011-11-09 Werner Almesberger + + PR 1955/cpukit + * rtems/score/cpu.h: Convert CPU_swap_u16 into a static inline. + 2010-05-29 Ralf Corsépius * irq.c: Change _exception_stack_frame into void*. diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h index 973fad29b8..be3294fe40 100644 --- a/cpukit/score/cpu/lm32/rtems/score/cpu.h +++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h @@ -1272,8 +1272,10 @@ static inline uint32_t CPU_swap_u32( * @param[in] value is the value to be swapped * @return the value after being endian swapped */ -#define CPU_swap_u16( value ) \ - (((value&0xff) << 8) | ((value >> 8)&0xff)) +static inline uint16_t CPU_swap_u16(uint16_t v) +{ + return v << 8 | v >> 8; +} #ifdef __cplusplus } -- cgit v1.2.3 From e3fbffb712595eedbea0abb2c7d66bea3399f9f4 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Nov 2011 18:44:01 +0000 Subject: 2011-11-09 Werner Almesberger PR 1957/cpukit * score/include/rtems/score/coremutex.h, score/inline/rtems/score/threadmp.inl: Add parentheses to protect macro arguments. --- cpukit/ChangeLog | 7 +++++++ cpukit/score/include/rtems/score/coremutex.h | 4 ++-- cpukit/score/inline/rtems/score/threadmp.inl | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 4f82858e09..55a58b9888 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2011-11-09 Werner Almesberger + + PR 1957/cpukit + * score/include/rtems/score/coremutex.h, + score/inline/rtems/score/threadmp.inl: Add parentheses to protect + macro arguments. + 2011-11-07 Ralf Corsepius PR 1952/cpukit diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h index 712b35c7eb..ba2ae02782 100644 --- a/cpukit/score/include/rtems/score/coremutex.h +++ b/cpukit/score/include/rtems/score/coremutex.h @@ -374,8 +374,8 @@ void _CORE_mutex_Seize_interrupt_blocking( INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE \ ); \ } \ - if ( _CORE_mutex_Seize_interrupt_trylock( _the_mutex, &_level ) ) { \ - if ( !_wait ) { \ + if ( _CORE_mutex_Seize_interrupt_trylock( _the_mutex, &(_level) ) ) { \ + if ( !(_wait) ) { \ _ISR_Enable( _level ); \ _Thread_Executing->Wait.return_code = \ CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT; \ diff --git a/cpukit/score/inline/rtems/score/threadmp.inl b/cpukit/score/inline/rtems/score/threadmp.inl index 648ed0e1d2..7599f37503 100644 --- a/cpukit/score/inline/rtems/score/threadmp.inl +++ b/cpukit/score/inline/rtems/score/threadmp.inl @@ -38,7 +38,7 @@ * _MPCI_Receive_server_tcb until it is used. */ #define _Thread_MP_Is_receive(_the_thread) \ - (_the_thread == _MPCI_Receive_server_tcb) + ((_the_thread) == _MPCI_Receive_server_tcb) /** * This routine frees a proxy control block to the -- cgit v1.2.3 From 294a609e9f7b5ff5cc05057c6f3cacbd23fd6bae Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Nov 2011 18:51:29 +0000 Subject: 2011-11-09 Werner Almesberger PR 1954/cpukit * rtems/score/lm32.h: Protect against macro expansion. --- cpukit/score/cpu/lm32/ChangeLog | 5 +++++ cpukit/score/cpu/lm32/rtems/score/lm32.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cpukit/score/cpu/lm32/ChangeLog b/cpukit/score/cpu/lm32/ChangeLog index 873f24bbab..81b87ba774 100644 --- a/cpukit/score/cpu/lm32/ChangeLog +++ b/cpukit/score/cpu/lm32/ChangeLog @@ -1,3 +1,8 @@ +2011-11-09 Werner Almesberger + + PR 1954/cpukit + * rtems/score/lm32.h: Protect against macro expansion. + 2011-11-09 Werner Almesberger PR 1955/cpukit diff --git a/cpukit/score/cpu/lm32/rtems/score/lm32.h b/cpukit/score/cpu/lm32/rtems/score/lm32.h index 06ad7eb398..37f211edb8 100644 --- a/cpukit/score/cpu/lm32/rtems/score/lm32.h +++ b/cpukit/score/cpu/lm32/rtems/score/lm32.h @@ -71,7 +71,7 @@ extern "C" { #define lm32_disable_interrupts( _level ) \ do { register uint32_t ie; \ asm volatile ("rcsr %0,ie":"=r"(ie)); \ - _level = ie; \ + (_level) = ie; \ ie &= (~0x0001); \ asm volatile ("wcsr ie,%0"::"r"(ie)); \ } while (0) @@ -82,7 +82,7 @@ extern "C" { #define lm32_flash_interrupts( _level ) \ do { register uint32_t ie; \ asm volatile ("wcsr ie,%0"::"r"(_level)); \ - ie = _level & (~0x0001); \ + ie = (_level) & (~0x0001); \ asm volatile ("wcsr ie,%0"::"r"(ie)); \ } while (0) -- cgit v1.2.3 From 8d4d978d67e0c2c49948d5d94b83ced2243f457b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Nov 2011 18:52:25 +0000 Subject: Move entries to correct file. --- cpukit/ChangeLog | 7 ------- cpukit/score/cpu/lm32/ChangeLog | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 55a58b9888..4f82858e09 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,10 +1,3 @@ -2011-11-09 Werner Almesberger - - PR 1957/cpukit - * score/include/rtems/score/coremutex.h, - score/inline/rtems/score/threadmp.inl: Add parentheses to protect - macro arguments. - 2011-11-07 Ralf Corsepius PR 1952/cpukit diff --git a/cpukit/score/cpu/lm32/ChangeLog b/cpukit/score/cpu/lm32/ChangeLog index 81b87ba774..b7c320b1ac 100644 --- a/cpukit/score/cpu/lm32/ChangeLog +++ b/cpukit/score/cpu/lm32/ChangeLog @@ -1,3 +1,10 @@ +2011-11-09 Werner Almesberger + + PR 1957/cpukit + * score/include/rtems/score/coremutex.h, + score/inline/rtems/score/threadmp.inl: Add parentheses to protect + macro arguments. + 2011-11-09 Werner Almesberger PR 1954/cpukit -- cgit v1.2.3 From 5b6f5447c54dae411ed349e62882ac879772dffb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Nov 2011 20:51:08 +0000 Subject: 2011-11-09 Jennifer Averett PR 1934/bsps * libchip/serial/ns16550.c: Change to unsigned variable. --- c/src/ChangeLog | 5 +++++ c/src/libchip/serial/ns16550.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/c/src/ChangeLog b/c/src/ChangeLog index cf8d5aba7e..768cb42aae 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,3 +1,8 @@ +2011-11-09 Jennifer Averett + + PR 1934/bsps + * libchip/serial/ns16550.c: Change to unsigned variable. + 2011-02-02 Ralf Corsépius * configure.ac: Require autoconf-2.68, automake-1.11.1. diff --git a/c/src/libchip/serial/ns16550.c b/c/src/libchip/serial/ns16550.c index 11e33f8915..f6a654badd 100644 --- a/c/src/libchip/serial/ns16550.c +++ b/c/src/libchip/serial/ns16550.c @@ -696,7 +696,7 @@ NS16550_STATIC int ns16550_inbyte_nonblocking_polled( { uint32_t pNS16550; unsigned char ucLineStatus; - char cChar; + uint8_t cChar; getRegister_f getReg; pNS16550 = Console_Port_Tbl[minor].ulCtrlPort1; -- cgit v1.2.3 From 09b41d2262d68cc6675419b72b1813349a0c70d2 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 16 Nov 2011 03:18:43 +0000 Subject: Back port from CVS-HEAD. --- contrib/crossrpms/gcc/gccnewlib.add | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/contrib/crossrpms/gcc/gccnewlib.add b/contrib/crossrpms/gcc/gccnewlib.add index bb38a7f62f..abd52026cb 100644 --- a/contrib/crossrpms/gcc/gccnewlib.add +++ b/contrib/crossrpms/gcc/gccnewlib.add @@ -74,6 +74,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -186,14 +192,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - -%if %build_gcj -# Building gcj requires bison and zlib -BuildRequires: bison -%endif BuildRequires: texinfo >= 4.2 BuildRequires: @rpmprefix@@tool_target@-binutils -- cgit v1.2.3 From e2292101d8806b982172c3a51db87f5ccf7dbe2b Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 16 Nov 2011 03:19:29 +0000 Subject: Bump GCC_RPMREL. --- contrib/crossrpms/rtems4.10/arm/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/avr/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/bfin/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/h8300/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/i386/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/lm32/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m32c/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m32r/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/m68k/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/mips/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/powerpc/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/sh/Makefile.am | 2 +- contrib/crossrpms/rtems4.10/sparc/Makefile.am | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/Makefile.am b/contrib/crossrpms/rtems4.10/arm/Makefile.am index 1be9c90095..4320677f8c 100644 --- a/contrib/crossrpms/rtems4.10/arm/Makefile.am +++ b/contrib/crossrpms/rtems4.10/arm/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) diff --git a/contrib/crossrpms/rtems4.10/avr/Makefile.am b/contrib/crossrpms/rtems4.10/avr/Makefile.am index c62829d251..1e46c34d33 100644 --- a/contrib/crossrpms/rtems4.10/avr/Makefile.am +++ b/contrib/crossrpms/rtems4.10/avr/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/bfin/Makefile.am b/contrib/crossrpms/rtems4.10/bfin/Makefile.am index 78333b62b1..94c8d29aaf 100644 --- a/contrib/crossrpms/rtems4.10/bfin/Makefile.am +++ b/contrib/crossrpms/rtems4.10/bfin/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/h8300/Makefile.am b/contrib/crossrpms/rtems4.10/h8300/Makefile.am index 16e49df29d..9b4a0823c4 100644 --- a/contrib/crossrpms/rtems4.10/h8300/Makefile.am +++ b/contrib/crossrpms/rtems4.10/h8300/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/i386/Makefile.am b/contrib/crossrpms/rtems4.10/i386/Makefile.am index 286f6e8a69..e4e6f85983 100644 --- a/contrib/crossrpms/rtems4.10/i386/Makefile.am +++ b/contrib/crossrpms/rtems4.10/i386/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/lm32/Makefile.am b/contrib/crossrpms/rtems4.10/lm32/Makefile.am index 2bb6b5f6dc..4f1f477d06 100644 --- a/contrib/crossrpms/rtems4.10/lm32/Makefile.am +++ b/contrib/crossrpms/rtems4.10/lm32/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/m32c/Makefile.am b/contrib/crossrpms/rtems4.10/m32c/Makefile.am index 1a34bbbd30..a081892153 100644 --- a/contrib/crossrpms/rtems4.10/m32c/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m32c/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/m32r/Makefile.am b/contrib/crossrpms/rtems4.10/m32r/Makefile.am index 9e4c353008..238ece6b1d 100644 --- a/contrib/crossrpms/rtems4.10/m32r/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m32r/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/m68k/Makefile.am b/contrib/crossrpms/rtems4.10/m68k/Makefile.am index 019438205b..cac44007ea 100644 --- a/contrib/crossrpms/rtems4.10/m68k/Makefile.am +++ b/contrib/crossrpms/rtems4.10/m68k/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/mips/Makefile.am b/contrib/crossrpms/rtems4.10/mips/Makefile.am index f056672fda..41e2db7d98 100644 --- a/contrib/crossrpms/rtems4.10/mips/Makefile.am +++ b/contrib/crossrpms/rtems4.10/mips/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am index f7b76d97c5..6303913926 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/Makefile.am +++ b/contrib/crossrpms/rtems4.10/powerpc/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/sh/Makefile.am b/contrib/crossrpms/rtems4.10/sh/Makefile.am index 727edaaef1..c8026c2334 100644 --- a/contrib/crossrpms/rtems4.10/sh/Makefile.am +++ b/contrib/crossrpms/rtems4.10/sh/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` diff --git a/contrib/crossrpms/rtems4.10/sparc/Makefile.am b/contrib/crossrpms/rtems4.10/sparc/Makefile.am index a6938b0972..4f3360a6fd 100644 --- a/contrib/crossrpms/rtems4.10/sparc/Makefile.am +++ b/contrib/crossrpms/rtems4.10/sparc/Makefile.am @@ -12,7 +12,7 @@ BINUTILS_OPTS += GCC_VERS = 4.4.6 GCC_PKGVERS = $(GCC_VERS) -GCC_RPMREL = 3 +GCC_RPMREL = 4 NEWLIB_VERS = 1.18.0 NEWLIB_PKGVERS = $(NEWLIB_VERS) NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 23` -- cgit v1.2.3 From 5c872dee16870ace257d2f704f720d8fb1f0ac72 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 16 Nov 2011 03:20:24 +0000 Subject: Regenerate. --- .../arm/rtems-4.10-arm-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../avr/rtems-4.10-avr-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../bfin/rtems-4.10-bfin-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../h8300/rtems-4.10-h8300-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../i386/rtems-4.10-i386-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../lm32/rtems-4.10-lm32-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../m32c/rtems-4.10-m32c-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../m32r/rtems-4.10-m32r-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../m68k/rtems-4.10-m68k-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../mips/rtems-4.10-mips-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec | 25 +++++++++++++--------- .../sparc/rtems-4.10-sparc-rtems4.10-gcc.spec | 25 +++++++++++++--------- 13 files changed, 195 insertions(+), 130 deletions(-) diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec index 045eb2ee7d..54eaa7d8b9 100644 --- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: arm-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-arm-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-arm-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-arm-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-arm-rtems4.10-binutils Requires: rtems-4.10-arm-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-arm-rtems4.10-binutils -# Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for arm-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-arm-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-arm-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for arm-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for arm-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec index 3ef0459461..e2dd1e6c43 100644 --- a/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: avr-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-avr-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-avr-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-avr-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-avr-rtems4.10-binutils Requires: rtems-4.10-avr-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -339,7 +344,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -611,7 +616,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-avr-rtems4.10-binutils -# Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -629,7 +634,7 @@ Summary: libgcc for avr-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-avr-rtems4.10-gcc-libgcc @@ -744,7 +749,7 @@ Summary: C Library (newlib) for avr-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -765,7 +770,7 @@ Newlib C Library for avr-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec index 1dd0dfc1b8..08d003cb0d 100644 --- a/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: bfin-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-bfin-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-bfin-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-bfin-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-bfin-rtems4.10-binutils Requires: rtems-4.10-bfin-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-bfin-rtems4.10-binutils -# Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for bfin-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-bfin-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-bfin-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for bfin-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for bfin-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec index f3823f266d..4a9a635487 100644 --- a/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/h8300/rtems-4.10-h8300-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: h8300-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-h8300-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-h8300-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-h8300-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-h8300-rtems4.10-binutils Requires: rtems-4.10-h8300-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-h8300-rtems4.10-binutils -# Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for h8300-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-h8300-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-h8300-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for h8300-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for h8300-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec index c53fa2abf5..bb44e4b328 100644 --- a/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/i386/rtems-4.10-i386-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: i386-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-i386-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-i386-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-i386-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-i386-rtems4.10-binutils Requires: rtems-4.10-i386-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-i386-rtems4.10-binutils -# Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for i386-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-i386-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-i386-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for i386-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for i386-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec index f9efacd176..d4799848e4 100644 --- a/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/lm32/rtems-4.10-lm32-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: lm32-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-lm32-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-lm32-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-lm32-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-lm32-rtems4.10-binutils Requires: rtems-4.10-lm32-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-lm32-rtems4.10-binutils -# Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for lm32-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-lm32-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-lm32-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for lm32-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for lm32-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec index b1ffd1b9ba..f583ce0187 100644 --- a/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: m32c-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-m32c-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-m32c-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-m32c-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-m32c-rtems4.10-binutils Requires: rtems-4.10-m32c-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -339,7 +344,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -611,7 +616,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-m32c-rtems4.10-binutils -# Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -629,7 +634,7 @@ Summary: libgcc for m32c-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-m32c-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-m32c-rtems4.10-gcc-libgcc @@ -745,7 +750,7 @@ Summary: C Library (newlib) for m32c-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -766,7 +771,7 @@ Newlib C Library for m32c-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec index 46f71b7a13..a2395b7f76 100644 --- a/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/m32r/rtems-4.10-m32r-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: m32r-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-m32r-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-m32r-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-m32r-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-m32r-rtems4.10-binutils Requires: rtems-4.10-m32r-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -339,7 +344,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -611,7 +616,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-m32r-rtems4.10-binutils -# Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -629,7 +634,7 @@ Summary: libgcc for m32r-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-m32r-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-m32r-rtems4.10-gcc-libgcc @@ -745,7 +750,7 @@ Summary: C Library (newlib) for m32r-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -766,7 +771,7 @@ Newlib C Library for m32r-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec index 123f21c802..1673a8c09a 100644 --- a/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/m68k/rtems-4.10-m68k-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: m68k-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-m68k-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-m68k-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-m68k-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-m68k-rtems4.10-binutils Requires: rtems-4.10-m68k-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-m68k-rtems4.10-binutils -# Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for m68k-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-m68k-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-m68k-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for m68k-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for m68k-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec index 43823ec168..437d1373d8 100644 --- a/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/mips/rtems-4.10-mips-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: mips-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-mips-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-mips-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-mips-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-mips-rtems4.10-binutils Requires: rtems-4.10-mips-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-mips-rtems4.10-binutils -# Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for mips-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-mips-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-mips-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for mips-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for mips-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec index f50729872d..dbf17387ac 100644 --- a/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: powerpc-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-powerpc-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-powerpc-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-powerpc-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-powerpc-rtems4.10-binutils Requires: rtems-4.10-powerpc-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-powerpc-rtems4.10-binutils -# Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for powerpc-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-powerpc-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-powerpc-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for powerpc-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for powerpc-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec index 5fbd915571..3a887c1fa5 100644 --- a/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/sh/rtems-4.10-sh-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: sh-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-sh-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-sh-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-sh-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-sh-rtems4.10-binutils Requires: rtems-4.10-sh-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-sh-rtems4.10-binutils -# Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for sh-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-sh-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-sh-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for sh-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for sh-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable diff --git a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec index fe6fc6fee1..4ac8621981 100644 --- a/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec +++ b/contrib/crossrpms/rtems4.10/sparc/rtems-4.10-sparc-rtems4.10-gcc.spec @@ -58,7 +58,7 @@ Summary: sparc-rtems4.10 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,12 @@ BuildRequires: %{_host_rpmprefix}gcc %global gmp_provided 4.1.4 %endif +%if 0%{?suse12_1} +%global mpc_provided 0.8.2 +%global mpfr_provided 3.0.1 +%global gmp_provided 5.0.2 +%endif + %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 @@ -227,10 +233,9 @@ BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{mpfr_required} BuildRequires: rtems-4.10-sparc-rtems4.10-gcc = %{gcc_rpmvers} %endif -%if "%{gcc_version}" >= "4.2.0" +# Not strictly required, but patches may introduce a need to use them. +# For reasons of simplicity, always require them. BuildRequires: flex bison -%endif - BuildRequires: texinfo >= 4.2 BuildRequires: rtems-4.10-sparc-rtems4.10-binutils @@ -238,7 +243,7 @@ BuildRequires: rtems-4.10-sparc-rtems4.10-binutils Requires: rtems-4.10-gcc-common Requires: rtems-4.10-sparc-rtems4.10-binutils Requires: rtems-4.10-sparc-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release} -Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-27%{?dist} %if "%{gcc_version}" >= "4.5.0" BuildRequires: zlib-devel @@ -349,7 +354,7 @@ cd .. ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf %endif -echo "RTEMS gcc-%{gcc_version}-3%{?dist}/newlib-%{newlib_version}-26%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE +echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-27%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE # Fix timestamps @@ -622,7 +627,7 @@ sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ # Group: Development/Tools # Version: %{gcc_rpmvers} # Requires: rtems-4.10-sparc-rtems4.10-binutils -# Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-26%{?dist} +# Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-27%{?dist} # License: GPL # %if %build_infos @@ -640,7 +645,7 @@ Summary: libgcc for sparc-rtems4.10-gcc Group: Development/Tools Version: %{gcc_rpmvers} %{?_with_noarch_subpackages:BuildArch: noarch} -Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-26%{?dist} +Requires: rtems-4.10-sparc-rtems4.10-newlib = %{newlib_version}-27%{?dist} License: GPL %description -n rtems-4.10-sparc-rtems4.10-gcc-libgcc @@ -816,7 +821,7 @@ Summary: C Library (newlib) for sparc-rtems4.10 Group: Development/Tools License: Distributable Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} Requires: rtems-4.10-newlib-common @@ -837,7 +842,7 @@ Newlib C Library for sparc-rtems4.10. Summary: Base package for RTEMS newlib C Library Group: Development/Tools Version: %{newlib_version} -Release: 26%{?dist} +Release: 27%{?dist} %{?_with_noarch_subpackages:BuildArch: noarch} License: Distributable -- cgit v1.2.3 From 9981ef0e6b3168301f0753cd42eea3525e12b93c Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 16 Nov 2011 03:22:10 +0000 Subject: Housekeeping. --- .../patches/newlib-1.18.0-rtems4.10-20110419.diff | 2799 -------------------- 1 file changed, 2799 deletions(-) delete mode 100644 contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110419.diff diff --git a/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110419.diff b/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110419.diff deleted file mode 100644 index e4b0c90316..0000000000 --- a/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20110419.diff +++ /dev/null @@ -1,2799 +0,0 @@ -diff -Naur newlib-1.18.0.orig/.gitignore newlib-1.18.0/.gitignore ---- newlib-1.18.0.orig/.gitignore 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-1.18.0/.gitignore 2011-04-19 03:39:58.571184647 +0200 -@@ -0,0 +1,2 @@ -+*/Entries.Log -+CVS -diff -Naur newlib-1.18.0.orig/newlib/ChangeLog newlib-1.18.0/newlib/ChangeLog ---- newlib-1.18.0.orig/newlib/ChangeLog 2009-12-17 22:08:04.000000000 +0100 -+++ newlib-1.18.0/newlib/ChangeLog 2011-04-19 03:39:58.577184757 +0200 -@@ -1,3 +1,23 @@ -+2011-04-19 Ralf Corsépius -+ -+ * libc/include/stdint.h: Rework SIZE_MAX. -+ * libc/sys/rtems/include/limits.h: Rework SSIZE_MAX. -+ -+2011-01-31 Ralf Corsépius -+ -+ * libc/sys/rtems/crt0.c: Add clock_gettime, gettimeofday, -+ sched_yield. -+ -+2011-01-12 Ralf Corsépius -+ -+ * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS. -+ * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS. -+ -+2011-01-07 Ralf Corsépius -+ -+ * libc/sys/rtems/crt0.c: Adjust free() and calloc() to match their -+ public decls. -+ - 2009-12-17 Jeff Johnston - - * NEWS: Update with 1.18.0 info. -@@ -41,19 +61,19 @@ - * libc/stdlib/atexit.c: Ditto. - * libc/stdlib/on_exit.c: Ditto. - --2009-12-17 Ralf Corsépius -+2009-12-17 Ralf Corsépius - - * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling. -- * libc/machine/arm/machine/endian.h: Remove (Conflicts with -+ * libc/machine/arm/machine/endian.h: Remove (Conflicts with - libc/include/machine/endian.h) - --2009-12-17 Ralf Corsépius -+2009-12-17 Ralf Corsépius - - * libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__. - --2009-12-17 Ralf Corsepius -+2009-12-17 Ralf Corsépius - -- * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock -+ * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock - * libc/include/sys/stat.h: Use struct timespec st_*tim, - blksize_t st_blksize, blkcnt_t st_blocks. - Add st_*time compatibility macros. -@@ -69,23 +89,23 @@ - and ETOOMANYREFS into general list as they are referenced - by OpenGroup and needed by RTEMS. - --2009-12-16 Ralf Corsépius -+2009-12-16 Ralf Corsépius - - * libc/search/hcreate.c: Don't include (Unused). - --2009-12-16 Ralf Corsépius -+2009-12-16 Ralf Corsépius - -- * libc/sys/rtems/machine/_types.h: New (Derived from -+ * libc/sys/rtems/machine/_types.h: New (Derived from - machine/_default_types.h). -- * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. -+ * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. - * libc/sys/rtems/sys/param.h: -- Update copyright notice from FreeBSD. -- Remove HZ. -- Add #include -- Remove priority handling (moved to sys/priority.h). -- Remove CLBYTES (Unused, abandoned in BSD). -+ Update copyright notice from FreeBSD. -+ Remove HZ. -+ Add #include -+ Remove priority handling (moved to sys/priority.h). -+ Remove CLBYTES (Unused, abandoned in BSD). - * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). -- Remove CIRCLEQ_*. -+ Remove CIRCLEQ_*. - - 2009-12-15 Conny Marco Menebrocker - -@@ -1666,7 +1686,7 @@ - - * libc/machine/arm/strcpy.c: Add missing comma. - --2009-02-26 Ralf Corsepius -+2009-02-26 Ralf Corsépius - - * libc/machine/lm32/configure.in: Let - AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s -@@ -1852,24 +1872,24 @@ - * libc/string/wcstrings.tex: Ditto. - * libc/string/Makefile.in: Regenerated. - --2008-12-12 Ralf Corsepius -+2008-12-12 Ralf Corsépius - - * libc/stdio/fputws.c: Fix documentation. - * libc/stdio/getwchar.c: Ditto. - * libc/stdio/putwchar.c: Ditto. - --2008-12-12 Ralf Corsepius -+2008-12-12 Ralf Corsépius - - * libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to - 200112L (SUSv3 compliance). - Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported). - --2008-12-12 Ralf Corsepius -+2008-12-12 Ralf Corsépius - - * libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(), - _execve(), _exit(). - --2008-12-12 Ralf Corsepius -+2008-12-12 Ralf Corsépius - - * configure.host: Let *rtems* default to c99-formats. - -@@ -2019,7 +2039,7 @@ - . - * libc/sys/linux/io64.c: Add weak alias for _stat64. - --2008-11-27 Ralf Corsepius -+2008-11-27 Ralf Corsépius - - * libc/posix/telldir.c: Use #if !defined() instead of #ifndef - to fix GCC warning. -@@ -2191,17 +2211,17 @@ - * libc/unix/collate.c (__collate_err): simplify to remove unnecessary - strdup() and strlen() calls, also getting rid of a compiler warning. - --2008-11-19 Ralf Corsepius -+2008-11-19 Ralf Corsépius - - * libc/include/sys/config.h: Don't put - __ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems. - --2008-11-19 Ralf Corsepius -+2008-11-19 Ralf Corsépius - - * libc/posix/runetype.h: Add include of stddef.h and remove - defining standard types: size_t and wchar_t. - --2008-11-19 Ralf Corsepius -+2008-11-19 Ralf Corsépius - - * libc/include/pthread.h: Remove prototypes for - pthread_attr_getcputime and pthread_attr_setcputime which -@@ -4256,7 +4276,7 @@ - * libc/machine/spu/sprintf.c: Ditto. - * libc/machine/spu/sscanf.c: Ditto. - --2007-08-03 Ralf Corsepius -+2007-08-03 Ralf Corsépius - - * libc/include/tar.h: New. - -@@ -6241,7 +6261,7 @@ - * libc/include/sys/signal.h (sigdelset, sigfillset, sigismember): New macros. - (sigaddset, sigemptyset): Add return code. - --2006-04-13 Ralf Corsepius -+2006-04-13 Ralf Corsépius - - * acinclude.m4: New _NEWLIB_VERSION. - * acinclude.m4(NEWLIB_CONFIGURE): AC_REQUIRE(_NEWLIB_VERSION). -@@ -6730,7 +6750,7 @@ - * libc/sys/linux/sys/stat.h: Change *stat64 prototypes to - take a pointer to struct stat64 rather than struct stat. - --2005-12-16 Ralf Corsepius -+2005-12-16 Ralf Corsépius - - * libc/include/stdint.h: Prefer long over int for int32_t. - Use __have_long32 to set up int32_t. -@@ -6759,7 +6779,7 @@ - * libc/include/sys/types.h: Remove the ifdef armour around - standard POSIX types. - --2005-12-06 Ralf Corsepius -+2005-12-06 Ralf Corsépius - - * libc/sys/rtems/crt0.c: Add rtems_gxx_key_create, - rtems_gxx_key_delete, rtems_gxx_getspecific, -@@ -6838,7 +6858,7 @@ - * libc/sys/linux/sys/unistd.h (readlink, symlink): New - prototypes. - --2005-11-01 Ralf Corsepius -+2005-11-01 Ralf Corsépius - - * libc/include/stdint.h: Cleanup #if vs. #ifdef. - -@@ -7062,11 +7082,11 @@ - * libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno - to ENOMEM on failure. - --2005-10-06 Ralf Corsepius -+2005-10-06 Ralf Corsépius - - * libc/include/stdint.h: Add [u]int_fast_t types. - --2005-10-04 Ralf Corsepius -+2005-10-04 Ralf Corsépius - - * libc/include/stdint.h: Move magic to set __have_long* to the - beginning. Use #if __have* instead of #if defined(__have*). -@@ -7082,14 +7102,14 @@ - * libc/sys/linux/include/stdint.h: Include and - incorporate Ralf's change below. - --2005-10-03 Ralf Corsepius -+2005-10-03 Ralf Corsépius - - * libc/include/stdint.h: - Use __INTMAX_TYPE__ to derive intmax_t. - Use __UINTMAX_TYPE__ to derive uintmax_t. - Fix minor typo. - --2005-09-27 Ralf Corsepius -+2005-09-27 Ralf Corsépius - - * libc/include/stdint.h: Correct __STDINT_EXP macro incorrectly - handling GCC >= 4. -@@ -7425,16 +7445,16 @@ - * configure.host (newlib_cflags) : Add - -DCOMPACT_CTYPE. - --2005-03-06 Ralf Corsepious -+2005-03-06 Ralf Corsépius - - * libc/sys/rtems/include/inttypes.h: New file. - * libc/sys/rtems/include/stdint.h: Ditto. - --2005-03-06 Ralf Corsepious -+2005-03-06 Ralf Corsépius - - * libc/string/memcmp.c: Fix to avoid pointer signedness warning. - --2005-03-06 Ralf Corsepious -+2005-03-06 Ralf Corsépius - - * libc/include/machine/_types.h: New file. - * libc/include/sys/types.h: Do not check for __rtems__ -@@ -7443,7 +7463,7 @@ - * libc/sys/rtems/machine/_types.h: Removed. Replaced with - shared header file. - --2005-02-25 Ralf Corsepious -+2005-02-25 Ralf Corsépius - - * libm/common/fdlibm.h (FLT_UWORD_MAX, FLT_UWORD_HALF_MAX): Add - L qualifier for these long constants. -@@ -7459,13 +7479,13 @@ - * libc/time/strftime.c (strftime): Fix '%x' to deal with negative - years. Fix '%z' to use long, not int. - --2005-02-24 Ralf Corsepious -+2005-02-24 Ralf Corsépius - - * libm/common/s_fpclassify.c: Use __uint32_t instead of int to - manipulate float values in integer form. - * libm/common/sf_round.c: Ditto. - --2005-02-24 Ralf Corsepious -+2005-02-24 Ralf Corsépius - - * libc/include/sys/types.h [__rtems__]: Include new - header file machine/_types.h. -@@ -7829,7 +7849,7 @@ - * libc/stdio/fread.c (fread): Fix return value for unbuffered - fread. - --2004-10-25 Ralf Corsepius -+2004-10-25 Ralf Corsépius - - * libc/include/machine/setjmp.h: Add AVR support. - * libc/sys/rtems/crt0.S [__AVR__]: Add __stack. -@@ -14061,7 +14081,7 @@ - - * libc/include/sys/unistd.h: Prototype chroot() for RTEMS. - --2001-08-29 Ralf Corsepius -+2001-08-29 Ralf Corsépius - - * libc/machine/i386/f_atan2.S, libc/machine/i386/f_atan2f.S, - libc/machine/i386/f_exp.c, libc/machine/i386/f_expf.c, -@@ -14738,7 +14758,7 @@ - * libc/sys/linux/sys/utsname.h: Ditto. - * libc/sys/linux/sys/wait.h: Ditto. - --2000-12-08 Ralf Corsepius -+2000-12-08 Ralf Corsépius - - * Makefile.am: $(INSTALL), $(INSTALL_DATA), and $(INSTALL_PROGRAM) - can be a relative path to $(top_srcdir)/install.sh so ensure the -@@ -15643,7 +15663,7 @@ - * libc/include/stdlib.h: add ptsname, grantpt, unlockpt to cygwin - section - --Sat Oct 2 02:02:00 MEST 1999 Ralf Corsepius -+Sat Oct 2 02:02:00 MEST 1999 Ralf Corsépius - - * libc/machine/sh/asm.h: Added __SH4_SINGLE__ to DELAYED_BRANCHES - * libc/machine/sh/memcpy.S: Fix line wrapping in SL macro -diff -Naur newlib-1.18.0.orig/newlib/ChangeLog.rtems newlib-1.18.0/newlib/ChangeLog.rtems ---- newlib-1.18.0.orig/newlib/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-1.18.0/newlib/ChangeLog.rtems 2011-04-19 03:39:58.578184775 +0200 -@@ -0,0 +1,301 @@ -+2011-01-14 Ralf Corsépius -+ -+ * libm/common/s_ilogb.c, libm/common/s_llround.c, -+ libm/common/s_log2.c, libm/common/s_lrint.c, -+ libm/common/s_lround.c, libm/common/s_rint.c, -+ libm/common/sf_ilogb.c, libm/common/sf_log2.c, -+ libm/common/sf_rint.c: Import from newlib-cvs. -+ -+2011-01-14 Ralf Corsépius -+ -+ * libm/common/fdlibm.h: -+ Add SAFE_LEFT_SHIFT, SAFE_RIGHT_SHIFT from newlib-cvs. -+ -+2011-01-07 Ralf Corsépius -+ -+ * libc/stdio/open_memstream.c: Replace 64 * 1024 with 0x10000 to -+ avoid integer overflow on h8300. -+ -+2011-01-05 Ralf Corsépius -+ -+ * libm/common/s_llrint.c: Back-port from newlib-cvs. -+ -+2011-01-05 Ralf Corsépius -+ -+ * libc/stdio/tmpnam.c: Include . -+ Use intptr_t instead of _POINTER_INT for improved portability. -+ * libc/misc/__dprintf.c: Include -+ Use intptr_t instead of _POINTER_INT for improved portability. -+ -+2011-01-05 Ralf Corsépius -+ -+ * libm/common/s_round.c: Cast const int to __int32_t. -+ -+2011-01-04 Ralf Corsépius -+ -+ * doc/makedoc.c: Add cludge to make makedoc 64bit compliant. -+ -+2011-01-04 Ralf Corsépius -+ -+ * libm/math/e_scalb.c: Include . -+ Don't rely on 65000 being a valid int. -+ -+2011-01-04 Ralf Corsépius -+ -+ * libc/posix/readdir.c: Include . -+ Cast to intptr_t instead of int. -+ -+2011-01-04 Ralf Corsépius -+ -+ * libc/string/memccpy.c, libc/string/memchr.c, -+ libc/string/memcmp.c, libc/string/memcpy.c, -+ libc/string/memmove.c, libc/string/mempcpy.c, -+ libc/string/memset.c, libc/string/stpcpy.c, -+ libc/string/stpncpy.c, libc/string/strcpy.c, -+ libc/string/strlen.c, libc/string/strncat.c, -+ libc/string/strncpy.c (UNALIGNED): -+ Include . -+ Cast to intptr_t instead of long. -+ -+2011-01-04 Ralf Corsépius -+ -+ * libc/stdio/open_memstream.c (internal_open_memstream_r): -+ Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024. -+ -+2010-10-05 Eric Blake -+ -+ memmem, strstr, strcasestr: fix bug with long periodic needle -+ * lib/str-two-way.h (two_way_long_needle): Avoid bug with long -+ periodic needle having false positive. -+ -+2010-08-24 Sebastian Huber -+ -+ * libc/posix/opendir.c: Added missing memory free. -+ -+2010-08-10 Ralf Corsépius -+ -+ PR 1475/newlib: -+ * libc/include/stdint.h: Fall back to compute SIZE_MAX based on -+ __SIZEOF_SIZE_T__ and __CHAR_BIT__ if available. -+ -+2010-08-04 Ralf Corsépius -+ -+ * libc/string/strcat.c: -+ Include . Use uintptr_t instead of long in ALIGNED. -+ * libc/string/strchr.c, libc/string/strcmp.c, libc/string/strncmp.c: -+ Include . Use uintptr_t instead of long in UNALIGNED. -+ * libc/include/sys/unistd.h: Activate decls for -+ getsid, setegid, seteuid. -+ -+2010-07-08 Ralf Corsépius -+ -+ * configure.host: Add -D_COMPILING_NEWLIB to newlib_cflags. -+ * libc/string/index.c, libc/string/rindex.c: Include . -+ * libc/stdlib/putenv_r.c: Include -+ -+2010-07-06 Corinna Vinschen -+ -+ * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t. -+ * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype. -+ -+2010-06-17 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/_types.h: Special case for sparc64. -+ -+2010-04-23 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/_types.h: Add _mode_t. -+ * libc/include/sys/types.h: Derive mode_t from _mode_t. -+ -+2010-04-02 Ralf Corsépius -+ -+ * libc/include/sched.h, libc/include/sys/sched.h: -+ Adopt newlib-cvs's versions. -+ -+2010-03-25 Ralf Corsépius -+ -+ * libc/include/strings.h: New (split-out from string.h). -+ * libc/include/string.h: Remove bcmp, bcopy, bzero, ffs, index, rindex, -+ strcasecmp, strncasecmp (Moved to strings.h). -+ Remove strcmpi, stricmp, strncmpi, strnicmp. -+ * libc/misc/ffs.c: Use instead of . -+ * libc/string/bcmp.c: Use instead of . -+ * libc/string/bzero.c: Use instead of . -+ * libc/string/rindex.c: Use instead of . -+ * libc/string/strcasecmp.c: Use instead of . -+ * libc/string/strcasecmp.c: Use instead of . -+ -+2010-03-23 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/_types.h: Add i386 to 64bit off_t targets. -+ -+2010-03-10 Ralf Corsépius -+ -+ * libc/posix/telldir.c: Adopt newlib-cvs's telldir.c -+ -+2010-02-10 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/_types.h: Use __int64_t for _off_t, fpos_t for -+ selected targets. -+ -+2010-02-05 Ralf Corsépius -+ -+ * libc/posix/telldir.c: Remove bogus nested prototype of lseek(). -+ -+2010-01-11 Sebastian Huber -+ -+ * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory. -+ -+2009-12-18 Ralf Corsépius -+ -+ * libc/search/db_local.h: -+ Use __uint32_t instead of u_int (prototype mismatches). -+ * libc/search/extern.h (__buf_init): -+ Use __uint32_t instead of int (16 bit target portability). -+ * libc/search/hash_buf.c: Use ptrdiff_t instead of __uint32_t, -+ use __uint32_t instead of int (16 bit target portability). -+ * libc/search/hash.h: Use __uint32_it instead of int -+ (16 bit target portability). -+ * libm/common/modfl.c: Add cast to (double*) to avoid GCC warning. -+ * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit -+ casts to __uint32_t to avoid overflows on implicit casts. -+ -+2009-12-18 Ralf Corsépius -+ -+ Merger with newlib-1.18.0. -+ -+2009-10-29 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/_types.h: Rework. -+ * libc/sys/rtems/machine/stdint.h: Remove. -+ * libc/include/inttypes.h: -+ Rework logic to determine PRI*PTR. -+ Prefer long64 over longlong64. -+ * libc/include/machine/_default_types.h: -+ Sync logic for __int32 with stdint.h (Prefer long over int). -+ * libc/include/stdint.h: -+ Remove __SPU__ hack. -+ Prefer int for int16_t (sync with _default_types.h). -+ Rework intptr_t determination. -+ -+2009-10-28 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/_types.h: New. -+ Add custom time for _ssize_t. -+ * libc/stdlib/assert.c: Sync with newlib-CVS. -+ * configure.host: Add -DHAVE_ASSERT_FUNC to newlib_cflags. -+ -+2009-10-27 Ralf Corsépius -+ -+ * libc/include/sys/pthread.h: -+ Add pthread_atfork (Mandated by IEEE Std 1003.1-2008). -+ Add pthread_rwlock_unlock (Formerly missing) -+ -+2009-10-26 Ralf Corsépius -+ -+ * libc/include/sys/signal.h: Sync with newlib-CVS. -+ -+2009-10-09 Ralf Corsépius -+ -+ * libc/include/sys/signal.h: Use pid_t as 1st arg to kill() -+ (mandated by POSIX). -+ -+2009-09-22 Ralf Corsépius -+ -+ * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). -+ Remove CIRCLEQ_*. -+ * libc/search/hcreate.c: Don't include sys/queue.h. -+ -+2009-09-18 Christopher Faylor -+ -+ * libc/include/sys/unistd.h: Declare getpagesize as returning -+ POSIX-mandated int. -+ -+2009-09-15 Ralf Corsépius -+ -+ * libc/include/stdlib.h: Add posix_memalign. -+ -+2009-09-11 Ralf Corsépius -+ -+ * configure.host (m32c): Remove -D_ABORT_PROVIDED. -+ -+2009-09-10 Ralf Corsépius -+ -+ * configure.host: Add -D_NO_POPEN. -+ * libc/sys/rtems/crt0.c: Don't provide waitpid unless used. -+ -+2009-09-09 Ralf Corsépius -+ -+ * configure.host: Add -D_NO_WORDEXP. -+ -+2009-09-06 Ralf Corsépius -+ -+ * libc/sys/rtems/crt0.c: Add issetugid. -+ -+2009-09-02 Ralf Corsépius -+ -+ * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. -+ -+2009-07-27 Ralf Corsépius -+ -+ * libc/sys/rtems/crt0.c: Add _isatty_r. -+ -+2009-07-06 Joel Sherrill -+ -+ * libc/include/sys/features.h: Define _UNIX98_THREAD_MUTEX_ATTRIBUTES. -+ -+2009-05-05 Ralf Corsépius -+ -+ * configure.host: Remove -DMISSING_SYSCALL_NAMES. -+ -+2009-03-11 Ralf Corsépius -+ -+ * libc/stdlib/assert.c: Don't build __assert_func. -+ * libc/sys/rtems/crt0.c: Add __assert_func. -+ -+2009-03-09 Ralf Corsépius -+ -+ * libc/machine/powerpc/times.c: Remove. -+ * libc/machine/powerpc/Makefile.am: Remove times.c. -+ * libc/machine/powerpc/Makefile.in: Regenerate. -+ -+2009-02-24 Ralf Corsépius -+ -+ * libc/unix/ttyname.c: Sync with newlib-cvs. -+ * configure.host: Add -DHAVE_BLKSIZE to newlib_cflags. -+ -+2009-02-22 Ralf Corsépius -+ -+ * libc/sys/rtems/machine/stdint.h: Add __lm32__. -+ * libc/machine/lm32/configure.in: Set AC_CONFIG_SRC to setjmp.S. -+ * libc/machine/lm32/configure: Regenerate. -+ -+2009-02-20 Ralf Corsépius -+ -+ * libc/unix/Makefile.in: Regenerate. -+ -+2009-02-20 Craig Howland on behalf of -+ Sebastian Huber -+ -+ * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid -+ coupling ttyname_r() and ttyname() due to the latter's large buffer). -+ * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in -+ ttyname.c. -+ * libc/unix/ttyname.h: New file (common size definition for the 2 -+ ttyname*c files that are now split). -+ * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c. -+ -+2009-02-16 Ralf Corsépius -+ -+ * libc/sys/rtems/sys/param.h: -+ Update copyright notice from FreeBSD. -+ Remove HZ. -+ Add #include -+ Remove priority handling (moved to sys/priority.h). -+ Remove CLBYTES (Unused, abandoned in BSD). -+ -+2009-02-06 Ralf Corsépius -+ -+ * libc/include/sched.h: -+ Remove (collides with RTEMS's schedul.h). -+ -diff -Naur newlib-1.18.0.orig/newlib/configure.host newlib-1.18.0/newlib/configure.host ---- newlib-1.18.0.orig/newlib/configure.host 2009-12-10 18:12:11.000000000 +0100 -+++ newlib-1.18.0/newlib/configure.host 2011-04-19 03:39:58.579184794 +0200 -@@ -556,6 +556,7 @@ - *-*-rtems*) - default_newlib_io_long_long="yes" - default_newlib_io_c99_formats="yes" -+ newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB" - newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC" - # turn off unsupported items in posix directory - newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN" -diff -Naur newlib-1.18.0.orig/newlib/doc/makedoc.c newlib-1.18.0/newlib/doc/makedoc.c ---- newlib-1.18.0.orig/newlib/doc/makedoc.c 2009-03-25 22:16:04.000000000 +0100 -+++ newlib-1.18.0/newlib/doc/makedoc.c 2011-04-19 03:39:58.579184794 +0200 -@@ -57,7 +57,7 @@ - { - char *ptr; - unsigned int write_idx; -- unsigned int size; -+ size_t size; - } string_type; - - -@@ -68,7 +68,7 @@ - - static void DEFUN(init_string_with_size,(buffer, size), - string_type *buffer AND -- unsigned int size ) -+ size_t size ) - { - buffer->write_idx = 0; - buffer->size = size; -@@ -219,8 +219,8 @@ - stinst_type *pc; - stinst_type sstack[STACK]; - stinst_type *ssp = &sstack[0]; --int istack[STACK]; --int *isp = &istack[0]; -+long istack[STACK]; -+long *isp = &istack[0]; - - typedef int *word_type; - -@@ -270,7 +270,7 @@ - { - isp++; - pc++; -- *isp = (int)(*pc); -+ *isp = (long)(*pc); - pc++; - - } -diff -Naur newlib-1.18.0.orig/newlib/libc/include/inttypes.h newlib-1.18.0/newlib/libc/include/inttypes.h ---- newlib-1.18.0.orig/newlib/libc/include/inttypes.h 2009-01-19 23:02:06.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/include/inttypes.h 2011-04-19 03:39:58.579184794 +0200 -@@ -242,15 +242,17 @@ - #define SCNxMAX __SCNMAX(x) - - /* ptr types */ --#if __have_long64 --#define __PRIPTR(x) __STRINGIFY(l##x) --#define __SCNPTR(x) __STRINGIFY(l##x) --#elif __have_longlong64 --#define __PRIPTR(x) __STRINGIFY(ll##x) --#define __SCNPTR(x) __STRINGIFY(ll##x) -+#if INTPTR_MAX == INT64_MAX -+#define __PRIPTR(x) __PRI64(x) -+#define __SCNPTR(x) __SCN64(x) -+#elif INTPTR_MAX == INT32_MAX -+#define __PRIPTR(x) __PRI32(x) -+#define __SCNPTR(x) __SCN32(x) -+#elif INTPTR_MAX == INT16_MAX -+#define __PRIPTR(x) __PRI16(x) -+#define __SCNPTR(x) __SCN16(x) - #else --#define __PRIPTR(x) __STRINGIFY(x) --#define __SCNPTR(x) __STRINGIFY(x) -+#error cannot determine PRI*PTR - #endif - - #define PRIdPTR __PRIPTR(d) -diff -Naur newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h newlib-1.18.0/newlib/libc/include/machine/_default_types.h ---- newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h 2008-06-12 00:14:54.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/machine/_default_types.h 2011-04-19 03:39:58.580184813 +0200 -@@ -54,14 +54,14 @@ - #endif - #endif - --#if __EXP(INT_MAX) == 0x7fffffffL --typedef signed int __int32_t; --typedef unsigned int __uint32_t; --#define ___int32_t_defined 1 --#elif __EXP(LONG_MAX) == 0x7fffffffL -+#if __EXP(LONG_MAX) == 0x7fffffffL - typedef signed long __int32_t; - typedef unsigned long __uint32_t; - #define ___int32_t_defined 1 -+#elif __EXP(INT_MAX) == 0x7fffffffL -+typedef signed int __int32_t; -+typedef unsigned int __uint32_t; -+#define ___int32_t_defined 1 - #elif __EXP(SHRT_MAX) == 0x7fffffffL - typedef signed short __int32_t; - typedef unsigned short __uint32_t; -diff -Naur newlib-1.18.0.orig/newlib/libc/include/sched.h newlib-1.18.0/newlib/libc/include/sched.h ---- newlib-1.18.0.orig/newlib/libc/include/sched.h 2007-09-21 23:02:15.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/sched.h 2011-04-19 03:39:58.580184813 +0200 -@@ -1,11 +1,94 @@ -+/* -+ * Written by Joel Sherrill . -+ * -+ * COPYRIGHT (c) 1989-2010. -+ * On-Line Applications Research Corporation (OAR). -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose without fee is hereby granted, provided that this entire notice -+ * is included in all copies of any software which is or includes a copy -+ * or modification of this software. -+ * -+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -+ * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION -+ * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS -+ * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. -+ * -+ * $Id$ -+ */ -+ - #ifndef _SCHED_H_ - #define _SCHED_H_ - -+#include -+#include -+ - #ifdef __cplusplus - extern "C" { - #endif - --#include -+#if defined(_POSIX_PRIORITY_SCHEDULING) -+/* -+ * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803 -+ */ -+int sched_setparam( -+ pid_t __pid, -+ const struct sched_param *__param -+); -+ -+/* -+ * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800 -+ */ -+int sched_getparam( -+ pid_t __pid, -+ struct sched_param *__param -+); -+ -+/* -+ * XBD 13 - Set Scheduling Policy and Scheduling Parameters, -+ * P1003.1b-2008, p. 1805 -+ */ -+int sched_setscheduler( -+ pid_t __pid, -+ int __policy, -+ const struct sched_param *__param -+); -+ -+/* -+ * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801 -+ */ -+int sched_getscheduler( -+ pid_t __pid -+); -+ -+/* -+ * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799 -+ */ -+int sched_get_priority_max( -+ int __policy -+); -+ -+int sched_get_priority_min( -+ int __policy -+); -+ -+/* -+ * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802 -+ */ -+int sched_rr_get_interval( -+ pid_t __pid, -+ struct timespec *__interval -+); -+#endif /* _POSIX_PRIORITY_SCHEDULING */ -+ -+#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) -+ -+/* -+ * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807 -+ */ -+int sched_yield( void ); -+ -+#endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */ - - #ifdef __cplusplus - } -diff -Naur newlib-1.18.0.orig/newlib/libc/include/stdint.h newlib-1.18.0/newlib/libc/include/stdint.h ---- newlib-1.18.0.orig/newlib/libc/include/stdint.h 2009-04-24 23:55:07.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/stdint.h 2011-04-19 03:39:58.580184813 +0200 -@@ -33,7 +33,7 @@ - /* Check if "long" is 64bit or 32bit wide */ - #if __STDINT_EXP(LONG_MAX) > 0x7fffffff - #define __have_long64 1 --#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) -+#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff - #define __have_long32 1 - #endif - -@@ -49,14 +49,14 @@ - #define __int_least8_t_defined 1 - #endif - --#if __STDINT_EXP(SHRT_MAX) == 0x7fff --typedef signed short int16_t; --typedef unsigned short uint16_t; --#define __int16_t_defined 1 --#elif __STDINT_EXP(INT_MAX) == 0x7fff -+#if __STDINT_EXP(INT_MAX) == 0x7fff - typedef signed int int16_t; - typedef unsigned int uint16_t; - #define __int16_t_defined 1 -+#elif __STDINT_EXP(SHRT_MAX) == 0x7fff -+typedef signed short int16_t; -+typedef unsigned short uint16_t; -+#define __int16_t_defined 1 - #elif __STDINT_EXP(SCHAR_MAX) == 0x7fff - typedef signed char int16_t; - typedef unsigned char uint16_t; -@@ -239,6 +239,29 @@ - * GCC doesn't provide an appropriate macro for [u]intptr_t - * For now, use __PTRDIFF_TYPE__ - */ -+#if defined(__SIZEOF_POINTER__) -+#if __SIZEOF_POINTER__ == 8 -+ typedef int64_t intptr_t; -+ typedef uint64_t uintptr_t; -+#define INTPTR_MAX INT64_MAX -+#define INTPTR_MIN INT64_MIN -+#define UINTPTR_MAX UINT64_MAX -+#elif __SIZEOF_POINTER__ == 4 -+ typedef int32_t intptr_t; -+ typedef uint32_t uintptr_t; -+#define INTPTR_MAX INT32_MAX -+#define INTPTR_MIN INT32_MIN -+#define UINTPTR_MAX UINT32_MAX -+#elif __SIZEOF_POINTER__ == 2 -+ typedef int16_t intptr_t; -+ typedef uint16_t uintptr_t; -+#define INTPTR_MAX INT16_MAX -+#define INTPTR_MIN INT16_MIN -+#define UINTPTR_MAX UINT16_MAX -+#else -+#error cannot determine intptr_t -+#endif -+#else - #if defined(__PTRDIFF_TYPE__) - typedef signed __PTRDIFF_TYPE__ intptr_t; - typedef unsigned __PTRDIFF_TYPE__ uintptr_t; -@@ -260,6 +283,7 @@ - #define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1) - #define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) - #endif -+#endif - - /* Limits of Specified-Width Integer Types */ - -@@ -408,6 +432,8 @@ - /* This must match size_t in stddef.h, currently long unsigned int */ - #ifdef __SIZE_MAX__ - #define SIZE_MAX __SIZE_MAX__ -+#elif defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__) -+#define SIZE_MAX (((1UL << (__SIZEOF_SIZE_T__ * __CHAR_BIT__ - 1)) - 1) * 2 + 1) - #else - #define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) - #endif -diff -Naur newlib-1.18.0.orig/newlib/libc/include/string.h newlib-1.18.0/newlib/libc/include/string.h ---- newlib-1.18.0.orig/newlib/libc/include/string.h 2008-06-18 17:27:27.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/string.h 2011-04-19 03:39:58.580184813 +0200 -@@ -49,18 +49,11 @@ - #ifndef __STRICT_ANSI__ - char *_EXFUN(strtok_r,(char *, const char *, char **)); - --int _EXFUN(bcmp,(const void *, const void *, size_t)); --void _EXFUN(bcopy,(const void *, void *, size_t)); --void _EXFUN(bzero,(void *, size_t)); --int _EXFUN(ffs,(int)); --char *_EXFUN(index,(const char *, int)); - _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t)); - _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); - _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); --char *_EXFUN(rindex,(const char *, int)); - char *_EXFUN(stpcpy,(char *, const char *)); - char *_EXFUN(stpncpy,(char *, const char *, size_t)); --int _EXFUN(strcasecmp,(const char *, const char *)); - char *_EXFUN(strcasestr,(const char *, const char *)); - char *_EXFUN(strdup,(const char *)); - char *_EXFUN(_strdup_r,(struct _reent *, const char *)); -@@ -69,7 +62,6 @@ - char *_EXFUN(strerror_r,(int, char *, size_t)); - size_t _EXFUN(strlcat,(char *, const char *, size_t)); - size_t _EXFUN(strlcpy,(char *, const char *, size_t)); --int _EXFUN(strncasecmp,(const char *, const char *, size_t)); - size_t _EXFUN(strnlen,(const char *, size_t)); - char *_EXFUN(strsep,(char **, const char *)); - char *_EXFUN(strlwr,(char *)); -@@ -81,20 +73,6 @@ - int _EXFUN(strtosigno, (const char *__name)); - #endif - --/* These function names are used on Windows and perhaps other systems. */ --#ifndef strcmpi --#define strcmpi strcasecmp --#endif --#ifndef stricmp --#define stricmp strcasecmp --#endif --#ifndef strncmpi --#define strncmpi strncasecmp --#endif --#ifndef strnicmp --#define strnicmp strncasecmp --#endif -- - #endif /* ! __STRICT_ANSI__ */ - - #include -diff -Naur newlib-1.18.0.orig/newlib/libc/include/strings.h newlib-1.18.0/newlib/libc/include/strings.h ---- newlib-1.18.0.orig/newlib/libc/include/strings.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/include/strings.h 2011-04-19 03:39:58.580184813 +0200 -@@ -0,0 +1,44 @@ -+/* -+ * strings.h -+ * -+ * Definitions for string operations. -+ */ -+ -+#ifndef _STRINGS_H_ -+#define _STRINGS_H_ -+ -+#include "_ansi.h" -+#include -+ -+#include /* for size_t */ -+#include /* for locale_t */ -+ -+_BEGIN_STD_C -+ -+#ifndef __STRICT_ANSI__ -+/* -+ * Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004 -+ * Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008 -+ */ -+int _EXFUN(bcmp,(const void *, const void *, size_t)); -+void _EXFUN(bcopy,(const void *, void *, size_t)); -+void _EXFUN(bzero,(void *, size_t)); -+char *_EXFUN(index,(const char *, int)); -+char *_EXFUN(rindex,(const char *, int)); -+#endif /* ! __STRICT_ANSI__ */ -+ -+int _EXFUN(ffs,(int)); -+int _EXFUN(strcasecmp,(const char *, const char *)); -+#if 0 -+/* Not implemented */ -+int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t)); -+#endif -+int _EXFUN(strncasecmp,(const char *, const char *, size_t)); -+#if 0 -+/* Not implemented */ -+int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t)); -+#endif -+ -+_END_STD_C -+ -+#endif /* _STRINGS_H_ */ -diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/features.h newlib-1.18.0/newlib/libc/include/sys/features.h ---- newlib-1.18.0.orig/newlib/libc/include/sys/features.h 2009-07-06 20:59:04.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/sys/features.h 2011-04-19 03:39:58.580184813 +0200 -@@ -33,7 +33,7 @@ - #define _POSIX_VERSION 199309L - #define _POSIX_ASYNCHRONOUS_IO 1 - #define _POSIX_FSYNC 1 --#define _POSIX_MAPPED_FILES 1 -+/* #define _POSIX_MAPPED_FILES 1 */ - #define _POSIX_MEMLOCK 1 - #define _POSIX_MEMLOCK_RANGE 1 - #define _POSIX_MEMORY_PROTECTION 1 -diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/sched.h newlib-1.18.0/newlib/libc/include/sys/sched.h ---- newlib-1.18.0.orig/newlib/libc/include/sys/sched.h 2002-06-20 21:51:24.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/sys/sched.h 2011-04-19 03:39:58.581184832 +0200 -@@ -1,7 +1,7 @@ - /* - * Written by Joel Sherrill . - * -- * COPYRIGHT (c) 1989-2000. -+ * COPYRIGHT (c) 1989-2010. - * On-Line Applications Research Corporation (OAR). - * - * Permission to use, copy, modify, and distribute this software for any -@@ -14,51 +14,53 @@ - * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS - * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * -- * $Id$ -+ * $Id$ - */ - - --#ifndef __POSIX_SYS_SCHEDULING_h --#define __POSIX_SYS_SCHEDULING_h -+#ifndef _SYS_SCHED_H_ -+#define _SYS_SCHED_H_ - - #ifdef __cplusplus - extern "C" { - #endif - --#include -- --#include --#include -- --/* Scheduling Policies, P1003.1b-1993, p. 250 -- NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. */ -- -+/* Scheduling Policies */ -+/* Open Group Specifications Issue 6 */ -+#if defined(__CYGWIN__) -+#define SCHED_OTHER 3 -+#else - #define SCHED_OTHER 0 -+#endif -+ - #define SCHED_FIFO 1 - #define SCHED_RR 2 - - #if defined(_POSIX_SPORADIC_SERVER) --#define SCHED_SPORADIC 3 -+#define SCHED_SPORADIC 4 - #endif - --/* Scheduling Parameters, P1003.1b-1993, p. 249 -- NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. */ -+/* Scheduling Parameters */ -+/* Open Group Specifications Issue 6 */ - - struct sched_param { - int sched_priority; /* Process execution scheduling priority */ - --#if defined(_POSIX_SPORADIC_SERVER) -- int ss_low_priority; /* Low scheduling priority for sporadic */ -+#if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER) -+ int sched_ss_low_priority; /* Low scheduling priority for sporadic */ - /* server */ -- struct timespec ss_replenish_period; -+ struct timespec sched_ss_repl_period; - /* Replenishment period for sporadic server */ -- struct timespec ss_initial_budget; /* Initial budget for sporadic server */ -+ struct timespec sched_ss_init_budget; -+ /* Initial budget for sporadic server */ -+ int sched_ss_max_repl; /* Maximum pending replenishments for */ -+ /* sporadic server */ - #endif - }; - - #ifdef __cplusplus - } --#endif -+#endif - - #endif - /* end of include file */ -diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/types.h newlib-1.18.0/newlib/libc/include/sys/types.h ---- newlib-1.18.0.orig/newlib/libc/include/sys/types.h 2009-09-28 18:42:21.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/include/sys/types.h 2011-04-19 03:39:58.581184832 +0200 -@@ -176,7 +176,11 @@ - #endif - typedef _ssize_t ssize_t; - --#ifndef __CYGWIN__ -+#if defined(__rtems__) -+typedef _mode_t mode_t; -+#endif -+ -+#if !defined(__CYGWIN__) && !defined(__rtems__) - #ifdef __MS_types__ - typedef char * addr_t; - typedef int mode_t; -diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am newlib-1.18.0/newlib/libc/machine/powerpc/Makefile.am ---- newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am 2007-05-24 19:33:35.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/machine/powerpc/Makefile.am 2011-04-19 03:39:58.581184832 +0200 -@@ -10,7 +10,7 @@ - - AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib - --lib_a_SOURCES = setjmp.S times.c -+lib_a_SOURCES = setjmp.S - lib_a_CCASFLAGS=$(AM_CCASFLAGS) - lib_a_CFLAGS=$(AM_CFLAGS) - lib_a_LIBADD = @extra_objs@ -diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in newlib-1.18.0/newlib/libc/machine/powerpc/Makefile.in ---- newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in 2009-10-21 00:44:03.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/machine/powerpc/Makefile.in 2011-04-19 03:39:58.581184832 +0200 -@@ -51,7 +51,7 @@ - LIBRARIES = $(noinst_LIBRARIES) - ARFLAGS = cru - lib_a_AR = $(AR) $(ARFLAGS) --am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-times.$(OBJEXT) -+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) - lib_a_OBJECTS = $(am_lib_a_OBJECTS) - DEFAULT_INCLUDES = -I.@am__isrc@ - depcomp = -@@ -173,7 +173,7 @@ - AM_CCASFLAGS = $(INCLUDES) - noinst_LIBRARIES = lib.a - AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib --lib_a_SOURCES = setjmp.S times.c -+lib_a_SOURCES = setjmp.S - lib_a_CCASFLAGS = $(AM_CCASFLAGS) - lib_a_CFLAGS = $(AM_CFLAGS) - lib_a_LIBADD = @extra_objs@ -@@ -184,7 +184,7 @@ - all: all-am - - .SUFFIXES: --.SUFFIXES: .S .c .o .obj -+.SUFFIXES: .S .o .obj - am--refresh: - @: - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) -@@ -245,18 +245,6 @@ - lib_a-setjmp.obj: setjmp.S - $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi` - --.c.o: -- $(COMPILE) -c $< -- --.c.obj: -- $(COMPILE) -c `$(CYGPATH_W) '$<'` -- --lib_a-times.o: times.c -- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c -- --lib_a-times.obj: times.c -- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` -- - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ -diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c newlib-1.18.0/newlib/libc/machine/powerpc/times.c ---- newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c 2002-07-22 22:26:51.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/machine/powerpc/times.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,36 +0,0 @@ --/* Time support routines for PowerPC. -- * -- * Written by Aldy Hernandez. -- */ -- --#include <_ansi.h> --#include --#include --#include --#include -- --clock_t --times (struct tms *tp) --{ -- struct rusage usage; -- union { -- struct rusage r; -- /* Newlib's rusage has only 2 fields. We need to make room for -- when we call the system's rusage. This should be enough. */ -- int filler[32]; -- } host_ru; -- -- getrusage (RUSAGE_SELF, (void *)&host_ru); -- -- if (tp) -- { -- tp->tms_utime = host_ru.r.ru_utime.tv_sec * 1000 -- + host_ru.r.ru_utime.tv_usec; -- tp->tms_stime = host_ru.r.ru_stime.tv_sec * 1000 -- + host_ru.r.ru_stime.tv_usec; -- tp->tms_cutime = 0; /* user time, children */ -- tp->tms_cstime = 0; /* system time, children */ -- } -- -- return tp->tms_utime; --} -diff -Naur newlib-1.18.0.orig/newlib/libc/misc/__dprintf.c newlib-1.18.0/newlib/libc/misc/__dprintf.c ---- newlib-1.18.0.orig/newlib/libc/misc/__dprintf.c 2008-12-11 18:27:55.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/misc/__dprintf.c 2011-04-19 03:39:58.585184904 +0200 -@@ -5,6 +5,7 @@ - */ - - #include <_ansi.h> -+#include - #include "ctype.h" - #include "reent.h" - #include "string.h" -@@ -131,7 +132,7 @@ - write_string (unctrl (c)); - break; - case 'p' : -- l = (_POINTER_INT) va_arg (args, char *); -+ l = (intptr_t) va_arg (args, char *); - print_number (16, 1, l); - break; - case 'd' : -diff -Naur newlib-1.18.0.orig/newlib/libc/misc/ffs.c newlib-1.18.0/newlib/libc/misc/ffs.c ---- newlib-1.18.0.orig/newlib/libc/misc/ffs.c 2003-06-06 21:57:51.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/misc/ffs.c 2011-04-19 03:39:58.585184904 +0200 -@@ -24,7 +24,7 @@ - - No supporting OS subroutines are required. */ - --#include <_ansi.h> -+#include - - int - _DEFUN(ffs, (word), -diff -Naur newlib-1.18.0.orig/newlib/libc/posix/opendir.c newlib-1.18.0/newlib/libc/posix/opendir.c ---- newlib-1.18.0.orig/newlib/libc/posix/opendir.c 2003-06-06 21:57:51.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/posix/opendir.c 2011-04-19 03:39:58.585184904 +0200 -@@ -74,6 +74,7 @@ - dirp->dd_len = 512; - - if (dirp->dd_buf == NULL) { -+ free(dirp); - close (fd); - return NULL; - } -diff -Naur newlib-1.18.0.orig/newlib/libc/posix/readdir.c newlib-1.18.0/newlib/libc/posix/readdir.c ---- newlib-1.18.0.orig/newlib/libc/posix/readdir.c 2003-06-06 21:57:51.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/posix/readdir.c 2011-04-19 03:39:58.585184904 +0200 -@@ -37,6 +37,7 @@ - static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90"; - #endif /* LIBC_SCCS and not lint */ - -+#include - #include - - extern int getdents (int fd, void *dp, int count); -@@ -75,7 +76,7 @@ - continue; - } - dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); -- if ((int)dp & 03) { /* bogus pointer check */ -+ if ((intptr_t)dp & 03) { /* bogus pointer check */ - #ifdef HAVE_DD_LOCK - __lock_release_recursive(dirp->dd_lock); - #endif -diff -Naur newlib-1.18.0.orig/newlib/libc/posix/rewinddir.c newlib-1.18.0/newlib/libc/posix/rewinddir.c ---- newlib-1.18.0.orig/newlib/libc/posix/rewinddir.c 2003-06-06 21:57:51.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/posix/rewinddir.c 2011-04-19 03:39:58.585184904 +0200 -@@ -48,7 +48,7 @@ - #ifdef HAVE_DD_LOCK - __lock_acquire_recursive(dirp->dd_lock); - #endif -- _seekdir((dirp), (off_t)0); -+ _seekdir((dirp), 0L); - #ifdef HAVE_DD_LOCK - __lock_release_recursive(dirp->dd_lock); - #endif -diff -Naur newlib-1.18.0.orig/newlib/libc/posix/telldir.c newlib-1.18.0/newlib/libc/posix/telldir.c ---- newlib-1.18.0.orig/newlib/libc/posix/telldir.c 2008-11-27 22:01:40.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/posix/telldir.c 2011-04-19 03:39:58.586184923 +0200 -@@ -67,7 +67,7 @@ - #define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */ - #define LOCHASH(i) ((i)&(NDIRHASH-1)) - --static long dd_loccnt; /* Index of entry for sequential readdir's */ -+static long dd_loccnt = 1; /* Index of entry for sequential readdir's */ - static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */ - __LOCK_INIT(static, dd_hash_lock); - -@@ -119,40 +119,46 @@ - register struct ddloc *lp; - register struct ddloc **prevlp; - struct dirent *dp; -- extern long lseek(); - - #ifdef HAVE_DD_LOCK - __lock_acquire(dd_hash_lock); - #endif -- prevlp = &dd_hash[LOCHASH(loc)]; -- lp = *prevlp; -- while (lp != NULL) { -- if (lp->loc_index == loc) -- break; -- prevlp = &lp->loc_next; -- lp = lp->loc_next; -- } -- if (lp == NULL) { -+ if (loc != 0) { -+ prevlp = &dd_hash[LOCHASH(loc)]; -+ lp = *prevlp; -+ while (lp != NULL) { -+ if (lp->loc_index == loc) -+ break; -+ prevlp = &lp->loc_next; -+ lp = lp->loc_next; -+ } -+ if (lp == NULL) { - #ifdef HAVE_DD_LOCK -- __lock_release(dd_hash_lock); -+ __lock_release(dd_hash_lock); - #endif -- return; -- } -- if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) -- goto found; -- (void) lseek(dirp->dd_fd, lp->loc_seek, 0); -- dirp->dd_seek = lp->loc_seek; -- dirp->dd_loc = 0; -- while (dirp->dd_loc < lp->loc_loc) { -- dp = readdir(dirp); -- if (dp == NULL) -- break; -- } -+ return; -+ } -+ if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) -+ goto found; -+ (void) lseek(dirp->dd_fd, lp->loc_seek, 0); -+ dirp->dd_seek = lp->loc_seek; -+ dirp->dd_loc = 0; -+ while (dirp->dd_loc < lp->loc_loc) { -+ dp = readdir(dirp); -+ if (dp == NULL) -+ break; -+ } - found: - #ifdef SINGLEUSE -- *prevlp = lp->loc_next; -- free((caddr_t)lp); -+ *prevlp = lp->loc_next; -+ free((caddr_t)lp); - #endif -+ } else { -+ // loc 0 means rewinding -+ (void) lseek(dirp->dd_fd, 0, 0); -+ dirp->dd_seek = 0; -+ dirp->dd_loc = 0; -+ } - #ifdef HAVE_DD_LOCK - __lock_release(dd_hash_lock); - #endif -@@ -169,26 +175,26 @@ - __lock_acquire(dd_hash_lock); - #endif - for (i = 0; i < NDIRHASH; ++i) { -+ struct ddloc head; - register struct ddloc *lp; - register struct ddloc *prevlp; -+ - lp = dd_hash[i]; -- while (lp != NULL && lp->loc_dirp == dirp) { -- dd_hash[i] = lp->loc_next; -- prevlp = lp; -- free((caddr_t)lp); -- lp = prevlp->loc_next; -- } -- prevlp = lp; -+ head.loc_next = lp; -+ prevlp = &head; - while (lp != NULL) { -- lp = lp->loc_next; -- if (lp != NULL && lp->loc_dirp == dirp) { -- prevlp->loc_next = lp->loc_next; -+ struct ddloc *nextlp; -+ -+ nextlp = lp->loc_next; -+ if (lp->loc_dirp == dirp) { -+ prevlp->loc_next = nextlp; - free((caddr_t)lp); -- lp = prevlp; - } - else - prevlp = lp; -+ lp = nextlp; - } -+ dd_hash[i] = head.loc_next; - } - #ifdef HAVE_DD_LOCK - __lock_release(dd_hash_lock); -diff -Naur newlib-1.18.0.orig/newlib/libc/search/db_local.h newlib-1.18.0/newlib/libc/search/db_local.h ---- newlib-1.18.0.orig/newlib/libc/search/db_local.h 2002-06-25 01:05:08.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/search/db_local.h 2011-04-19 03:39:58.586184923 +0200 -@@ -102,11 +102,11 @@ - typedef struct __db { - DBTYPE type; /* Underlying db type. */ - int (*close)(struct __db *); -- int (*del)(const struct __db *, const DBT *, u_int); -- int (*get)(const struct __db *, const DBT *, DBT *, u_int); -- int (*put)(const struct __db *, DBT *, const DBT *, u_int); -- int (*seq)(const struct __db *, DBT *, DBT *, u_int); -- int (*sync)(const struct __db *, u_int); -+ int (*del)(const struct __db *, const DBT *, __uint32_t); -+ int (*get)(const struct __db *, const DBT *, DBT *, __uint32_t); -+ int (*put)(const struct __db *, DBT *, const DBT *, __uint32_t); -+ int (*seq)(const struct __db *, DBT *, DBT *, __uint32_t); -+ int (*sync)(const struct __db *, __uint32_t); - void *internal; /* Access method private. */ - int (*fd)(const struct __db *); - } DB; -diff -Naur newlib-1.18.0.orig/newlib/libc/search/extern.h newlib-1.18.0/newlib/libc/search/extern.h ---- newlib-1.18.0.orig/newlib/libc/search/extern.h 2002-06-20 21:51:31.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/search/extern.h 2011-04-19 03:39:58.586184923 +0200 -@@ -43,7 +43,7 @@ - int __big_split(HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, - int, __uint32_t, SPLIT_RETURN *); - int __buf_free(HTAB *, int, int); --void __buf_init(HTAB *, int); -+void __buf_init(HTAB *, __uint32_t); - __uint32_t __call_hash(HTAB *, char *, int); - int __delpair(HTAB *, BUFHEAD *, int); - int __expand_table(HTAB *); -diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash_buf.c newlib-1.18.0/newlib/libc/search/hash_buf.c ---- newlib-1.18.0.orig/newlib/libc/search/hash_buf.c 2004-05-26 19:57:10.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/search/hash_buf.c 2011-04-19 03:39:58.586184923 +0200 -@@ -118,7 +118,7 @@ - int newpage; /* If prev_bp set, indicates a new overflow page. */ - { - BUFHEAD *bp; -- __uint32_t is_disk_mask; -+ ptrdiff_t is_disk_mask; - int is_disk, segment_ndx; - SEGMENT segp; - -@@ -298,7 +298,7 @@ - extern void - __buf_init(hashp, nbytes) - HTAB *hashp; -- int nbytes; -+ __uint32_t nbytes; - { - BUFHEAD *bfp; - int npages; -diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash.h newlib-1.18.0/newlib/libc/search/hash.h ---- newlib-1.18.0.orig/newlib/libc/search/hash.h 2008-07-02 20:38:45.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/search/hash.h 2011-04-19 03:39:58.586184923 +0200 -@@ -82,7 +82,7 @@ - - /* Hash Table Information */ - typedef struct hashhdr { /* Disk resident portion */ -- int magic; /* Magic NO for hash tables */ -+ __uint32_t magic; /* Magic NO for hash tables */ - int version; /* Version ID */ - __uint32_t lorder; /* Byte Order */ - int bsize; /* Bucket/Page Size */ -@@ -97,7 +97,7 @@ - int high_mask; /* Mask to modulo into entire table */ - int low_mask; /* Mask to modulo into lower half of - * table */ -- int ffactor; /* Fill factor */ -+ __uint32_t ffactor; /* Fill factor */ - int nkeys; /* Number of keys in hash table */ - int hdrpages; /* Size of table header */ - int h_charkey; /* value of hash(CHARKEY) */ -diff -Naur newlib-1.18.0.orig/newlib/libc/stdio/open_memstream.c newlib-1.18.0/newlib/libc/stdio/open_memstream.c ---- newlib-1.18.0.orig/newlib/libc/stdio/open_memstream.c 2009-02-25 05:00:05.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/stdio/open_memstream.c 2011-04-19 03:39:58.587184942 +0200 -@@ -330,8 +330,10 @@ - c->max *= sizeof(wchar_t); - if (c->max < 64) - c->max = 64; -- else if (c->max > 64 * 1024) -- c->max = 64 * 1024; -+#if (SIZE_MAX >= 0x10000) -+ else if (c->max > 0x10000) -+ c->max = 0x10000; -+#endif - *size = 0; - *buf = _malloc_r (ptr, c->max); - if (!*buf) -diff -Naur newlib-1.18.0.orig/newlib/libc/stdio/tmpnam.c newlib-1.18.0/newlib/libc/stdio/tmpnam.c ---- newlib-1.18.0.orig/newlib/libc/stdio/tmpnam.c 2004-04-23 22:01:55.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/stdio/tmpnam.c 2011-04-19 03:39:58.587184942 +0200 -@@ -94,6 +94,7 @@ - #include <_ansi.h> - #include - #include -+#include - #include - #include - #include -@@ -109,7 +110,7 @@ - char *result _AND - _CONST char *part1 _AND - _CONST char *part2 _AND -- int part3 _AND -+ intptr_t part3 _AND - int *part4) - { - /* Generate the filename and make sure that there isn't one called -@@ -183,7 +184,7 @@ - if (filename) - { - if (! worker (p, filename, dir, prefix, -- _getpid_r (p) ^ (int) (_POINTER_INT) p, &p->_inc)) -+ _getpid_r (p) ^ (intptr_t) p, &p->_inc)) - return NULL; - } - return filename; -diff -Naur newlib-1.18.0.orig/newlib/libc/stdlib/putenv_r.c newlib-1.18.0/newlib/libc/stdlib/putenv_r.c ---- newlib-1.18.0.orig/newlib/libc/stdlib/putenv_r.c 2004-11-24 23:34:14.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/stdlib/putenv_r.c 2011-04-19 03:39:58.587184942 +0200 -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - #include "envlock.h" - -diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcmp.c newlib-1.18.0/newlib/libc/string/bcmp.c ---- newlib-1.18.0.orig/newlib/libc/string/bcmp.c 2005-10-28 23:21:07.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/bcmp.c 2011-04-19 03:39:58.587184942 +0200 -@@ -6,11 +6,11 @@ - bcmp - - ANSI_SYNOPSIS -- #include -+ #include - int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>); - - TRAD_SYNOPSIS -- #include -+ #include - int bcmp(<[s1]>, <[s2]>, <[n]>) - const void *<[s1]>; - const void *<[s2]>; -@@ -35,7 +35,7 @@ - bcmp ansi pure - */ - --#include -+#include - - int - _DEFUN (bcmp, (m1, m2, n), -diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcopy.c newlib-1.18.0/newlib/libc/string/bcopy.c ---- newlib-1.18.0.orig/newlib/libc/string/bcopy.c 2002-05-23 20:46:04.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/bcopy.c 2011-04-19 03:39:58.587184942 +0200 -@@ -3,7 +3,7 @@ - <>---copy memory regions - - ANSI_SYNOPSIS -- #include -+ #include - void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>); - - TRAD_SYNOPSIS -@@ -26,7 +26,7 @@ - bcopy - pure - */ - --#include -+#include - - void - _DEFUN (bcopy, (b1, b2, length), -diff -Naur newlib-1.18.0.orig/newlib/libc/string/bzero.c newlib-1.18.0/newlib/libc/string/bzero.c ---- newlib-1.18.0.orig/newlib/libc/string/bzero.c 2002-05-23 20:46:04.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/bzero.c 2011-04-19 03:39:58.587184942 +0200 -@@ -6,11 +6,11 @@ - bzero - - ANSI_SYNOPSIS -- #include -+ #include - void bzero(void *<[b]>, size_t <[length]>); - - TRAD_SYNOPSIS -- #include -+ #include - void bzero(<[b]>, <[length]>) - void *<[b]>; - size_t <[length]>; -@@ -30,7 +30,7 @@ - <> requires no supporting OS subroutines. - */ - --#include -+#include - - _VOID - _DEFUN (bzero, (b, length), -diff -Naur newlib-1.18.0.orig/newlib/libc/string/index.c newlib-1.18.0/newlib/libc/string/index.c ---- newlib-1.18.0.orig/newlib/libc/string/index.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/index.c 2011-04-19 03:39:58.588184961 +0200 -@@ -10,7 +10,7 @@ - char * index(const char *<[string]>, int <[c]>); - - TRAD_SYNOPSIS -- #include -+ #include - char * index(<[string]>, <[c]>); - char *<[string]>; - int *<[c]>; -@@ -33,7 +33,8 @@ - index - pure - */ - --#include -+#include -+#include /* strchr */ - - char * - _DEFUN (index, (s, c), -diff -Naur newlib-1.18.0.orig/newlib/libc/string/memccpy.c newlib-1.18.0/newlib/libc/string/memccpy.c ---- newlib-1.18.0.orig/newlib/libc/string/memccpy.c 2002-07-23 23:38:00.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/memccpy.c 2011-04-19 03:39:58.588184961 +0200 -@@ -35,13 +35,14 @@ - */ - - #include <_ansi.h> -+#include - #include - #include - #include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - /* How many bytes are copied each iteration of the word copy loop. */ - #define LITTLEBLOCKSIZE (sizeof (long)) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/memchr.c newlib-1.18.0/newlib/libc/string/memchr.c ---- newlib-1.18.0.orig/newlib/libc/string/memchr.c 2008-05-27 01:31:08.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/memchr.c 2011-04-19 03:39:58.588184961 +0200 -@@ -38,10 +38,11 @@ - - #include <_ansi.h> - #include -+#include - #include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ --#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) -+#define UNALIGNED(X) ((intptr_t)X & (sizeof (long) - 1)) - - /* How many bytes are loaded each iteration of the word copy loop. */ - #define LBLOCKSIZE (sizeof (long)) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/memcmp.c newlib-1.18.0/newlib/libc/string/memcmp.c ---- newlib-1.18.0.orig/newlib/libc/string/memcmp.c 2005-03-06 21:40:05.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/memcmp.c 2011-04-19 03:39:58.588184961 +0200 -@@ -37,11 +37,11 @@ - */ - - #include -- -+#include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - /* How many bytes are copied each iteration of the word copy loop. */ - #define LBLOCKSIZE (sizeof (long)) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/memcpy.c newlib-1.18.0/newlib/libc/string/memcpy.c ---- newlib-1.18.0.orig/newlib/libc/string/memcpy.c 2008-12-11 18:27:56.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/memcpy.c 2011-04-19 03:39:58.588184961 +0200 -@@ -34,11 +34,12 @@ - */ - - #include <_ansi.h> -+#include - #include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - /* How many bytes are copied each iteration of the 4X unrolled loop. */ - #define BIGBLOCKSIZE (sizeof (long) << 2) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/memmove.c newlib-1.18.0/newlib/libc/string/memmove.c ---- newlib-1.18.0.orig/newlib/libc/string/memmove.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/memmove.c 2011-04-19 03:39:58.588184961 +0200 -@@ -36,13 +36,14 @@ - */ - - #include -+#include - #include <_ansi.h> - #include - #include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - /* How many bytes are copied each iteration of the 4X unrolled loop. */ - #define BIGBLOCKSIZE (sizeof (long) << 2) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/mempcpy.c newlib-1.18.0/newlib/libc/string/mempcpy.c ---- newlib-1.18.0.orig/newlib/libc/string/mempcpy.c 2002-07-23 23:38:00.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/mempcpy.c 2011-04-19 03:39:58.588184961 +0200 -@@ -34,10 +34,11 @@ - #include - #include - #include -+#include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1))) - - /* How many bytes are copied each iteration of the 4X unrolled loop. */ - #define BIGBLOCKSIZE (sizeof (long) << 2) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/memset.c newlib-1.18.0/newlib/libc/string/memset.c ---- newlib-1.18.0.orig/newlib/libc/string/memset.c 2008-05-27 20:44:40.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/memset.c 2011-04-19 03:39:58.589184979 +0200 -@@ -34,9 +34,10 @@ - */ - - #include -+#include - - #define LBLOCKSIZE (sizeof(long)) --#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) -+#define UNALIGNED(X) ((intptr_t)X & (LBLOCKSIZE - 1)) - #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) - - _PTR -diff -Naur newlib-1.18.0.orig/newlib/libc/string/rindex.c newlib-1.18.0/newlib/libc/string/rindex.c ---- newlib-1.18.0.orig/newlib/libc/string/rindex.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/rindex.c 2011-04-19 03:39:58.589184979 +0200 -@@ -10,7 +10,7 @@ - char * rindex(const char *<[string]>, int <[c]>); - - TRAD_SYNOPSIS -- #include -+ #include - char * rindex(<[string]>, <[c]>); - char *<[string]>; - int *<[c]>; -@@ -33,7 +33,8 @@ - rindex - pure - */ - --#include -+#include -+#include /* strchr */ - - char * - _DEFUN (rindex, (s, c), -diff -Naur newlib-1.18.0.orig/newlib/libc/string/stpcpy.c newlib-1.18.0/newlib/libc/string/stpcpy.c ---- newlib-1.18.0.orig/newlib/libc/string/stpcpy.c 2007-06-28 19:07:23.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/stpcpy.c 2011-04-19 03:39:58.589184979 +0200 -@@ -34,6 +34,7 @@ - */ - - #include -+#include - #include - - /*SUPPRESS 560*/ -@@ -41,7 +42,7 @@ - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/stpncpy.c newlib-1.18.0/newlib/libc/string/stpncpy.c ---- newlib-1.18.0.orig/newlib/libc/string/stpncpy.c 2007-06-28 19:07:23.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/stpncpy.c 2011-04-19 03:39:58.589184979 +0200 -@@ -40,6 +40,7 @@ - */ - - #include -+#include - #include - - /*SUPPRESS 560*/ -@@ -47,7 +48,7 @@ - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c newlib-1.18.0/newlib/libc/string/strcasecmp.c ---- newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c 2009-04-23 20:11:22.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/strcasecmp.c 2011-04-19 03:39:58.589184979 +0200 -@@ -38,7 +38,7 @@ - strcasecmp - */ - --#include -+#include - #include - - int -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcat.c newlib-1.18.0/newlib/libc/string/strcat.c ---- newlib-1.18.0.orig/newlib/libc/string/strcat.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/strcat.c 2011-04-19 03:39:58.590184997 +0200 -@@ -33,12 +33,13 @@ - strcat ansi pure - */ - -+#include - #include - #include - - /* Nonzero if X is aligned on a "long" boundary. */ - #define ALIGNED(X) \ -- (((long)X & (sizeof (long) - 1)) == 0) -+ (((uintptr_t)X & (sizeof (long) - 1)) == 0) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strchr.c newlib-1.18.0/newlib/libc/string/strchr.c ---- newlib-1.18.0.orig/newlib/libc/string/strchr.c 2008-05-22 04:31:46.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/strchr.c 2011-04-19 03:39:58.590184997 +0200 -@@ -33,11 +33,12 @@ - strchr ansi pure - */ - -+#include - #include - #include - - /* Nonzero if X is not aligned on a "long" boundary. */ --#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) -+#define UNALIGNED(X) ((uintptr_t)X & (sizeof (long) - 1)) - - /* How many bytes are loaded each iteration of the word copy loop. */ - #define LBLOCKSIZE (sizeof (long)) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcmp.c newlib-1.18.0/newlib/libc/string/strcmp.c ---- newlib-1.18.0.orig/newlib/libc/string/strcmp.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/strcmp.c 2011-04-19 03:39:58.590184997 +0200 -@@ -35,12 +35,13 @@ - strcmp ansi pure - */ - -+#include - #include - #include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1))) - - /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ - #if LONG_MAX == 2147483647L -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcpy.c newlib-1.18.0/newlib/libc/string/strcpy.c ---- newlib-1.18.0.orig/newlib/libc/string/strcpy.c 2007-05-29 23:26:59.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/strcpy.c 2011-04-19 03:39:58.590184997 +0200 -@@ -32,6 +32,7 @@ - strcpy ansi pure - */ - -+#include - #include - #include - -@@ -40,7 +41,7 @@ - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strlen.c newlib-1.18.0/newlib/libc/string/strlen.c ---- newlib-1.18.0.orig/newlib/libc/string/strlen.c 2008-05-27 00:56:14.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/strlen.c 2011-04-19 03:39:58.590184997 +0200 -@@ -32,11 +32,12 @@ - */ - - #include <_ansi.h> -+#include - #include - #include - - #define LBLOCKSIZE (sizeof (long)) --#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) -+#define UNALIGNED(X) ((intptr_t)X & (LBLOCKSIZE - 1)) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c newlib-1.18.0/newlib/libc/string/strncasecmp.c ---- newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c 2009-04-23 20:11:22.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/strncasecmp.c 2011-04-19 03:39:58.590184997 +0200 -@@ -6,11 +6,11 @@ - strncasecmp - - ANSI_SYNOPSIS -- #include -+ #include - int strncasecmp(const char *<[a]>, const char * <[b]>, size_t <[length]>); - - TRAD_SYNOPSIS -- #include -+ #include - int strncasecmp(<[a]>, <[b]>, <[length]>) - char *<[a]>; - char *<[b]>; -@@ -40,7 +40,7 @@ - strncasecmp - */ - --#include -+#include - #include - - int -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncat.c newlib-1.18.0/newlib/libc/string/strncat.c ---- newlib-1.18.0.orig/newlib/libc/string/strncat.c 2005-10-28 23:21:07.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/strncat.c 2011-04-19 03:39:58.591185015 +0200 -@@ -42,11 +42,12 @@ - */ - - #include -+#include - #include - - /* Nonzero if X is aligned on a "long" boundary. */ - #define ALIGNED(X) \ -- (((long)X & (sizeof (long) - 1)) == 0) -+ (((intptr_t)X & (sizeof (long) - 1)) == 0) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncmp.c newlib-1.18.0/newlib/libc/string/strncmp.c ---- newlib-1.18.0.orig/newlib/libc/string/strncmp.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/strncmp.c 2011-04-19 03:39:58.591185015 +0200 -@@ -36,12 +36,13 @@ - strncmp ansi pure - */ - -+#include - #include - #include - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1))) - - /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ - #if LONG_MAX == 2147483647L -diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncpy.c newlib-1.18.0/newlib/libc/string/strncpy.c ---- newlib-1.18.0.orig/newlib/libc/string/strncpy.c 2000-02-17 20:39:48.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/string/strncpy.c 2011-04-19 03:39:58.591185015 +0200 -@@ -38,6 +38,7 @@ - */ - - #include -+#include - #include - - /*SUPPRESS 560*/ -@@ -45,7 +46,7 @@ - - /* Nonzero if either X or Y is not aligned on a "long" boundary. */ - #define UNALIGNED(X, Y) \ -- (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) -+ (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1))) - - #if LONG_MAX == 2147483647L - #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -diff -Naur newlib-1.18.0.orig/newlib/libc/string/str-two-way.h newlib-1.18.0/newlib/libc/string/str-two-way.h ---- newlib-1.18.0.orig/newlib/libc/string/str-two-way.h 2008-10-02 22:12:34.000000000 +0200 -+++ newlib-1.18.0/newlib/libc/string/str-two-way.h 2011-04-19 03:39:58.589184979 +0200 -@@ -1,5 +1,5 @@ - /* Byte-wise substring search, using the Two-Way algorithm. -- * Copyright (C) 2008 Eric Blake -+ * Copyright (C) 2008, 2010 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -@@ -335,8 +335,8 @@ - a byte out of place, there can be no match until - after the mismatch. */ - shift = needle_len - period; -- memory = 0; - } -+ memory = 0; - j += shift; - continue; - } -diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/crt0.c newlib-1.18.0/newlib/libc/sys/rtems/crt0.c ---- newlib-1.18.0.orig/newlib/libc/sys/rtems/crt0.c 2009-12-16 19:28:14.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/sys/rtems/crt0.c 2011-04-19 03:39:58.591185015 +0200 -@@ -24,8 +24,8 @@ - /* RTEMS provides some of its own routines including a Malloc family */ - RTEMS_STUB(void *,malloc(size_t s)) { return 0; } - RTEMS_STUB(void *,realloc(void* p, size_t s)) { return 0; } --RTEMS_STUB(void, free(void)) { ; } --RTEMS_STUB(_PTR, calloc(struct _reent *r, size_t s1, size_t s2)) {} -+RTEMS_STUB(void, free(void* ptr)) { ; } -+RTEMS_STUB(_PTR, calloc(size_t s1, size_t s2)) {} - - #if defined(__GNUC__) - /* -@@ -49,6 +49,7 @@ - #endif - - /* stubs for functions RTEMS provides */ -+RTEMS_STUB(int, clock_gettime(clockid_t clk_id, struct timespec *tp)) { return -1; } - RTEMS_STUB(int, close (int fd)) { return -1; } - RTEMS_STUB(int, dup2(int oldfd, int newfd)) { return -1; } - RTEMS_STUB(int, fcntl( int fd, int cmd, ... /* arg */ )) { return -1; } -@@ -56,6 +57,7 @@ - RTEMS_STUB(int, fstat(int fd, struct stat *buf)) { return -1; } - RTEMS_STUB(int, getdents(int fd, void *dp, int count)) { return -1; } - RTEMS_STUB(char *, getlogin(void)) { return 0; } -+RTEMS_STUB(int, gettimeofday(struct timeval *tv, struct timezone *tz)) { return -1; } - RTEMS_STUB(struct passwd *, getpwnam(const char *name)) { return 0; } - RTEMS_STUB(struct passwd *, getpwuid(uid_t uid)) { return 0; } - RTEMS_STUB(uid_t, getuid(void)) { return 0; } -@@ -65,6 +67,7 @@ - RTEMS_STUB(int, open(const char *pathname, int flags, int mode)) { return -1; } - RTEMS_STUB(int, pipe(int pipefd[2])) { return -1; } - RTEMS_STUB(_ssize_t, read(int fd, void *buf, size_t count)) { return -1; } -+RTEMS_STUB(int, sched_yield(void)) { return -1; } - RTEMS_STUB(int, sigfillset(sigset_t *set)) { return -1; } - RTEMS_STUB(int, sigprocmask(int how, const sigset_t *set, sigset_t *oldset)) { return -1; } - RTEMS_STUB(int, stat(const char *path, struct stat *buf)) { return -1; } -@@ -95,7 +98,7 @@ - RTEMS_STUB(int, _kill_r (struct _reent *r, int pid, int sig )) { return -1; } - #if !defined(REENTRANT_SYSCALLS_PROVIDED) - /* cf. newlib/libc/reent/linkr.c */ --RTEMS_STUB(int, _link_r (struct _reent *, const char *, const char *)) { return -1; } -+RTEMS_STUB(int, _link_r (struct _reent *r, const char *oldpath, const char *newpath)) { return -1; } - #endif - RTEMS_STUB(_off_t, _lseek_r ( struct _reent *ptr, int fd, _off_t offset, int whence )) { return -1; } - RTEMS_STUB(int, _open_r (struct _reent *r, const char *buf, int flags, int mode)) { return -1; } -@@ -103,14 +106,14 @@ - RTEMS_STUB(int, _rename_r (struct _reent *r, const char *a, const char *b)){ return -1; } - #if !(defined (REENTRANT_SYSCALLS_PROVIDED) || defined (MALLOC_PROVIDED)) - /* cf. newlib/libc/reent/sbrkr.c */ --RTEMS_STUB(void *,_sbrk_r (struct _reent *r, ptrdiff_t)) { return -1; } -+RTEMS_STUB(void *,_sbrk_r (struct _reent *r, ptrdiff_t addr)) { return 0; } - #endif - RTEMS_STUB(int, _stat_r (struct _reent *r, const char *path, struct stat *buf)) { return -1; } - RTEMS_STUB(_CLOCK_T_, _times_r (struct _reent *r, struct tms *ptms)) { return -1; } - RTEMS_STUB(int, _unlink_r (struct _reent *r, const char *path)) { return -1; } - #if !(defined (REENTRANT_SYSCALLS_PROVIDED) || defined (NO_EXEC)) - /* cf. newlib/libc/reent/execr.c */ --RTEMS_STUB(int, _wait_r (struct _reent *r, int *)) { return -1; } -+RTEMS_STUB(int, _wait_r (struct _reent *r, int *status)) { return -1; } - #endif - RTEMS_STUB(_ssize_t, _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)) { return -1; } - -diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/include/limits.h newlib-1.18.0/newlib/libc/sys/rtems/include/limits.h ---- newlib-1.18.0.orig/newlib/libc/sys/rtems/include/limits.h 2008-11-17 23:05:12.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/sys/rtems/include/limits.h 2011-04-19 03:39:58.591185015 +0200 -@@ -78,7 +78,11 @@ - * Invariant values - */ - -+#if defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__) -+#define SSIZE_MAX ((1UL << (__SIZEOF_SIZE_T__ * __CHAR_BIT__ - 1)) - 1) -+#else /* historic fallback, wrong in most cases */ - #define SSIZE_MAX 32767 -+#endif - - /* - * Maximum Values -diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h newlib-1.18.0/newlib/libc/sys/rtems/machine/_types.h ---- newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h 2009-12-17 17:10:41.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/sys/rtems/machine/_types.h 2011-04-19 03:39:58.591185015 +0200 -@@ -31,4 +31,25 @@ - - typedef __int32_t blksize_t; - typedef __int32_t blkcnt_t; -+ -+/* EXPERIMENTAL: Use 64bit types */ -+#if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__) -+/* Use 64bit types */ -+typedef __int64_t _off_t; -+#define __off_t_defined 1 -+ -+typedef __int64_t _fpos_t; -+#define __fpos_t_defined 1 -+#else -+/* Use 32bit types */ -+typedef __int32_t _off_t; -+#define __off_t_defined 1 -+ -+typedef __int32_t _fpos_t; -+#define __fpos_t_defined 1 -+#endif -+ -+typedef __uint32_t _mode_t; -+#define __mode_t_defined 1 -+ - #endif -diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/sys/dirent.h newlib-1.18.0/newlib/libc/sys/rtems/sys/dirent.h ---- newlib-1.18.0.orig/newlib/libc/sys/rtems/sys/dirent.h 2004-01-08 20:25:21.000000000 +0100 -+++ newlib-1.18.0/newlib/libc/sys/rtems/sys/dirent.h 2011-04-19 03:39:58.592185033 +0200 -@@ -31,6 +31,10 @@ - void seekdir(DIR *dir, long loc); - long telldir(DIR *dir); - -+#ifdef _COMPILING_NEWLIB -+void _seekdir(DIR *dir, long offset); -+#endif -+ - #include - - #include -diff -Naur newlib-1.18.0.orig/newlib/libm/common/fdlibm.h newlib-1.18.0/newlib/libm/common/fdlibm.h ---- newlib-1.18.0.orig/newlib/libm/common/fdlibm.h 2009-11-17 23:35:46.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/fdlibm.h 2011-04-19 03:39:58.592185033 +0200 -@@ -361,3 +361,12 @@ - sf_u.word = (i); \ - (d) = sf_u.value; \ - } while (0) -+ -+/* Macros to avoid undefined behaviour that can arise if the amount -+ of a shift is exactly equal to the size of the shifted operand. */ -+ -+#define SAFE_LEFT_SHIFT(op,amt) \ -+ (((amt) < 8 * sizeof(op)) ? ((op) << (amt)) : 0) -+ -+#define SAFE_RIGHT_SHIFT(op,amt) \ -+ (((amt) < 8 * sizeof(op)) ? ((op) >> (amt)) : 0) -diff -Naur newlib-1.18.0.orig/newlib/libm/common/modfl.c newlib-1.18.0/newlib/libm/common/modfl.c ---- newlib-1.18.0.orig/newlib/libm/common/modfl.c 2009-04-18 00:15:43.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/modfl.c 2011-04-19 03:39:58.592185033 +0200 -@@ -36,7 +36,7 @@ - long double - modfl (long double x, long double *iptr) - { -- return modf(x, iptr); -+ return modf(x, (double*) iptr); - } - #endif - -diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_ilogb.c newlib-1.18.0/newlib/libm/common/sf_ilogb.c ---- newlib-1.18.0.orig/newlib/libm/common/sf_ilogb.c 2001-04-04 15:30:59.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/sf_ilogb.c 2011-04-19 03:39:58.594185070 +0200 -@@ -13,8 +13,8 @@ - * ==================================================== - */ - --#include "fdlibm.h" - #include -+#include "fdlibm.h" - - #ifdef __STDC__ - int ilogbf(float x) -@@ -28,11 +28,14 @@ - GET_FLOAT_WORD(hx,x); - hx &= 0x7fffffff; - if(FLT_UWORD_IS_ZERO(hx)) -- return - INT_MAX; /* ilogb(0) = 0x80000001 */ -+ return FP_ILOGB0; /* ilogb(0) = special case error */ - if(FLT_UWORD_IS_SUBNORMAL(hx)) { - for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1; - return ix; - } -+ #if FP_ILOGBNAN != INT_MAX -+ else if (FLT_UWORD_IS_NAN(hx)) return FP_ILOGBNAN; /* NAN */ -+ #endif - else if (!FLT_UWORD_IS_FINITE(hx)) return INT_MAX; - else return (hx>>23)-127; - } -diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c newlib-1.18.0/newlib/libm/common/sf_llrint.c ---- newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c 2009-04-03 19:39:24.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/sf_llrint.c 2011-04-19 03:39:58.594185070 +0200 -@@ -71,7 +71,7 @@ - GET_FLOAT_WORD (i0, t); - /* Detect the all-zeros representation of plus and - minus zero, which fails the calculation below. */ -- if ((i0 & ~(1 << 31)) == 0) -+ if ((i0 & ~((__uint32_t)1 << 31)) == 0) - return 0; - j0 = ((i0 >> 23) & 0xff) - 0x7f; - i0 &= 0x7fffff; -diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_log2.c newlib-1.18.0/newlib/libm/common/sf_log2.c ---- newlib-1.18.0.orig/newlib/libm/common/sf_log2.c 2009-03-18 19:11:18.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/sf_log2.c 2011-04-19 03:39:58.595185089 +0200 -@@ -30,7 +30,7 @@ - float x; - #endif - { -- return (logf(x) / (float) M_LOG2_E); -+ return (logf(x) / (float_t) M_LN2); - } - - #ifdef _DOUBLE_IS_32BITS -diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_rint.c newlib-1.18.0/newlib/libm/common/sf_rint.c ---- newlib-1.18.0.orig/newlib/libm/common/sf_rint.c 2001-04-04 15:30:59.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/sf_rint.c 2011-04-19 03:39:58.595185089 +0200 -@@ -57,7 +57,7 @@ - i = (0x007fffff)>>j0; - if((i0&i)==0) return x; /* x is integral */ - i>>=1; -- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0); -+ if((i0&i)!=0) i0 = (i0&(~i))|((0x200000)>>j0); - } - } else { - if(!FLT_UWORD_IS_FINITE(ix)) return x+x; /* inf or NaN */ -diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_round.c newlib-1.18.0/newlib/libm/common/sf_round.c ---- newlib-1.18.0.orig/newlib/libm/common/sf_round.c 2005-02-24 20:02:35.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/sf_round.c 2011-04-19 03:39:58.595185089 +0200 -@@ -38,7 +38,7 @@ - w &= 0x80000000; - if (exponent_less_127 == -1) - /* Result is +1.0 or -1.0. */ -- w |= (127 << 23); -+ w |= ((__uint32_t)127 << 23); - } - else - { -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_ilogb.c newlib-1.18.0/newlib/libm/common/s_ilogb.c ---- newlib-1.18.0.orig/newlib/libm/common/s_ilogb.c 2003-10-20 20:46:37.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/s_ilogb.c 2011-04-19 03:39:58.592185033 +0200 -@@ -44,13 +44,24 @@ - RETURNS - - <> and <> return the power of two used to form the --floating-point argument. If <[val]> is <<0>>, they return <<- --INT_MAX>> (<> is defined in limits.h). If <[val]> is --infinite, or NaN, they return <>. -+floating-point argument. -+If <[val]> is <<0>>, they return <>. -+If <[val]> is infinite, they return <>. -+If <[val]> is NaN, they return <>. -+(<> and <> are defined in math.h, but in turn are -+defined as INT_MIN or INT_MAX from limits.h. The value of FP_ILOGB0 may be -+either INT_MIN or -INT_MAX. The value of FP_ILOGBNAN may be either INT_MAX or -+INT_MIN.) -+ -+@comment The bugs might not be worth noting, given the mass non-C99/POSIX -+@comment behavior of much of the Newlib math library. -+@comment BUGS -+@comment On errors, errno is not set per C99 and POSIX requirements even if -+@comment (math_errhandling & MATH_ERRNO) is non-zero. - - PORTABILITY -- Neither <> nor <> is required by ANSI C or by -- the System V Interface Definition (Issue 2). */ -+C99, POSIX -+*/ - - /* ilogb(double x) - * return the binary exponent of non-zero x -@@ -58,8 +69,8 @@ - * ilogb(inf/NaN) = 0x7fffffff (no signal is raised) - */ - --#include "fdlibm.h" - #include -+#include "fdlibm.h" - - #ifndef _DOUBLE_IS_32BITS - -@@ -76,7 +87,7 @@ - hx &= 0x7fffffff; - if(hx<0x00100000) { - if((hx|lx)==0) -- return - INT_MAX; /* ilogb(0) = 0x80000001 */ -+ return FP_ILOGB0; /* ilogb(0) = special case error */ - else /* subnormal x */ - if(hx==0) { - for (ix = -1043; lx>0; lx<<=1) ix -=1; -@@ -86,7 +97,10 @@ - return ix; - } - else if (hx<0x7ff00000) return (hx>>20)-1023; -- else return INT_MAX; -+ #if FP_ILOGBNAN != INT_MAX -+ else if (hx>0x7ff00000) return FP_ILOGBNAN; /* NAN */ -+ #endif -+ else return INT_MAX; /* infinite (or, possibly, NAN) */ - } - - #endif /* _DOUBLE_IS_32BITS */ -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_llrint.c newlib-1.18.0/newlib/libm/common/s_llrint.c ---- newlib-1.18.0.orig/newlib/libm/common/s_llrint.c 2009-04-03 19:39:24.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/s_llrint.c 2011-04-19 03:39:58.592185033 +0200 -@@ -61,40 +61,56 @@ - - /* Extract exponent field. */ - j0 = ((i0 & 0x7ff00000) >> 20) - 1023; -+ /* j0 in [-1023,1024] */ - - if(j0 < 20) - { -+ /* j0 in [-1023,19] */ - if(j0 < -1) - return 0; - else - { -+ /* j0 in [0,19] */ -+ /* shift amt in [0,19] */ - w = TWO52[sx] + x; - t = w - TWO52[sx]; - GET_HIGH_WORD(i0, t); - /* Detect the all-zeros representation of plus and - minus zero, which fails the calculation below. */ -- if ((i0 & ~(1 << 31)) == 0) -+ if ((i0 & ~((__int32_t)1 << 31)) == 0) - return 0; -+ /* After round: j0 in [0,20] */ - j0 = ((i0 & 0x7ff00000) >> 20) - 1023; - i0 &= 0x000fffff; - i0 |= 0x00100000; -+ /* shift amt in [20,0] */ - result = i0 >> (20 - j0); - } - } - else if (j0 < (int)(8 * sizeof (long long int)) - 1) - { -+ /* 64bit return: j0 in [20,62] */ - if (j0 >= 52) -+ /* 64bit return: j0 in [52,62] */ -+ /* 64bit return: left shift amt in [32,42] */ - result = ((long long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) | -+ /* 64bit return: right shift amt in [0,10] */ - (i1 << (j0 - 52)); - else - { -+ /* 64bit return: j0 in [20,51] */ - w = TWO52[sx] + x; - t = w - TWO52[sx]; - EXTRACT_WORDS (i0, i1, t); - j0 = ((i0 & 0x7ff00000) >> 20) - 1023; - i0 &= 0x000fffff; - i0 |= 0x00100000; -- result = ((long long int) i0 << (j0 - 20)) | (i1 >> (52 - j0)); -+ /* After round: -+ * 64bit return: j0 in [20,52] */ -+ /* 64bit return: left shift amt in [0,32] */ -+ /* ***64bit return: right shift amt in [32,0] */ -+ result = ((long long int) i0 << (j0 - 20)) -+ | SAFE_RIGHT_SHIFT (i1, (52 - j0)); - } - } - else -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_llround.c newlib-1.18.0/newlib/libm/common/s_llround.c ---- newlib-1.18.0.orig/newlib/libm/common/s_llround.c 2009-03-25 20:13:01.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/s_llround.c 2011-04-19 03:39:58.592185033 +0200 -@@ -31,8 +31,10 @@ - msw &= 0x000fffff; - msw |= 0x00100000; - -+ /* exponent_less_1023 in [-1023,1024] */ - if (exponent_less_1023 < 20) - { -+ /* exponent_less_1023 in [-1023,19] */ - if (exponent_less_1023 < 0) - { - if (exponent_less_1023 < -1) -@@ -42,20 +44,34 @@ - } - else - { -+ /* exponent_less_1023 in [0,19] */ -+ /* shift amt in [0,19] */ - msw += 0x80000 >> exponent_less_1023; -+ /* shift amt in [20,1] */ - result = msw >> (20 - exponent_less_1023); - } - } - else if (exponent_less_1023 < (8 * sizeof (long long int)) - 1) - { -+ /* 64bit longlong: exponent_less_1023 in [20,62] */ - if (exponent_less_1023 >= 52) -- result = ((long long int) msw << (exponent_less_1023 - 20)) | (lsw << (exponent_less_1023 - 52)); -+ /* 64bit longlong: exponent_less_1023 in [52,62] */ -+ /* 64bit longlong: shift amt in [32,42] */ -+ result = ((long long int) msw << (exponent_less_1023 - 20)) -+ /* 64bit longlong: shift amt in [0,10] */ -+ | (lsw << (exponent_less_1023 - 52)); - else - { -- unsigned int tmp = lsw + (0x80000000 >> (exponent_less_1023 - 20)); -+ /* 64bit longlong: exponent_less_1023 in [20,51] */ -+ unsigned int tmp = lsw -+ /* 64bit longlong: shift amt in [0,31] */ -+ + (0x80000000 >> (exponent_less_1023 - 20)); - if (tmp < lsw) - ++msw; -- result = ((long long int) msw << (exponent_less_1023 - 20)) | (tmp >> (52 - exponent_less_1023)); -+ /* 64bit longlong: shift amt in [0,31] */ -+ result = ((long long int) msw << (exponent_less_1023 - 20)) -+ /* ***64bit longlong: shift amt in [32,1] */ -+ | SAFE_RIGHT_SHIFT (tmp, (52 - exponent_less_1023)); - } - } - else -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_log2.c newlib-1.18.0/newlib/libm/common/s_log2.c ---- newlib-1.18.0.orig/newlib/libm/common/s_log2.c 2009-03-25 20:13:01.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/s_log2.c 2011-04-19 03:39:58.593185051 +0200 -@@ -34,8 +34,8 @@ - rather are derivatives based on <>. (Accuracy might be slightly off from - a direct calculation.) In addition to functions, they are also implemented as - macros defined in math.h: --. #define log2(x) (log (x) / _M_LOG2_E) --. #define log2f(x) (logf (x) / (float) _M_LOG2_E) -+. #define log2(x) (log (x) / _M_LN2) -+. #define log2f(x) (logf (x) / (float) _M_LN2) - To use the functions instead, just undefine the macros first. - - You can use the (non-ANSI) function <> to specify error -@@ -79,7 +79,7 @@ - double x; - #endif - { -- return (log(x) / M_LOG2_E); -+ return (log(x) / M_LN2); - } - - #endif /* defined(_DOUBLE_IS_32BITS) */ -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_lrint.c newlib-1.18.0/newlib/libm/common/s_lrint.c ---- newlib-1.18.0.orig/newlib/libm/common/s_lrint.c 2009-04-16 17:39:46.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/common/s_lrint.c 2011-04-19 03:39:58.594185070 +0200 -@@ -98,13 +98,17 @@ - - /* Extract exponent field. */ - j0 = ((i0 & 0x7ff00000) >> 20) - 1023; -+ /* j0 in [-1023,1024] */ - - if(j0 < 20) - { -+ /* j0 in [-1023,19] */ - if(j0 < -1) - return 0; - else - { -+ /* j0 in [0,19] */ -+ /* shift amt in [0,19] */ - w = TWO52[sx] + x; - t = w - TWO52[sx]; - GET_HIGH_WORD(i0, t); -@@ -112,26 +116,43 @@ - minus zero, which fails the calculation below. */ - if ((i0 & ~(1L << 31)) == 0) - return 0; -+ /* After round: j0 in [0,20] */ - j0 = ((i0 & 0x7ff00000) >> 20) - 1023; - i0 &= 0x000fffff; - i0 |= 0x00100000; -+ /* shift amt in [20,0] */ - result = i0 >> (20 - j0); - } - } - else if (j0 < (int)(8 * sizeof (long int)) - 1) - { -+ /* 32bit return: j0 in [20,30] */ -+ /* 64bit return: j0 in [20,62] */ - if (j0 >= 52) -+ /* 64bit return: j0 in [52,62] */ -+ /* 64bit return: left shift amt in [32,42] */ - result = ((long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) | -+ /* 64bit return: right shift amt in [0,10] */ - (i1 << (j0 - 52)); - else - { -+ /* 32bit return: j0 in [20,30] */ -+ /* 64bit return: j0 in [20,51] */ - w = TWO52[sx] + x; - t = w - TWO52[sx]; - EXTRACT_WORDS (i0, i1, t); - j0 = ((i0 & 0x7ff00000) >> 20) - 1023; - i0 &= 0x000fffff; - i0 |= 0x00100000; -- result = ((long int) i0 << (j0 - 20)) | (i1 >> (52 - j0)); -+ /* After round: -+ * 32bit return: j0 in [20,31]; -+ * 64bit return: j0 in [20,52] */ -+ /* 32bit return: left shift amt in [0,11] */ -+ /* 64bit return: left shift amt in [0,32] */ -+ /* ***32bit return: right shift amt in [32,21] */ -+ /* ***64bit return: right shift amt in [32,0] */ -+ result = ((long int) i0 << (j0 - 20)) -+ | SAFE_RIGHT_SHIFT (i1, (52 - j0)); - } - } - else -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_lround.c newlib-1.18.0/newlib/libm/common/s_lround.c ---- newlib-1.18.0.orig/newlib/libm/common/s_lround.c 2009-03-25 20:13:01.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/s_lround.c 2011-04-19 03:39:58.594185070 +0200 -@@ -71,9 +71,10 @@ - exponent_less_1023 = ((msw & 0x7ff00000) >> 20) - 1023; - msw &= 0x000fffff; - msw |= 0x00100000; -- -+ /* exponent_less_1023 in [-1023,1024] */ - if (exponent_less_1023 < 20) - { -+ /* exponent_less_1023 in [-1023,19] */ - if (exponent_less_1023 < 0) - { - if (exponent_less_1023 < -1) -@@ -83,20 +84,39 @@ - } - else - { -+ /* exponent_less_1023 in [0,19] */ -+ /* shift amt in [0,19] */ - msw += 0x80000 >> exponent_less_1023; -+ /* shift amt in [20,1] */ - result = msw >> (20 - exponent_less_1023); - } - } - else if (exponent_less_1023 < (8 * sizeof (long int)) - 1) - { -+ /* 32bit long: exponent_less_1023 in [20,30] */ -+ /* 64bit long: exponent_less_1023 in [20,62] */ - if (exponent_less_1023 >= 52) -- result = ((long int) msw << (exponent_less_1023 - 20)) | (lsw << (exponent_less_1023 - 52)); -+ /* 64bit long: exponent_less_1023 in [52,62] */ -+ /* 64bit long: shift amt in [32,42] */ -+ result = ((long int) msw << (exponent_less_1023 - 20)) -+ /* 64bit long: shift amt in [0,10] */ -+ | (lsw << (exponent_less_1023 - 52)); - else - { -- unsigned int tmp = lsw + (0x80000000 >> (exponent_less_1023 - 20)); -+ /* 32bit long: exponent_less_1023 in [20,30] */ -+ /* 64bit long: exponent_less_1023 in [20,51] */ -+ unsigned int tmp = lsw -+ /* 32bit long: shift amt in [0,10] */ -+ /* 64bit long: shift amt in [0,31] */ -+ + (0x80000000 >> (exponent_less_1023 - 20)); - if (tmp < lsw) - ++msw; -- result = ((long int) msw << (exponent_less_1023 - 20)) | (tmp >> (52 - exponent_less_1023)); -+ /* 32bit long: shift amt in [0,10] */ -+ /* 64bit long: shift amt in [0,31] */ -+ result = ((long int) msw << (exponent_less_1023 - 20)) -+ /* ***32bit long: shift amt in [32,22] */ -+ /* ***64bit long: shift amt in [32,1] */ -+ | SAFE_RIGHT_SHIFT (tmp, (52 - exponent_less_1023)); - } - } - else -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_rint.c newlib-1.18.0/newlib/libm/common/s_rint.c ---- newlib-1.18.0.orig/newlib/libm/common/s_rint.c 2009-03-25 20:13:01.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/s_rint.c 2011-04-19 03:39:58.594185070 +0200 -@@ -51,6 +51,16 @@ - * rounding mode. - * Method: - * Using floating addition. -+ * Whenever a fraction is present, if the second or any following bit after -+ * the radix point is set, limit to the second radix point to avoid -+ * possible double rounding in the TWO52 +- steps (in case guard bits are -+ * used). Specifically, if have any, chop off bits past the 2nd place and -+ * set the second place. -+ * (e.g. 2.0625=0b10.0001 => 0b10.01=2.25; -+ * 2.3125=0b10.011 => 0b10.01=2.25; -+ * 1.5625= 0b1.1001 => 0b1.11=1.75; -+ * 1.9375= 0b1.1111 => 0b1.11=1.75. -+ * Pseudo-code: if(x.frac & ~0b0.10) x.frac = (x.frac & 0b0.11) | 0b0.01;). - * Exception: - * Inexact flag raised if x not equal to rint(x). - */ -@@ -81,11 +91,11 @@ - double t; - volatile double w; - EXTRACT_WORDS(i0,i1,x); -- sx = (i0>>31)&1; -- j0 = ((i0>>20)&0x7ff)-0x3ff; -- if(j0<20) { -- if(j0<0) { -- if(((i0&0x7fffffff)|i1)==0) return x; -+ sx = (i0>>31)&1; /* sign */ -+ j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent */ -+ if(j0<20) { /* no integral bits in LS part */ -+ if(j0<0) { /* x is fractional or 0 */ -+ if(((i0&0x7fffffff)|i1)==0) return x; /* x == 0 */ - i1 |= (i0&0x0fffff); - i0 &= 0xfffe0000; - i0 |= ((i1|-i1)>>12)&0x80000; -@@ -95,13 +105,14 @@ - GET_HIGH_WORD(i0,t); - SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31)); - return t; -- } else { -+ } else { /* x has integer and maybe fraction */ - i = (0x000fffff)>>j0; - if(((i0&i)|i1)==0) return x; /* x is integral */ - i>>=1; - if(((i0&i)|i1)!=0) { -- if(j0==19) i1 = 0x40000000; else -- i0 = (i0&(~i))|((0x20000)>>j0); -+ /* 2nd or any later bit after radix is set */ -+ if(j0==19) i1 = 0x80000000; else i1 = 0; -+ i0 = (i0&(~i))|((0x40000)>>j0); - } - } - } else if (j0>51) { -@@ -119,6 +130,3 @@ - } - - #endif /* _DOUBLE_IS_32BITS */ -- -- -- -diff -Naur newlib-1.18.0.orig/newlib/libm/common/s_round.c newlib-1.18.0/newlib/libm/common/s_round.c ---- newlib-1.18.0.orig/newlib/libm/common/s_round.c 2009-03-25 20:13:01.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/common/s_round.c 2011-04-19 03:39:58.594185070 +0200 -@@ -68,7 +68,7 @@ - msw &= 0x80000000; - if (exponent_less_1023 == -1) - /* Result is +1.0 or -1.0. */ -- msw |= (1023 << 20); -+ msw |= ((__int32_t)1023 << 20); - lsw = 0; - } - else -diff -Naur newlib-1.18.0.orig/newlib/libm/math/e_scalb.c newlib-1.18.0/newlib/libm/math/e_scalb.c ---- newlib-1.18.0.orig/newlib/libm/math/e_scalb.c 2000-02-17 20:39:51.000000000 +0100 -+++ newlib-1.18.0/newlib/libm/math/e_scalb.c 2011-04-19 03:39:58.595185089 +0200 -@@ -17,6 +17,7 @@ - * should use scalbn() instead. - */ - -+#include - #include "fdlibm.h" - - #ifndef _DOUBLE_IS_32BITS -@@ -46,8 +47,17 @@ - else return x/(-fn); - } - if (rint(fn)!=fn) return (fn-fn)/(fn-fn); -+#if (INT_MAX < 65000) -+ if ( fn > (double) INT_MAX) return scalbn(x, INT_MAX); -+#else - if ( fn > 65000.0) return scalbn(x, 65000); -- if (-fn > 65000.0) return scalbn(x,-65000); -+#endif -+ -+#if (INT_MIN > -65000) -+ if (fn < (double) INT_MIN) return scalbn(x,INT_MIN); -+#else -+ if (fn < -65000.0) return scalbn(x,-65000); -+#endif - return scalbn(x,(int)fn); - #endif - } -diff -Naur newlib-1.18.0.orig/newlib/libm/math/wf_tgamma.c newlib-1.18.0/newlib/libm/math/wf_tgamma.c ---- newlib-1.18.0.orig/newlib/libm/math/wf_tgamma.c 2007-09-04 19:33:10.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/math/wf_tgamma.c 2011-04-19 03:39:58.595185089 +0200 -@@ -43,3 +43,17 @@ - return y; - #endif - } -+ -+#ifdef _DOUBLE_IS_32BITS -+ -+#ifdef __STDC__ -+ double tgamma(double x) -+#else -+ double tgamma(x) -+ double x; -+#endif -+{ -+ return (double) tgammaf((float) x); -+} -+ -+#endif /* defined(_DOUBLE_IS_32BITS) */ -diff -Naur newlib-1.18.0.orig/newlib/libm/math/w_tgamma.c newlib-1.18.0/newlib/libm/math/w_tgamma.c ---- newlib-1.18.0.orig/newlib/libm/math/w_tgamma.c 2002-06-07 23:59:56.000000000 +0200 -+++ newlib-1.18.0/newlib/libm/math/w_tgamma.c 2011-04-19 03:39:58.595185089 +0200 -@@ -17,6 +17,8 @@ - - #include "fdlibm.h" - -+#ifndef _DOUBLE_IS_32BITS -+ - #ifdef __STDC__ - double tgamma(double x) - #else -@@ -42,3 +44,5 @@ - return y; - #endif - } -+ -+#endif /* defined(_DOUBLE_IS_32BITS) */ -diff -Naur newlib-1.18.0.orig/newlib/Makefile.am newlib-1.18.0/newlib/Makefile.am ---- newlib-1.18.0.orig/newlib/Makefile.am 2009-08-18 23:48:05.000000000 +0200 -+++ newlib-1.18.0/newlib/Makefile.am 2011-04-19 03:39:58.578184775 +0200 -@@ -81,7 +81,7 @@ - libc.a - endif - --noinst_DATA = stmp-targ-include -+BUILT_SOURCES = stmp-targ-include - - toollib_DATA = $(CRT0) $(CRT1) - -diff -Naur newlib-1.18.0.orig/newlib/Makefile.in newlib-1.18.0/newlib/Makefile.in ---- newlib-1.18.0.orig/newlib/Makefile.in 2009-10-21 00:43:45.000000000 +0200 -+++ newlib-1.18.0/newlib/Makefile.in 2011-04-19 03:39:58.578184775 +0200 -@@ -122,7 +122,7 @@ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive --DATA = $(noinst_DATA) $(toollib_DATA) -+DATA = $(toollib_DATA) - RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive - AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ -@@ -351,7 +351,7 @@ - @USE_LIBTOOL_FALSE@toollib_LIBRARIES = libm.a \ - @USE_LIBTOOL_FALSE@ libc.a - --noinst_DATA = stmp-targ-include -+BUILT_SOURCES = stmp-targ-include - toollib_DATA = $(CRT0) $(CRT1) - - # The functions ldexp, frexp and modf are traditionally supplied in -@@ -411,7 +411,7 @@ - - # dejagnu support - RUNTESTFLAGS = --all: newlib.h -+all: $(BUILT_SOURCES) newlib.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - - .SUFFIXES: -@@ -725,14 +725,16 @@ - done - check-am: - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU --check: check-recursive -+check: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) check-recursive - all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h - installdirs: installdirs-recursive - installdirs-am: - for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done --install: install-recursive -+install: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) install-recursive - install-exec: install-exec-recursive - install-data: install-data-recursive - uninstall: uninstall-recursive -@@ -758,6 +760,7 @@ - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - clean: clean-recursive - - clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \ -@@ -833,8 +836,9 @@ - uninstall-am: uninstall-toollibDATA uninstall-toollibLIBRARIES \ - uninstall-toollibLTLIBRARIES - --.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ -- ctags-recursive install-am install-strip tags-recursive -+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ -+ check-am ctags-recursive install install-am install-strip \ -+ tags-recursive - - .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-DEJAGNU check-am clean \ -- cgit v1.2.3 From 3d83ae583c5be8d499374bcbd7a6d801ebffbec3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 28 Nov 2011 16:36:31 +0000 Subject: 2011-11-28 Werner Almesberger PR 1961/cpukit * score/src/coremsgsubmit.c: Close window caused by using message pending count rather than directly obtaining unused buffer. --- cpukit/ChangeLog | 6 ++++++ cpukit/score/src/coremsgsubmit.c | 18 +++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 4f82858e09..29343e7694 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2011-11-28 Werner Almesberger + + PR 1961/cpukit + * score/src/coremsgsubmit.c: Close window caused by using message + pending count rather than directly obtaining unused buffer. + 2011-11-07 Ralf Corsepius PR 1952/cpukit diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index c67157dc44..9d4b68d5c0 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -102,21 +102,9 @@ CORE_message_queue_Status _CORE_message_queue_Submit( * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ - if ( the_message_queue->number_of_pending_messages < - the_message_queue->maximum_pending_messages ) { - - the_message = - _CORE_message_queue_Allocate_message_buffer( the_message_queue ); - - #if defined(RTEMS_DEBUG) - /* - * NOTE: If the system is consistent, this error should never occur. - */ - - if ( !the_message ) - return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; - #endif - + the_message = + _CORE_message_queue_Allocate_message_buffer( the_message_queue ); + if ( the_message ) { _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, -- cgit v1.2.3 From 2fc9706a567c4c90eea256b12bf73350bd063ed3 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 30 Nov 2011 07:00:47 +0000 Subject: =?UTF-8?q?2011-11-30=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * librpc/src/rpc/clnt_udp.c (struct cu_data): Introduce unions _cu_inbuf, _cu_outbuf to avoid aliasing. --- cpukit/ChangeLog | 5 +++++ cpukit/librpc/src/rpc/clnt_udp.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 29343e7694..51e8f21539 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2011-11-30 Ralf Corsépius + + * librpc/src/rpc/clnt_udp.c (struct cu_data): + Introduce unions _cu_inbuf, _cu_outbuf to avoid aliasing. + 2011-11-28 Werner Almesberger PR 1961/cpukit diff --git a/cpukit/librpc/src/rpc/clnt_udp.c b/cpukit/librpc/src/rpc/clnt_udp.c index aeace640a8..369da95f2d 100644 --- a/cpukit/librpc/src/rpc/clnt_udp.c +++ b/cpukit/librpc/src/rpc/clnt_udp.c @@ -88,9 +88,17 @@ struct cu_data { XDR cu_outxdrs; u_int cu_xdrpos; u_int cu_sendsz; /* send size */ - char *cu_outbuf; + union { + u_int32_t *i32; + char *c; + } _cu_outbuf; +#define cu_outbuf _cu_outbuf.c u_int cu_recvsz; /* recv size */ - char cu_inbuf[1]; + union { + u_int32_t *i32; + char c[1]; + } _cu_inbuf; +#define cu_inbuf _cu_inbuf.c }; /* @@ -352,7 +360,7 @@ send_again: if (inlen < sizeof(u_int32_t)) continue; /* see if reply transaction id matches sent id */ - if (*((u_int32_t *)(cu->cu_inbuf)) != *((u_int32_t *)(cu->cu_outbuf))) + if (*(cu->_cu_inbuf.i32) != *(cu->_cu_outbuf.i32)) continue; /* we now assume we have the proper reply */ break; -- cgit v1.2.3 From d1cbfaa89eaf6b56ea7375c3d156036eef2d0b3e Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 7 Dec 2011 06:51:43 +0000 Subject: =?UTF-8?q?2011-12-07=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR 1983/networking * libnetworking/libc/gethostbyht.c (gethostent_r): Abort if (!hostf). --- cpukit/ChangeLog | 6 ++++++ cpukit/libnetworking/libc/gethostbyht.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 51e8f21539..f25da85d7f 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2011-12-07 Ralf Corsépius + + PR 1983/networking + * libnetworking/libc/gethostbyht.c (gethostent_r): + Abort if (!hostf). + 2011-11-30 Ralf Corsépius * librpc/src/rpc/clnt_udp.c (struct cu_data): diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c index 4228b1c8c8..17723d707b 100644 --- a/cpukit/libnetworking/libc/gethostbyht.c +++ b/cpukit/libnetworking/libc/gethostbyht.c @@ -223,7 +223,7 @@ struct hostent* gethostent_r(char* buf, int len) int curlen; - if (hostf<0) return 0; + if (!hostf) return 0; fseek(hostf,0,SEEK_END); curlen=ftell(hostf); fseek(hostf,0,SEEK_SET); -- cgit v1.2.3 From 10fa27d64d3a7ca37cb379077255f33fb831ad81 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 7 Dec 2011 20:08:49 +0000 Subject: 2011-12-07 Joel Sherrill PR 1984/doc * user/conf.t: Change CONFIGURE_MINIMUM_STACK_SIZE to CONFIGURE_MINIMUM_TASK_STACK_SIZE. --- doc/ChangeLog | 6 ++++++ doc/user/conf.t | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index e05b97135a..cdf790fcca 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-07 Joel Sherrill + + PR 1984/doc + * user/conf.t: Change CONFIGURE_MINIMUM_STACK_SIZE to + CONFIGURE_MINIMUM_TASK_STACK_SIZE. + 2011-07-29 Joel Sherrill PR 1864/doc diff --git a/doc/user/conf.t b/doc/user/conf.t index d9030e1eed..a47ae317a6 100644 --- a/doc/user/conf.t +++ b/doc/user/conf.t @@ -237,6 +237,7 @@ RTEMS "unlimited" objects option. You will be able to create objects until you run out of all available memory rather then just until you run out of RTEMS Workspace. +@findex CONFIGURE_MICROSECONDS_PER_TICK @item @code{CONFIGURE_MICROSECONDS_PER_TICK} is the length of time between clock ticks. By default, this is set to 10000 microseconds. @@ -258,9 +259,8 @@ system reduces the amount of memory allocated from the RTEMS Workspace. By default, RTEMS supports 256 priority levels ranging from 0 to 255 so the default value for this field is 255. -@findex CONFIGURE_MICROSECONDS_PER_TICK -@fnindex CONFIGURE_MINIMUM_STACK_SIZE -@item @code{CONFIGURE_MINIMUM_STACK_SIZE} is set to the number of bytes +@fnindex CONFIGURE_MINIMUM_TASK_STACK_SIZE +@item @code{CONFIGURE_MINIMUM_TASK_STACK_SIZE} is set to the number of bytes the application wants the minimum stack size to be for every task or thread in the system. By default, this is set to the recommended minimum stack size for this processor. -- cgit v1.2.3 From afaa753b5a28a9f516244b134b77caf07092b1ec Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 9 Dec 2011 07:12:27 +0000 Subject: 2011-12-09 Chris Johns PR 1968/filesystem * libfs/src/rfs/rtems-rfs-file.c: Fix to the seek bug where a seek to 0 after reading the end of the file did not point to the correct block. * libfs/src/rfs/rtems-rfs-rtems.h, libfs/src/rfs/rtems-rfs-trace.c: Fix the trace flags. Used to fix the bug. --- cpukit/ChangeLog | 10 +++++ cpukit/libfs/src/rfs/rtems-rfs-file.c | 73 ++++++++++++++++++++++++++-------- cpukit/libfs/src/rfs/rtems-rfs-rtems.h | 19 ++++----- cpukit/libfs/src/rfs/rtems-rfs-trace.c | 7 ++-- 4 files changed, 80 insertions(+), 29 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index f25da85d7f..4a779b2e53 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,13 @@ +2011-12-09 Chris Johns + + PR 1968/filesystem + * libfs/src/rfs/rtems-rfs-file.c: Fix to the seek bug where a seek + to 0 after reading the end of the file did not point to the + correct block. + * libfs/src/rfs/rtems-rfs-rtems.h, + libfs/src/rfs/rtems-rfs-trace.c: Fix the trace flags. Used to fix + the bug. + 2011-12-07 Ralf Corsépius PR 1983/networking diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file.c b/cpukit/libfs/src/rfs/rtems-rfs-file.c index 777726a23a..b7a79ae392 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-file.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-file.c @@ -424,7 +424,44 @@ rtems_rfs_file_seek (rtems_rfs_file_handle* handle, */ if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle), handle->shared)) + { rtems_rfs_file_set_bpos (handle, pos); + + /* + * If the file has a block check if it maps to the current position and it + * does not release it. That will force us to get the block at the new + * position when the I/O starts. + */ + if (rtems_rfs_buffer_handle_has_block (&handle->buffer)) + { + rtems_rfs_buffer_block block; + int rc; + + rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle), + rtems_rfs_file_map (handle), + rtems_rfs_file_bpos (handle), + &block); + if (rc > 0) + return rc; + if (rtems_rfs_buffer_bnum (&handle->buffer) != block) + { + rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle), + rtems_rfs_file_buffer (handle)); + if (rc > 0) + return rc; + } + } + } + else + { + /* + * The seek is outside the current file so release any buffer. A write will + * extend the file. + */ + int rc = rtems_rfs_file_io_release (handle); + if (rc > 0) + return rc; + } *new_pos = pos; return 0; @@ -441,23 +478,25 @@ rtems_rfs_file_set_size (rtems_rfs_file_handle* handle, if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO)) printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size); + size = rtems_rfs_file_size (handle); + /* - * Short cut for the common truncate on open call. + * If the file is same size do nothing else grow or shrink it ? + * + * If the file does not change size do not update the times. */ - if (new_size == 0) - { - rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map); - if (rc > 0) - return rc; - } - else + if (size != new_size) { - size = rtems_rfs_file_size (handle); - /* - * If the file is same size do nothing else grow or shrink it ? + * Short cut for the common truncate on open call. */ - if (size != new_size) + if (new_size == 0) + { + rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map); + if (rc > 0) + return rc; + } + else { if (size < new_size) { @@ -567,13 +606,13 @@ rtems_rfs_file_set_size (rtems_rfs_file_handle* handle, rtems_rfs_file_bpos (handle)); } } - } - handle->shared->size.count = rtems_rfs_block_map_count (map); - handle->shared->size.offset = rtems_rfs_block_map_size_offset (map); + handle->shared->size.count = rtems_rfs_block_map_count (map); + handle->shared->size.offset = rtems_rfs_block_map_size_offset (map); - if (rtems_rfs_file_update_mtime (handle)) - handle->shared->mtime = time (NULL); + if (rtems_rfs_file_update_mtime (handle)) + handle->shared->mtime = time (NULL); + } return 0; } diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h index 3415d0abfb..608ab0f089 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h @@ -25,12 +25,12 @@ #include /** - * RTEMS RFS RTEMS Error Enable. Set to 1 to printing of errors. Default is off. + * RTEMS RFS RTEMS Error Enable. Set to 1 for printing of errors. Default is off. */ #define RTEMS_RFS_RTEMS_ERROR 0 /** - * RTEMS RFS RTEMS Trace Enable. Set to 1 to printing of errors. Default is off. + * RTEMS RFS RTEMS Trace Enable. Set to 1 for printing of errors. Default is off. */ #define RTEMS_RFS_RTEMS_TRACE 0 @@ -72,13 +72,14 @@ int rtems_rfs_rtems_error (const char* mesg, int error); #define RTEMS_RFS_RTEMS_DEBUG_READLINK (1 << 9) #define RTEMS_RFS_RTEMS_DEBUG_FCHMOD (1 << 10) #define RTEMS_RFS_RTEMS_DEBUG_STAT (1 << 11) -#define RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD (1 << 12) -#define RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN (1 << 13) -#define RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE (1 << 14) -#define RTEMS_RFS_RTEMS_DEBUG_FILE_READ (1 << 15) -#define RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE (1 << 16) -#define RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK (1 << 17) -#define RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC (1 << 18) +#define RTEMS_RFS_RTEMS_DEBUG_RENAME (1 << 12) +#define RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD (1 << 13) +#define RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN (1 << 14) +#define RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE (1 << 15) +#define RTEMS_RFS_RTEMS_DEBUG_FILE_READ (1 << 16) +#define RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE (1 << 17) +#define RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK (1 << 18) +#define RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC (1 << 19) /** * Call to check if this part is bring traced. If RTEMS_RFS_RTEMS_TRACE is diff --git a/cpukit/libfs/src/rfs/rtems-rfs-trace.c b/cpukit/libfs/src/rfs/rtems-rfs-trace.c index d96a63673b..525098c703 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-trace.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-trace.c @@ -92,7 +92,8 @@ rtems_rfs_trace_shell_command (int argc, char *argv[]) "symlink-read", "file-open", "file-close", - "file-io" + "file-io", + "file-set" }; rtems_rfs_trace_mask set_value = 0; @@ -140,9 +141,9 @@ rtems_rfs_trace_shell_command (int argc, char *argv[]) if (strcmp (argv[arg], table[t]) == 0) { if (set) - set_value = 1 << t; + set_value = 1ULL << t; else - clear_value = 1 << t; + clear_value = 1ULL << t; break; } } -- cgit v1.2.3 From a9069337a58709c862f906cf41a013bd35032df2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 9 Dec 2011 19:19:28 +0000 Subject: 2011-12-09 Joel Sherrill * math/init.c, mathf/init.c: Use DEVFS since we do have devices. --- testsuites/libtests/ChangeLog | 4 ++++ testsuites/libtests/math/init.c | 3 +-- testsuites/libtests/mathf/init.c | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index 9796426141..4dd83d3e66 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,7 @@ +2011-12-09 Joel Sherrill + + * math/init.c, mathf/init.c: Use DEVFS since we do have devices. + 2011-02-02 Joel Sherrill * cpuuse/tswitch.c: Shrink memory requirements. diff --git a/testsuites/libtests/math/init.c b/testsuites/libtests/math/init.c index 60966af61c..4d50401cea 100644 --- a/testsuites/libtests/math/init.c +++ b/testsuites/libtests/math/init.c @@ -52,8 +52,7 @@ int main( void ) #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT - -#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM +#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/libtests/mathf/init.c b/testsuites/libtests/mathf/init.c index 7683ef5f3c..c06370023a 100644 --- a/testsuites/libtests/mathf/init.c +++ b/testsuites/libtests/mathf/init.c @@ -52,8 +52,7 @@ int main( void ) #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT - -#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM +#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -- cgit v1.2.3 From 0ae9ee1da48d7deab49e42aa789ba02de8501047 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 13 Dec 2011 14:34:19 +0000 Subject: Upgrade to 4.10.2 --- VERSION | 2 +- aclocal/version.m4 | 2 +- c/src/aclocal/version.m4 | 2 +- cpukit/aclocal/version.m4 | 2 +- testsuites/aclocal/version.m4 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index a27be6835d..0b1467e7f4 100644 --- a/VERSION +++ b/VERSION @@ -4,4 +4,4 @@ # $Id$ # -RTEMS Version 4.10.1 +RTEMS Version 4.10.2 diff --git a/aclocal/version.m4 b/aclocal/version.m4 index a5cad0418c..edf7126a37 100644 --- a/aclocal/version.m4 +++ b/aclocal/version.m4 @@ -1,4 +1,4 @@ AC_DEFUN([RTEMS_VERSIONING], -m4_define([_RTEMS_VERSION],[4.10.1])) +m4_define([_RTEMS_VERSION],[4.10.2])) m4_define([RTEMS_API],[4.10]) diff --git a/c/src/aclocal/version.m4 b/c/src/aclocal/version.m4 index a5cad0418c..edf7126a37 100644 --- a/c/src/aclocal/version.m4 +++ b/c/src/aclocal/version.m4 @@ -1,4 +1,4 @@ AC_DEFUN([RTEMS_VERSIONING], -m4_define([_RTEMS_VERSION],[4.10.1])) +m4_define([_RTEMS_VERSION],[4.10.2])) m4_define([RTEMS_API],[4.10]) diff --git a/cpukit/aclocal/version.m4 b/cpukit/aclocal/version.m4 index a5cad0418c..edf7126a37 100644 --- a/cpukit/aclocal/version.m4 +++ b/cpukit/aclocal/version.m4 @@ -1,4 +1,4 @@ AC_DEFUN([RTEMS_VERSIONING], -m4_define([_RTEMS_VERSION],[4.10.1])) +m4_define([_RTEMS_VERSION],[4.10.2])) m4_define([RTEMS_API],[4.10]) diff --git a/testsuites/aclocal/version.m4 b/testsuites/aclocal/version.m4 index a5cad0418c..edf7126a37 100644 --- a/testsuites/aclocal/version.m4 +++ b/testsuites/aclocal/version.m4 @@ -1,4 +1,4 @@ AC_DEFUN([RTEMS_VERSIONING], -m4_define([_RTEMS_VERSION],[4.10.1])) +m4_define([_RTEMS_VERSION],[4.10.2])) m4_define([RTEMS_API],[4.10]) -- cgit v1.2.3