This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

config/ sync with binutils vs. removing gcc targets.


I understand that config/ in the gcc repository is the master source
for binutils-gdb config/.  If that's the case then people removing
gcc support for particular targets need to be careful about their
config/ edits.  If a target is still supported in binutils, then
please don't rip out config/ support for the target.

I also didn't apply one of my binutils changes to gcc's config/,
so to sync with binutils I'd like to apply the following to gcc.
gcc doesn't use AC_PROG_LEX.

OK to apply?

	* elf.m4: Revert 2016-06-21 change.
	* picflag.m4: Likewise.  Revert 2016-04-30 change too.
	* override.m4 (AC_PROG_LEX): Import 2016-01-18 binutils fix
	for PR binutils/19481.

diff -urp ../gcc.git/config/elf.m4 config/elf.m4
--- ../gcc.git/config/elf.m4	2016-09-27 09:13:37.515759318 +0930
+++ config/elf.m4	2016-10-22 23:18:19.884410154 +1030
@@ -17,7 +17,7 @@ target_elf=no
 case $target in
   *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
   *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
-  alpha*-dec-osf* | hppa[[12]]*-*-hpux* | \
+  alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux* | \
   nvptx-*-none)
     target_elf=no
     ;;
diff -urp ../gcc.git/config/picflag.m4 config/picflag.m4
--- ../gcc.git/config/picflag.m4	2016-09-27 09:13:37.515759318 +0930
+++ config/picflag.m4	2016-10-22 23:18:19.884410154 +1030
@@ -27,6 +27,10 @@ case "${$2}" in
 	;;
     i[[34567]]86-*-mingw* | x86_64-*-mingw*)
 	;;
+    i[[34567]]86-*-interix[[3-9]]*)
+	# Interix 3.x gcc -fpic/-fPIC options generate broken code.
+	# Instead, we relocate shared libraries at runtime.
+	;;
     i[[34567]]86-*-nto-qnx*)
 	# QNX uses GNU C++, but need to define -shared option too, otherwise
 	# it will coredump.
@@ -57,7 +61,8 @@ case "${$2}" in
 	$1=-fpic
 	;;
     # FIXME: Simplify to sh*-*-netbsd*?
-    sh-*-netbsdelf* | shl*-*-netbsdelf*)
+    sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+      sh64-*-netbsd* | sh64l*-*-netbsd*)
 	$1=-fpic
 	;;
     # Default to -fPIC unless specified otherwise.
diff -urp ../gcc.git/config/override.m4 config/override.m4
--- ../gcc.git/config/override.m4	2014-11-24 14:48:32.327333882 +1030
+++ config/override.m4	2016-10-22 23:18:19.884410154 +1030
@@ -101,4 +101,16 @@ m4_define([_AC_CHECK_DECLS],
 
 ])
 
+dnl If flex/lex are not found, the top level configure sets LEX to
+dnl "/path_to/missing flex".  When AC_PROG_LEX tries to find the flex
+dnl output file, it calls $LEX to do so, but the current lightweight
+dnl "missing" won't create a file.  This results in an error.
+dnl Avoid calling the bulk of AC_PROG_LEX when $LEX is "missing".
+AC_DEFUN_ONCE([AC_PROG_LEX],
+[AC_CHECK_PROGS(LEX, flex lex, :)
+case "$LEX" in
+  :|*"missing "*) ;;
+  *) _AC_PROG_LEX_YYTEXT_DECL ;;
+esac])
+
 ])


-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]