Use v2 map syntax in libgcc-unwind.map if Solaris ld supports it
* configure.ac (solaris_ld_v2_maps): New test. * configure: Regenerate. * Makefile.in (solaris_ld_v2_maps): New variable. * config/t-slibgcc-sld (libgcc-unwind.map): Emit v2 mapfile syntax if supported. From-SVN: r264382
This commit is contained in:
parent
e6bf23cce3
commit
53c6feb2b2
|
@ -1,3 +1,11 @@
|
||||||
|
2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
|
* configure.ac (solaris_ld_v2_maps): New test.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* Makefile.in (solaris_ld_v2_maps): New variable.
|
||||||
|
* config/t-slibgcc-sld (libgcc-unwind.map): Emit v2 mapfile syntax
|
||||||
|
if supported.
|
||||||
|
|
||||||
2018-08-23 Richard Earnshaw <rearnsha@arm.com>
|
2018-08-23 Richard Earnshaw <rearnsha@arm.com>
|
||||||
|
|
||||||
PR target/86951
|
PR target/86951
|
||||||
|
|
|
@ -44,6 +44,7 @@ enable_vtable_verify = @enable_vtable_verify@
|
||||||
enable_decimal_float = @enable_decimal_float@
|
enable_decimal_float = @enable_decimal_float@
|
||||||
fixed_point = @fixed_point@
|
fixed_point = @fixed_point@
|
||||||
with_aix_soname = @with_aix_soname@
|
with_aix_soname = @with_aix_soname@
|
||||||
|
solaris_ld_v2_maps = @solaris_ld_v2_maps@
|
||||||
enable_execute_stack = @enable_execute_stack@
|
enable_execute_stack = @enable_execute_stack@
|
||||||
unwind_header = @unwind_header@
|
unwind_header = @unwind_header@
|
||||||
md_unwind_header = @md_unwind_header@
|
md_unwind_header = @md_unwind_header@
|
||||||
|
|
|
@ -8,12 +8,23 @@ ifeq ($(enable_shared),yes)
|
||||||
|
|
||||||
# Linker mapfile to enforce direct binding to libgcc_s unwinder
|
# Linker mapfile to enforce direct binding to libgcc_s unwinder
|
||||||
# (PR target/59788).
|
# (PR target/59788).
|
||||||
|
# Emit v2 mapfile syntax if possible, otherwise ld -z guidance complains
|
||||||
|
# every time the mapfile is used.
|
||||||
libgcc-unwind.map: libgcc-std.ver
|
libgcc-unwind.map: libgcc-std.ver
|
||||||
|
ifeq ($(solaris_ld_v2_maps),yes)
|
||||||
|
@(echo '$$mapfile_version 2'; \
|
||||||
|
echo "SYMBOL_SCOPE {"; \
|
||||||
|
for f in `grep _Unwind_ $< | sort`; do \
|
||||||
|
echo " $$f { FLAGS = EXTERN DIRECT };"; \
|
||||||
|
done; \
|
||||||
|
echo "};" ) > $@
|
||||||
|
else
|
||||||
@(echo "{"; \
|
@(echo "{"; \
|
||||||
for f in `grep _Unwind_ $< | sort`; do \
|
for f in `grep _Unwind_ $< | sort`; do \
|
||||||
echo " $$f = EXTERN DIRECT;"; \
|
echo " $$f = EXTERN DIRECT;"; \
|
||||||
done; \
|
done; \
|
||||||
echo "};" ) > $@
|
echo "};" ) > $@
|
||||||
|
endif
|
||||||
|
|
||||||
# Copy libgcc-unwind.map to the place where gcc will look for it at build-time.
|
# Copy libgcc-unwind.map to the place where gcc will look for it at build-time.
|
||||||
install-libgcc-unwind-map-forbuild: libgcc-unwind.map
|
install-libgcc-unwind-map-forbuild: libgcc-unwind.map
|
||||||
|
|
|
@ -570,6 +570,7 @@ sfp_machine_header
|
||||||
set_use_emutls
|
set_use_emutls
|
||||||
set_have_cc_tls
|
set_have_cc_tls
|
||||||
vis_hide
|
vis_hide
|
||||||
|
solaris_ld_v2_maps
|
||||||
real_host_noncanonical
|
real_host_noncanonical
|
||||||
accel_dir_suffix
|
accel_dir_suffix
|
||||||
force_explicit_eh_registry
|
force_explicit_eh_registry
|
||||||
|
@ -5176,6 +5177,26 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check if Solaris linker support v2 linker mapfile syntax.
|
||||||
|
# Link with -nostartfiles -nodefaultlibs since neither are present while
|
||||||
|
# building libgcc.
|
||||||
|
case ${host} in
|
||||||
|
*-*-solaris2*)
|
||||||
|
solaris_ld_v2_maps=no
|
||||||
|
echo 'int main(void) {return 0;}' > conftest.c
|
||||||
|
echo '$mapfile_version 2' > conftest.map
|
||||||
|
if { ac_try='${CC-cc} -nostartfiles -nodefaultlibs -Wl,-M,conftest.map -o conftest conftest.c 1>&5'
|
||||||
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; }; then
|
||||||
|
solaris_ld_v2_maps=yes
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
# Check if xtensa target is configured for windowed ABI and thus needs to use
|
# Check if xtensa target is configured for windowed ABI and thus needs to use
|
||||||
# custom unwind code.
|
# custom unwind code.
|
||||||
# This is after config.host so we can augment tmake_file.
|
# This is after config.host so we can augment tmake_file.
|
||||||
|
|
|
@ -459,6 +459,21 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check if Solaris linker support v2 linker mapfile syntax.
|
||||||
|
# Link with -nostartfiles -nodefaultlibs since neither are present while
|
||||||
|
# building libgcc.
|
||||||
|
case ${host} in
|
||||||
|
*-*-solaris2*)
|
||||||
|
solaris_ld_v2_maps=no
|
||||||
|
echo 'int main(void) {return 0;}' > conftest.c
|
||||||
|
echo '$mapfile_version 2' > conftest.map
|
||||||
|
if AC_TRY_COMMAND([${CC-cc} -nostartfiles -nodefaultlibs -Wl,-M,conftest.map -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then
|
||||||
|
solaris_ld_v2_maps=yes
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST(solaris_ld_v2_maps)
|
||||||
|
|
||||||
# Check if xtensa target is configured for windowed ABI and thus needs to use
|
# Check if xtensa target is configured for windowed ABI and thus needs to use
|
||||||
# custom unwind code.
|
# custom unwind code.
|
||||||
# This is after config.host so we can augment tmake_file.
|
# This is after config.host so we can augment tmake_file.
|
||||||
|
|
Loading…
Reference in New Issue