+2016-09-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * configure.ac: Do not create links, only substitute the filenames.
+ * configure: Regenerate.
+ * Makefile.in: Assign the substitution results to variables.
+ (LIBGCC_LINKS): Define.
+ (enable-execute-stack.c): New rule.
+ (unwind.h): Likewise.
+ (md-unwind-support.h): Likewise.
+ (sfp-machine.h): Likewise.
+ (gthr-default.h): Likewise.
+ Add $(LIBGCC_LINKS) to the prerequisites of all object files and
+ unwind.h as prerequisite of install-unwind_h-forbuild.
+
2016-09-16 Jakub Jelinek <jakub@redhat.com>
PR libgcc/71744
enable_decimal_float = @enable_decimal_float@
fixed_point = @fixed_point@
with_aix_soname = @with_aix_soname@
+enable_execute_stack = @enable_execute_stack@
+unwind_header = @unwind_header@
+md_unwind_header = @md_unwind_header@
+sfp_machine_header = @sfp_machine_header@
+thread_header = @thread_header@
host_noncanonical = @host_noncanonical@
real_host_noncanonical = @real_host_noncanonical@
tmake_file = @tmake_file@
include $(srcdir)/empty.mk $(tmake_file)
+# Create links to files specified in config.host.
+LIBGCC_LINKS = enable-execute-stack.c unwind.h md-unwind-support.h \
+ sfp-machine.h gthr-default.h
+
+enable-execute-stack.c: $(srcdir)/$(enable_execute_stack)
+ -$(LN_S) $< $@
+unwind.h: $(srcdir)/$(unwind_header)
+ -$(LN_S) $< $@
+md-unwind-support.h: $(srcdir)/config/$(md_unwind_header)
+ -$(LN_S) $< $@
+sfp-machine.h: $(srcdir)/config/$(sfp_machine_header)
+ -$(LN_S) $< $@
+gthr-default.h: $(srcdir)/$(thread_header)
+ -$(LN_S) $< $@
+
# Collect target defines and headers from config.host.
libgcc_tm_defines = @tm_defines@
libgcc_tm_file = @tm_file@
$(libgcc-objects) $(libgcc-s-objects) $(libgcc-eh-objects) \
$(libgcov-objects) \
$(libunwind-objects) $(libunwind-s-objects) \
- $(EXTRA_PARTS): libgcc_tm.h
+ $(EXTRA_PARTS): $(LIBGCC_LINKS) libgcc_tm.h
# Copy unwind.h to the place where gcc will look for it at build-time
-install-unwind_h-forbuild:
+install-unwind_h-forbuild: unwind.h
dest=$(gcc_objdir)/include/tmp$$$$-unwind.h; \
cp unwind.h $$dest; \
chmod a+r $$dest; \
ac_includes_default='/* none */'
ac_subst_vars='LTLIBOBJS
LIBOBJS
+md_unwind_header
+unwind_header
+enable_execute_stack
asm_hidden_op
extra_parts
cpu_type
;;
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.
-ac_config_links="$ac_config_links enable-execute-stack.c:$enable_execute_stack"
-ac_config_links="$ac_config_links unwind.h:$unwind_header"
-ac_config_links="$ac_config_links md-unwind-support.h:config/$md_unwind_header"
-ac_config_links="$ac_config_links sfp-machine.h:config/$sfp_machine_header"
-ac_config_links="$ac_config_links gthr-default.h:$thread_header"
# We need multilib support.
# 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
Configuration headers:
$config_headers
-Configuration links:
-$config_links
-
Configuration commands:
$config_commands
do
case $ac_config_target in
"auto-target.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-target.h:config.in" ;;
- "enable-execute-stack.c") CONFIG_LINKS="$CONFIG_LINKS enable-execute-stack.c:$enable_execute_stack" ;;
- "unwind.h") CONFIG_LINKS="$CONFIG_LINKS unwind.h:$unwind_header" ;;
- "md-unwind-support.h") CONFIG_LINKS="$CONFIG_LINKS md-unwind-support.h:config/$md_unwind_header" ;;
- "sfp-machine.h") CONFIG_LINKS="$CONFIG_LINKS sfp-machine.h:config/$sfp_machine_header" ;;
- "gthr-default.h") CONFIG_LINKS="$CONFIG_LINKS gthr-default.h:$thread_header" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
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
fi # test -n "$CONFIG_HEADERS"
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
|| 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;}
;;