enable checks for no dot syms on netbsd ppc64, fixes build issues in libutil where the opd() function conflicts with the .opd section. remove a couple of tainted defines that are handled differently now. this, with mknative-gcc as well, enables ppc64 world to build again.diff -r1.14 -r1.15 src/external/gpl3/gcc/dist/gcc/configure
(mrg)
--- src/external/gpl3/gcc/dist/gcc/configure 2016/06/07 06:14:16 1.14
+++ src/external/gpl3/gcc/dist/gcc/configure 2016/06/09 23:28:22 1.15
@@ -27561,32 +27561,32 @@ rm -f core conftest.err conftest.$ac_obj | @@ -27561,32 +27561,32 @@ rm -f core conftest.err conftest.$ac_obj | |||
27561 | done | 27561 | done | |
27562 | LDFLAGS="$saved_LDFLAGS" | 27562 | LDFLAGS="$saved_LDFLAGS" | |
27563 | if test "x$gcc_cv_ld_clearcap" = xyes; then | 27563 | if test "x$gcc_cv_ld_clearcap" = xyes; then | |
27564 | 27564 | |||
27565 | $as_echo "#define HAVE_LD_CLEARCAP 1" >>confdefs.h | 27565 | $as_echo "#define HAVE_LD_CLEARCAP 1" >>confdefs.h | |
27566 | 27566 | |||
27567 | ac_config_links="$ac_config_links clearcap.map:${srcdir}/config/$clearcap_map" | 27567 | ac_config_links="$ac_config_links clearcap.map:${srcdir}/config/$clearcap_map" | |
27568 | 27568 | |||
27569 | fi | 27569 | fi | |
27570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_clearcap" >&5 | 27570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_clearcap" >&5 | |
27571 | $as_echo "$gcc_cv_ld_clearcap" >&6; } | 27571 | $as_echo "$gcc_cv_ld_clearcap" >&6; } | |
27572 | 27572 | |||
27573 | case "$target:$tm_file" in | 27573 | case "$target:$tm_file" in | |
27574 | powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | 27574 | powerpc64-*-freebsd* | powerpc64-*-netbsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
27575 | case "$target" in | 27575 | case "$target" in | |
27576 | *le-*-linux*) | 27576 | *le-*-linux*) | |
27577 | emul_name="-melf64lppc" | 27577 | emul_name="-melf64lppc" | |
27578 | ;; | 27578 | ;; | |
27579 | *-*-linux*) | 27579 | *-*-linux* | *-*-netbsd*) | |
27580 | emul_name="-melf64ppc" | 27580 | emul_name="-melf64ppc" | |
27581 | ;; | 27581 | ;; | |
27582 | *-*-freebsd*) | 27582 | *-*-freebsd*) | |
27583 | emul_name="-melf64ppc_fbsd" | 27583 | emul_name="-melf64ppc_fbsd" | |
27584 | ;; | 27584 | ;; | |
27585 | esac | 27585 | esac | |
27586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5 | 27586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for omitting dot symbols" >&5 | |
27587 | $as_echo_n "checking linker support for omitting dot symbols... " >&6; } | 27587 | $as_echo_n "checking linker support for omitting dot symbols... " >&6; } | |
27588 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then : | 27588 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then : | |
27589 | $as_echo_n "(cached) " >&6 | 27589 | $as_echo_n "(cached) " >&6 | |
27590 | else | 27590 | else | |
27591 | gcc_cv_ld_no_dot_syms=no | 27591 | gcc_cv_ld_no_dot_syms=no | |
27592 | if test x"$ld_is_gold" = xyes; then | 27592 | if test x"$ld_is_gold" = xyes; then |
--- src/external/gpl3/gcc/dist/gcc/configure.ac 2016/06/07 06:14:16 1.12
+++ src/external/gpl3/gcc/dist/gcc/configure.ac 2016/06/09 23:28:22 1.13
@@ -5071,32 +5071,32 @@ for clearcap_map in sol2-clearcapv2.map | @@ -5071,32 +5071,32 @@ for clearcap_map in sol2-clearcapv2.map | |||
5071 | LDFLAGS="$saved_LDFLAGS -Wl,-M,${srcdir}/config/$clearcap_map" | 5071 | LDFLAGS="$saved_LDFLAGS -Wl,-M,${srcdir}/config/$clearcap_map" | |
5072 | AC_LINK_IFELSE([int main(void) {return 0;}], | 5072 | AC_LINK_IFELSE([int main(void) {return 0;}], | |
5073 | [gcc_cv_ld_clearcap=yes; break], [gcc_cv_ld_clearcap=no]) | 5073 | [gcc_cv_ld_clearcap=yes; break], [gcc_cv_ld_clearcap=no]) | |
5074 | done | 5074 | done | |
5075 | LDFLAGS="$saved_LDFLAGS" | 5075 | LDFLAGS="$saved_LDFLAGS" | |
5076 | if test "x$gcc_cv_ld_clearcap" = xyes; then | 5076 | if test "x$gcc_cv_ld_clearcap" = xyes; then | |
5077 | AC_DEFINE([HAVE_LD_CLEARCAP], 1, | 5077 | AC_DEFINE([HAVE_LD_CLEARCAP], 1, | |
5078 | [Define if the linker supports clearing hardware capabilities via mapfile.]) | 5078 | [Define if the linker supports clearing hardware capabilities via mapfile.]) | |
5079 | AC_CONFIG_LINKS([clearcap.map:${srcdir}/config/$clearcap_map]) | 5079 | AC_CONFIG_LINKS([clearcap.map:${srcdir}/config/$clearcap_map]) | |
5080 | fi | 5080 | fi | |
5081 | AC_MSG_RESULT($gcc_cv_ld_clearcap) | 5081 | AC_MSG_RESULT($gcc_cv_ld_clearcap) | |
5082 | 5082 | |||
5083 | case "$target:$tm_file" in | 5083 | case "$target:$tm_file" in | |
5084 | powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | 5084 | powerpc64-*-freebsd* | powerpc64-*-netbsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
5085 | case "$target" in | 5085 | case "$target" in | |
5086 | *le-*-linux*) | 5086 | *le-*-linux*) | |
5087 | emul_name="-melf64lppc" | 5087 | emul_name="-melf64lppc" | |
5088 | ;; | 5088 | ;; | |
5089 | *-*-linux*) | 5089 | *-*-linux* | *-*-netbsd*) | |
5090 | emul_name="-melf64ppc" | 5090 | emul_name="-melf64ppc" | |
5091 | ;; | 5091 | ;; | |
5092 | *-*-freebsd*) | 5092 | *-*-freebsd*) | |
5093 | emul_name="-melf64ppc_fbsd" | 5093 | emul_name="-melf64ppc_fbsd" | |
5094 | ;; | 5094 | ;; | |
5095 | esac | 5095 | esac | |
5096 | AC_CACHE_CHECK(linker support for omitting dot symbols, | 5096 | AC_CACHE_CHECK(linker support for omitting dot symbols, | |
5097 | gcc_cv_ld_no_dot_syms, | 5097 | gcc_cv_ld_no_dot_syms, | |
5098 | [gcc_cv_ld_no_dot_syms=no | 5098 | [gcc_cv_ld_no_dot_syms=no | |
5099 | if test x"$ld_is_gold" = xyes; then | 5099 | if test x"$ld_is_gold" = xyes; then | |
5100 | gcc_cv_ld_no_dot_syms=yes | 5100 | gcc_cv_ld_no_dot_syms=yes | |
5101 | elif test $in_tree_ld = yes ; then | 5101 | elif test $in_tree_ld = yes ; then | |
5102 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then | 5102 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then |
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h 2015/06/24 01:29:33 1.13
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h 2016/06/09 23:28:22 1.14
@@ -298,33 +298,26 @@ extern int dot_symbols; | @@ -298,33 +298,26 @@ extern int dot_symbols; | |||
298 | #define AGGREGATE_PADDING_FIXED TARGET_64BIT | 298 | #define AGGREGATE_PADDING_FIXED TARGET_64BIT | |
299 | #define AGGREGATES_PAD_UPWARD_ALWAYS 0 | 299 | #define AGGREGATES_PAD_UPWARD_ALWAYS 0 | |
300 | 300 | |||
301 | /* Specify padding for the last element of a block move between | 301 | /* Specify padding for the last element of a block move between | |
302 | registers and memory. FIRST is nonzero if this is the only | 302 | registers and memory. FIRST is nonzero if this is the only | |
303 | element. */ | 303 | element. */ | |
304 | #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ | 304 | #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ | |
305 | (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE)) | 305 | (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE)) | |
306 | 306 | |||
307 | /* NetBSD doesn't support saving and restoring 64-bit regs in a 32-bit | 307 | /* NetBSD doesn't support saving and restoring 64-bit regs in a 32-bit | |
308 | process. XXXMRG? */ | 308 | process. XXXMRG? */ | |
309 | #define OS_MISSING_POWERPC64 !TARGET_64BIT | 309 | #define OS_MISSING_POWERPC64 !TARGET_64BIT | |
310 | 310 | |||
311 | /* NetBSD has float and long double forms of math functions. */ | |||
312 | #undef TARGET_C99_FUNCTIONS | |||
313 | #define TARGET_C99_FUNCTIONS 1 | |||
314 | ||||
315 | /* NetBSD doesn't have sincos that follows the GNU extension. */ | |||
316 | #undef TARGET_HAS_SINCOS | |||
317 | ||||
318 | #undef TARGET_OS_CPP_BUILTINS | 311 | #undef TARGET_OS_CPP_BUILTINS | |
319 | #define TARGET_OS_CPP_BUILTINS() \ | 312 | #define TARGET_OS_CPP_BUILTINS() \ | |
320 | do \ | 313 | do \ | |
321 | { \ | 314 | { \ | |
322 | NETBSD_OS_CPP_BUILTINS_ELF(); \ | 315 | NETBSD_OS_CPP_BUILTINS_ELF(); \ | |
323 | if (TARGET_ISEL) \ | 316 | if (TARGET_ISEL) \ | |
324 | builtin_define ("__PPC_ISEL__"); \ | 317 | builtin_define ("__PPC_ISEL__"); \ | |
325 | if (TARGET_64BIT) \ | 318 | if (TARGET_64BIT) \ | |
326 | { \ | 319 | { \ | |
327 | builtin_define ("__PPC__"); \ | 320 | builtin_define ("__PPC__"); \ | |
328 | builtin_define ("__PPC64__"); \ | 321 | builtin_define ("__PPC64__"); \ | |
329 | builtin_define ("__powerpc__"); \ | 322 | builtin_define ("__powerpc__"); \ | |
330 | builtin_define ("__powerpc64__"); \ | 323 | builtin_define ("__powerpc64__"); \ |