diff mbox

VxWorks Patches Back from the Dead!

Message ID 50399984.1030405@verizon.net
State New
Headers show

Commit Message

rbmj Aug. 26, 2012, 3:35 a.m. UTC
On 8/24/2012 4:59 PM, Bruce Korb wrote:
> Hi Robert,
>
> If you are going to defer, then:
>
> On Fri, Aug 24, 2012 at 1:20 PM, rbmj <rbmj@verizon.net> wrote:
>> diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
>> index e73aed9..de7be35 100755
>> --- a/fixincludes/fixinc.in
>> +++ b/fixincludes/fixinc.in
>> @@ -128,6 +128,18 @@ fi
>>
>>   # # # # # # # # # # # # # # # # # # # # #
>>   #
>> +#  Check to see if the machine_name fix needs to be disabled.
>> +#
>> +
>> +case "${target_canonical}" in
>> +    *-*-vxworks*)
>> +    machine_name_override="OVERRIDE"
> ^^^^ replace this line with:
>
>         test -f ${MACRO_LIST} && rm -f ${MACRO_LIST}
>
> The remaining part of the patch to this file is not necessary.
>

I like it!

Done, and patch is attached.

--
Robert Mason
From 7980875af4a4ebc5e57f80d7143c59baeba2e98e Mon Sep 17 00:00:00 2001
From: rbmj <rbmj@verizon.net>
Date: Fri, 24 Aug 2012 15:32:10 -0400
Subject: [PATCH] Add ability to skip the machine_name fixincludes fix.

This patch adds the ability to skip the machine_name fixincludes
fix in fixinc.in by deleting the macro list.

It also removes vxworks from the list of no-op fix platforms in
order to allow necessary include fixes to allow a successful
build of the latest GCC.
---
 fixincludes/fixinc.in   |   16 ++++++++++++++++
 fixincludes/mkfixinc.sh |    1 -
 2 files changed, 16 insertions(+), 1 deletion(-)

Comments

rbmj Aug. 30, 2012, 1:30 p.m. UTC | #1
On 8/25/2012 11:35 PM, rbmj wrote:
> On 8/24/2012 4:59 PM, Bruce Korb wrote:
>> Hi Robert,
>>
>> If you are going to defer, then:
>>
>> On Fri, Aug 24, 2012 at 1:20 PM, rbmj <rbmj@verizon.net> wrote:
>>> diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
>>> index e73aed9..de7be35 100755
>>> --- a/fixincludes/fixinc.in
>>> +++ b/fixincludes/fixinc.in
>>> @@ -128,6 +128,18 @@ fi
>>>
>>>   # # # # # # # # # # # # # # # # # # # # #
>>>   #
>>> +#  Check to see if the machine_name fix needs to be disabled.
>>> +#
>>> +
>>> +case "${target_canonical}" in
>>> +    *-*-vxworks*)
>>> +    machine_name_override="OVERRIDE"
>> ^^^^ replace this line with:
>>
>>         test -f ${MACRO_LIST} && rm -f ${MACRO_LIST}
>>
>> The remaining part of the patch to this file is not necessary.
>>
>
> I like it!
>
> Done, and patch is attached.
>

OK.  make install doesn't seem to like it as much as I do.  It complains 
because it tries to install macro_list and can't find it.  Proposed 
solutions:

1. Change line to read test -f ${MACRO_LIST} && echo > ${MACRO_LIST}
Advantages- easy, simple
Disadvantages- might cause an unnecessary run of the fix.  A very, very 
small potential compile time hit.

2. Change line to read test -f ${MACRO_LIST} && rm -f ${MACRO_LIST} && 
touch ${MACRO_LIST}
Advantages- Will not unnecessarily run machine_name.  Saves 4 bytes of 
disk usage over option 1 :D
Disadvantages- Looks rather hackish; something about it feels wrong

3. Make macro_list optional for installation
Disadvantages- more complex, and I don't really feel like going back 
into the makefiles again.  That's a scary place.

--
rbmj
Bruce Korb Aug. 30, 2012, 2:16 p.m. UTC | #2
Hi Robert,

On Thu, Aug 30, 2012 at 6:30 AM, rbmj <rbmj@verizon.net> wrote:
>> Done, and patch is attached.
>>
>
> OK.  make install doesn't seem to like it as much as I do.  It complains
> because it tries to install macro_list and can't find it.  Proposed
> solutions:
>
> 2. Change line to read test -f ${MACRO_LIST} && rm -f ${MACRO_LIST} && touch
> ${MACRO_LIST}
> Advantages- Will not unnecessarily run machine_name.  Saves 4 bytes of disk
> usage over option 1 :D
> Disadvantages- Looks rather hackish; something about it feels wrong

Agreed.  You would have to add a comment

> 1. Change line to read test -f ${MACRO_LIST} && echo > ${MACRO_LIST}
> Advantages- easy, simple
> Disadvantages- might cause an unnecessary run of the fix.  A very, very
> small potential compile time hit.

"GCC compile time hit"  Anyway, this looks cleaner and I surely don't see
much difference between this and #2 above.

> 3. Make macro_list optional for installation
> Disadvantages- more complex, and I don't really feel like going back into
> the makefiles again.  That's a scary place.

Amen.  Keep it as simple as you can.  Thanks.
diff mbox

Patch

diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
index e73aed9..53d1b23 100755
--- a/fixincludes/fixinc.in
+++ b/fixincludes/fixinc.in
@@ -128,6 +128,22 @@  fi
 
 # # # # # # # # # # # # # # # # # # # # #
 #
+#  Check to see if the machine_name fix needs to be disabled.
+#
+#  On some platforms, machine_name doesn't work properly and
+#  breaks some of the header files.  Since everything works
+#  properly without it, just delete the macro list to
+#  disable the fix.
+
+case "${target_canonical}" in
+    *-*-vxworks*)
+	test -f ${MACRO_LIST} && rm -f ${MACRO_LIST}
+        ;;
+esac
+
+
+# # # # # # # # # # # # # # # # # # # # #
+#
 #  In the file macro_list are listed all the predefined
 #  macros that are not in the C89 reserved namespace (the reserved
 #  namespace is all identifiers beginnning with two underscores or one
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
index 89e8ab7..6653fed 100755
--- a/fixincludes/mkfixinc.sh
+++ b/fixincludes/mkfixinc.sh
@@ -15,7 +15,6 @@  case $machine in
     i?86-*-mingw32* | \
     x86_64-*-mingw32* | \
     i?86-*-interix* | \
-    *-*-vxworks* | \
     powerpc-*-eabisim* | \
     powerpc-*-eabi*    | \
     powerpc-*-rtems*   | \