From 18697a1de7710088982537008b244a80361cc4e0 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 8 Dec 2016 09:46:03 +1030 Subject: [PATCH] sync config/* from binutils * 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. From-SVN: r243417 --- config/ChangeLog | 7 +++++++ config/elf.m4 | 2 +- config/override.m4 | 12 ++++++++++++ config/picflag.m4 | 7 ++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index a823d21626b..35ddacf6d78 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,10 @@ +2016-12-08 Alan Modra + + * 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. + 2016-12-02 Maxim Ostapenko * bootstrap-asan.mk: Replace LSAN_OPTIONS=detect_leaks=0 with diff --git a/config/elf.m4 b/config/elf.m4 index 5f5cd88da09..1772a44318e 100644 --- a/config/elf.m4 +++ b/config/elf.m4 @@ -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 --git a/config/override.m4 b/config/override.m4 index 52bd1c3d1b8..b5ce6545ab6 100644 --- a/config/override.m4 +++ b/config/override.m4 @@ -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]) + ]) diff --git a/config/picflag.m4 b/config/picflag.m4 index 614421d2a94..2f5b9721eb2 100644 --- a/config/picflag.m4 +++ b/config/picflag.m4 @@ -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. -- 2.43.5