diff options
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 9 | ||||
-rw-r--r-- | gold/config.in | 7 | ||||
-rwxr-xr-x | gold/configure | 2 | ||||
-rw-r--r-- | gold/configure.ac | 9 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 80ce49e..bbfcff2 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,12 @@ +2012-05-17 Daniel Richard G. <skunk@iskunk.org> + Nick Clifton <nickc@redhat.com> + + PR 14072 + * configure.in: Add check that sysdep.h has been included before + any system header files. + * configure: Regenerate. + * config.in: Regenerate. + 2012-05-14 Cary Coutant <ccoutant@google.com> * layout.cc (Layout::make_output_section): Mark .tdata section diff --git a/gold/config.in b/gold/config.in index dd6d827..dd0a0da 100644 --- a/gold/config.in +++ b/gold/config.in @@ -1,5 +1,12 @@ /* config.in. Generated from configure.ac by autoheader. */ +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD diff --git a/gold/configure b/gold/configure index 745e727..dec02dc 100755 --- a/gold/configure +++ b/gold/configure @@ -3223,6 +3223,8 @@ ac_config_headers="$ac_config_headers config.h:config.in" + + # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; sysroot=$withval diff --git a/gold/configure.ac b/gold/configure.ac index ee53409..a2c4875 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -11,6 +11,15 @@ AM_INIT_AUTOMAKE([no-dist parallel-tests]) AM_CONFIG_HEADER(config.h:config.in) +# PR 14072 +AH_VERBATIM([00_CONFIG_H_CHECK], +[/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1]) + AC_ARG_WITH(sysroot, [ --with-sysroot[=DIR] search for usr/lib et al within DIR], [sysroot=$withval], [sysroot=no]) |