Patchwork [applied] avr RTEMS config/avr/* cleanups.

login
register
mail settings
Submitter Ralf Corsepius
Date Oct. 26, 2012, 1:05 a.m.
Message ID <5089E1DA.3000901@rtems.org>
Download mbox | patch
Permalink /patch/194331/
State New
Headers show

Comments

Ralf Corsepius - Oct. 26, 2012, 1:05 a.m.
Hi,

I've applied the patch below to trunk and gcc-4.7-branch.

It contains 2 RTEMS specific cleanups which have been in use for 
avr-rtems for quite a while.

Ralf
Georg-Johann Lay - Oct. 26, 2012, 4:48 a.m.
Ralf Corsepius schrieb:
> I've applied the patch below to trunk and gcc-4.7-branch.
> 
> It contains 2 RTEMS specific cleanups which have been in use for 
> avr-rtems for quite a while.
> 
> Ralf
> 
> 2012-10-26  Ralf Corsépius  <ralf.corsepius@rtems.org>
> 
> 	* config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove
> 	__USE_INIT_FINI__.
> 	* config/avr/t-rtems (LIB1ASMFUNCS): Filter out _exit.

This is gcc/config/avr/t-rtems
Shouldn't it be libgcc/config/avr/t-rtems instead?

Johann

> 
> Index: config/avr/rtems.h
> ===================================================================
> --- config/avr/rtems.h	(revision 192827)
> +++ config/avr/rtems.h	(working copy)
> @@ -23,6 +23,5 @@
>  #define TARGET_OS_CPP_BUILTINS()	\
>  do {					\
>    builtin_define ("__rtems__");		\
> -  builtin_define ("__USE_INIT_FINI__");	\
>    builtin_assert ("system=rtems");	\
>  } while (0)
> Index: config/avr/t-rtems
> ===================================================================
> --- config/avr/t-rtems	(revision 192827)
> +++ config/avr/t-rtems	(working copy)
> @@ -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))
Ralf Corsepius - Oct. 26, 2012, 5:57 a.m.
On 10/26/2012 06:48 AM, Georg-Johann Lay wrote:
> Ralf Corsepius schrieb:
>> I've applied the patch below to trunk and gcc-4.7-branch.
>>
>> It contains 2 RTEMS specific cleanups which have been in use for 
>> avr-rtems for quite a while.
>>
>> Ralf
>>
>> 2012-10-26  Ralf Corsépius  <ralf.corsepius@rtems.org>
>>
>>     * config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove
>>     __USE_INIT_FINI__.
>>     * config/avr/t-rtems (LIB1ASMFUNCS): Filter out _exit.
>
> This is gcc/config/avr/t-rtems
> Shouldn't it be libgcc/config/avr/t-rtems instead?
You seem to be right.

The MULTILIB related part likely should be in gcc/config/avr/t-rtems, 
while the LIB1ASM related part should be in libgcc/config/avr/t-rtems.

On a second glance, I just noticed, the LIB1ASM-filtering already was in 
libgcc/config/avr/t-rtems. Seems to me as if my local patches (which 
predate the libgcc split out) weren't merged correctly.

I'll check again and try to fix it - Sorry, for the mess.

Ralf
Ralf Corsepius - Oct. 26, 2012, 8:12 a.m.
On 10/26/2012 07:57 AM, Ralf Corsepius wrote:
> On 10/26/2012 06:48 AM, Georg-Johann Lay wrote:
>> Ralf Corsepius schrieb:
>>> I've applied the patch below to trunk and gcc-4.7-branch.
>>>
>>> It contains 2 RTEMS specific cleanups which have been in use for
>>> avr-rtems for quite a while.
>>>
>>> Ralf
>>>
>>> 2012-10-26  Ralf Corsépius  <ralf.corsepius@rtems.org>
>>>
>>>     * config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove
>>>     __USE_INIT_FINI__.
>>>     * config/avr/t-rtems (LIB1ASMFUNCS): Filter out _exit.
>>
>> This is gcc/config/avr/t-rtems
>> Shouldn't it be libgcc/config/avr/t-rtems instead?
> You seem to be right.
>
> The MULTILIB related part likely should be in gcc/config/avr/t-rtems,
> while the LIB1ASM related part should be in libgcc/config/avr/t-rtems.
>
> On a second glance, I just noticed, the LIB1ASM-filtering already was in
> libgcc/config/avr/t-rtems. Seems to me as if my local patches (which
> predate the libgcc split out) weren't merged correctly.
>
> I'll check again and try to fix it - Sorry, for the mess.

I just reverted the second half of my previous patch.

Sorry for this churn.

Ralf

Patch

2012-10-26  Ralf Corsépius  <ralf.corsepius@rtems.org>

	* config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove
	__USE_INIT_FINI__.
	* config/avr/t-rtems (LIB1ASMFUNCS): Filter out _exit.

Index: config/avr/rtems.h
===================================================================
--- config/avr/rtems.h	(revision 192827)
+++ config/avr/rtems.h	(working copy)
@@ -23,6 +23,5 @@ 
 #define TARGET_OS_CPP_BUILTINS()	\
 do {					\
   builtin_define ("__rtems__");		\
-  builtin_define ("__USE_INIT_FINI__");	\
   builtin_assert ("system=rtems");	\
 } while (0)
Index: config/avr/t-rtems
===================================================================
--- config/avr/t-rtems	(revision 192827)
+++ config/avr/t-rtems	(working copy)
@@ -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))