diff mbox

VxWorks Patches Back from the Dead!

Message ID 503573B9.5090406@verizon.net
State New
Headers show

Commit Message

rbmj Aug. 23, 2012, 12:05 a.m. UTC
Hello Everyone,

I have ten patches which are approved or obvious but waiting on commit, 
each of which is attached to this email.  Feel free to consider this a 
ping, HOWEVER, they are rebased onto the latest trunk so they're no 
longer stale.  Additionally, I updated the commit messages and with 
complete proposed changelog entries.  They all (inside the patch file) 
have a link to their approval message and the original proposal message. 
  Note that ANY patch that touches fixincludes has a dependency on the 
first patch (0001...), as fixincludes WILL NOT RUN without this patch on 
a vxworks platform.

Sorry for the long latency period but I did not have access to a 
computer for a substantial period of time over the summer.  I've just 
been able to get everything back up and running.

--
Robert Mason
>From 991c277c1be41dff96b474a1e8bb9d297042ac70 Mon Sep 17 00:00:00 2001
From: rbmj <rbmj@verizon.net>
Date: Wed, 30 May 2012 08:16:57 -0400
Subject: [PATCH 01/10] Add ability to skip the machine_name fixincludes fix.

On some platforms, machine_name is overzealous, or even breaks things.
This patch adds the functionality to skip the machine_name 'fix' by
giving it an empty macro list.

It also removes vxworks from the list of no-op fix platforms so that
fixincludes will run on that platform (it needs it).

Proposed by Robert Mason: http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00383.html
Approved by Nathan Sidwell: http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00549.html
Approved by Bruce Korb: http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00552.html

Changes:

[gcc]
	configure.ac: Add target-based selection of new exported
		variable skip_machine_name_fix
	configure: Regenerate
	Makefile.in: add check for SKIP_MACHINE_NAME_FIX

[fixincludes]
	mkfixinc.sh: Remove vxworks from the list of no-op
		fixincludes platforms as it needs some fixes
---
 fixincludes/mkfixinc.sh |    1 -
 gcc/Makefile.in         |   15 +++++++++++----
 gcc/configure.ac        |   14 ++++++++++++++
 3 files changed, 25 insertions(+), 5 deletions(-)
diff mbox

Patch

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*   | \
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index dddffb6..31b36eb 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -237,6 +237,9 @@  LINKER = $(CC)
 LINKER_FLAGS = $(CFLAGS)
 endif
 
+# Whether or not to run the machine_name fixincludes fix
+SKIP_MACHINE_NAME_FIX = @skip_machine_name_fix@
+
 # -------------------------------------------
 # Programs which operate on the build machine
 # -------------------------------------------
@@ -4045,10 +4048,14 @@  install-gcc-tooldir:
 
 macro_list: s-macro_list; @true
 s-macro_list : $(GCC_PASSES)
-	echo | $(GCC_FOR_TARGET) -E -dM - | \
-	  sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
-		 -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
-	  sort -u > tmp-macro_list
+	@if test "$(SKIP_MACHINE_NAME_FIX)" != "yes" ; then \
+		echo | $(GCC_FOR_TARGET) -E -dM - | \
+			sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
+				-e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
+			sort -u > tmp-macro_list ; \
+	else \
+		echo > tmp-macro_list ; \
+	fi
 	$(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list
 	$(STAMP) s-macro_list
 
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7042c91..f5ff61c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5121,6 +5121,20 @@  if test x"${LINKER_HASH_STYLE}" != x; then
                                          [The linker hash style])
 fi
 
+# Check whether to enable the fixincludes machine_name hack on this platform
+case "${target}" in
+    *-*-vxworks*)
+        skip_machine_name_fix="yes"
+        ;;
+    *)
+        # Note that some platforms have fixincludes disabled by default so
+        # this will make no difference
+        skip_machine_name_fix="no"
+        ;;
+esac
+AC_SUBST(skip_machine_name_fix)
+
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)