aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgcc/ChangeLog14
-rw-r--r--libgcc/Makefile.in24
-rw-r--r--libgcc/configure55
-rw-r--r--libgcc/configure.ac10
4 files changed, 45 insertions, 58 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index b5c7ea4..1627278 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,17 @@
+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
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 53e3ea2..ff3c77f 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -43,6 +43,11 @@ enable_vtable_verify = @enable_vtable_verify@
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@
@@ -345,6 +350,21 @@ SHLIBUNWIND_INSTALL =
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@
@@ -1069,10 +1089,10 @@ all: $(extra-parts)
$(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; \
diff --git a/libgcc/configure b/libgcc/configure
index bf96aec..4fcdca6 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -555,6 +555,9 @@ ac_unique_file="static-object.mk"
ac_includes_default='/* none */'
ac_subst_vars='LTLIBOBJS
LIBOBJS
+md_unwind_header
+unwind_header
+enable_execute_stack
asm_hidden_op
extra_parts
cpu_type
@@ -2321,10 +2324,6 @@ case "${host}" in
;;
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.
@@ -5084,15 +5083,10 @@ esac
-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.
@@ -5632,7 +5626,6 @@ 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
@@ -5662,9 +5655,6 @@ $config_files
Configuration headers:
$config_headers
-Configuration links:
-$config_links
-
Configuration commands:
$config_commands
@@ -5804,11 +5794,6 @@ for ac_config_target in $ac_config_targets
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" ;;
@@ -5824,7 +5809,6 @@ 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
@@ -6112,7 +6096,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
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
@@ -6348,38 +6332,7 @@ $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;}
;;
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 269997f..927507e 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -548,11 +548,11 @@ GCC_AC_THREAD_HEADER([$target_thread_file])
AC_SUBST(cpu_type)
AC_SUBST(extra_parts)
AC_SUBST(asm_hidden_op)
-AC_CONFIG_LINKS([enable-execute-stack.c:$enable_execute_stack])
-AC_CONFIG_LINKS([unwind.h:$unwind_header])
-AC_CONFIG_LINKS([md-unwind-support.h:config/$md_unwind_header])
-AC_CONFIG_LINKS([sfp-machine.h:config/$sfp_machine_header])
-AC_CONFIG_LINKS([gthr-default.h:$thread_header])
+AC_SUBST(enable_execute_stack)
+AC_SUBST(unwind_header)
+AC_SUBST(md_unwind_header)
+AC_SUBST(sfp_machine_header)
+AC_SUBST(thread_header)
# We need multilib support.
AC_CONFIG_FILES([Makefile])