diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2014-05-28 11:32:54 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2014-05-28 11:32:54 +0000 |
commit | 3c698bf09bbb3c96d568011c7b62a49c9d67f928 (patch) | |
tree | 7a94d4d83dba15233aa76c30e53b2b3f9bd8d99e /gcc/configure | |
parent | 4c8bd90f9f48591980394092c4748678c37049ff (diff) | |
download | gcc-3c698bf09bbb3c96d568011c7b62a49c9d67f928.zip gcc-3c698bf09bbb3c96d568011c7b62a49c9d67f928.tar.gz gcc-3c698bf09bbb3c96d568011c7b62a49c9d67f928.tar.bz2 |
Centralise clearing hardware capabilities with Sun ld
gcc:
* configure.ac ($gcc_cv_ld_clearcap): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/sol2.opt (mclear-hwcap): New option.
* config/sol2.h (LINK_CLEARCAP_SPEC): Define.
* config/sol2-clearcap.map: Moved here from
testsuite/gcc.target/i386/clearcap.map.
* config/sol2-clearcapv2.map: Move here from
gcc.target/i386/clearcapv2.map.
* config/t-sol2 (install): Depend on install-clearcap-map.
(install-clearcap-map): New target.
* doc/invoke.texi (Option Summary, Solaris 2 Options): Document
-mclear-hwcap.
gcc/testsuite:
* lib/clearcap.exp: New file.
* gcc.dg/vect/vect.exp: Load clearcap.exp.
Remove clearcap_ldflags handling.
Call clearcap-init, clearcap-finish.
* gcc.target/i386/i386.exp: Likewise.
* gcc.target/i386/clearcap.map: Move to ../config/sol2-clearcap.map.
* gcc.target/i386/clearcapv2.map: Move to
../config/sol2-clearcapv2.map.
* gcc.target/x86_64/abi/avx/abi-avx.exp: Likewise.
* gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Likewise.
libitm:
* acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
-mclear-hwcap instead.
* configure: Regenerate.
* clearcap.map: Remove.
From-SVN: r211014
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/gcc/configure b/gcc/configure index fe76232..f60d347 100755 --- a/gcc/configure +++ b/gcc/configure @@ -26920,6 +26920,34 @@ _ACEOF fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker mapfile support for clearing hardware capabilities" >&5 +$as_echo_n "checking linker mapfile support for clearing hardware capabilities... " >&6; } +saved_LDFLAGS="$LDFLAGS" +for clearcap_map in sol2-clearcapv2.map sol2-clearcap.map; do + LDFLAGS="$saved_LDFLAGS -Wl,-M,${srcdir}/config/$clearcap_map" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void) {return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gcc_cv_ld_clearcap=yes; break +else + gcc_cv_ld_clearcap=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +done +LDFLAGS="$saved_LDFLAGS" +if test "x$gcc_cv_ld_clearcap" = xyes; then + +$as_echo "#define HAVE_LD_CLEARCAP 1" >>confdefs.h + + ac_config_links="$ac_config_links clearcap.map:${srcdir}/config/$clearcap_map" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_clearcap" >&5 +$as_echo "$gcc_cv_ld_clearcap" >&6; } + case "$target:$tm_file" in powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) case "$target" in @@ -28456,6 +28484,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" +config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF @@ -28485,6 +28514,9 @@ $config_files Configuration headers: $config_headers +Configuration links: +$config_links + Configuration commands: $config_commands @@ -28620,6 +28652,7 @@ do "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;; "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;; "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;; + "clearcap.map") CONFIG_LINKS="$CONFIG_LINKS clearcap.map:${srcdir}/config/$clearcap_map" ;; "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; @@ -28635,6 +28668,7 @@ done if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi @@ -28956,7 +28990,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_HEADERS" -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do @@ -29192,7 +29226,38 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} || as_fn_error "could not create -" "$LINENO" 5 fi ;; + :L) + # + # CONFIG_LINK + # + + if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then + : + else + # Prefer the file from the source tree if names are identical. + if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then + ac_source=$srcdir/$ac_source + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 +$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} + + if test ! -r "$ac_source"; then + as_fn_error "$ac_source: file not found" "$LINENO" 5 + fi + rm -f "$ac_file" + + # Try a relative symlink, then a hard link, then a copy. + case $srcdir in + [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$ac_source ;; + esac + ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || + ln "$ac_source" "$ac_file" 2>/dev/null || + cp -p "$ac_source" "$ac_file" || + as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + fi + ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; |