+2020-04-30 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.ac (--with-documentation-root-url,
+ --with-changes-root-url): Diagnose URL not ending with /,
+ use AC_DEFINE_UNQUOTED instead of AC_SUBST.
+ * opts.h (get_changes_url): Remove.
+ * opts.c (get_changes_url): Remove.
+ * Makefile.in (CFLAGS-opts.o): Don't add -DDOCUMENTATION_ROOT_URL
+ or -DCHANGES_ROOT_URL.
+ * doc/install.texi (--with-documentation-root-url,
+ --with-changes-root-url): Document.
+ * config/arm/arm.c (aapcs_vfp_is_call_or_return_candidate): Don't call
+ get_changes_url and free, change url variable type to const char * and
+ set it to CHANGES_ROOT_URL "gcc-10/changes.html#empty_base".
+ * config/s390/s390.c (s390_function_arg_vector,
+ s390_function_arg_float): Likewise.
+ * config/aarch64/aarch64.c (aarch64_vfp_is_call_or_return_candidate):
+ Likewise.
+ * config/rs6000/rs6000-call.c (rs6000_discover_homogeneous_aggregate):
+ Likewise.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
2020-04-30 Christophe Lyon <christophe.lyon@linaro.org>
PR target/57002
$(LTO_WRAPPER_OBJS) libcommon-target.a $(LIBS)
mv -f T$@ $@
-CFLAGS-opts.o += -DDOCUMENTATION_ROOT_URL=\"@DOCUMENTATION_ROOT_URL@\"
-CFLAGS-opts.o += -DCHANGES_ROOT_URL=\"@CHANGES_ROOT_URL@\"
-
# Files used by all variants of C or by the stand-alone pre-processor.
CFLAGS-c-family/c-opts.o += @TARGET_SYSTEM_ROOT_DEFINE@
#endif
+/* Define to the root for URLs about GCC changes. */
+#ifndef USED_FOR_TARGET
+#undef CHANGES_ROOT_URL
+#endif
+
+
/* Define as the number of bits in a byte, if `limits.h' doesn't. */
#ifndef USED_FOR_TARGET
#undef CHAR_BIT
#endif
+/* Define to the root for documentation URLs. */
+#ifndef USED_FOR_TARGET
+#undef DOCUMENTATION_ROOT_URL
+#endif
+
+
/* Define 0/1 if static analyzer feature is enabled. */
#ifndef USED_FOR_TARGET
#undef ENABLE_ANALYZER
&& ((alt = aapcs_vfp_sub_candidate (type, &new_mode, NULL))
!= ag_count))
{
- char *url = get_changes_url ("gcc-10/changes.html#empty_base");
+ const char *url
+ = CHANGES_ROOT_URL "gcc-10/changes.html#empty_base";
gcc_assert (alt == -1);
last_reported_type_uid = uid;
/* Use TYPE_MAIN_VARIANT to strip any redundant const
"type %qT when C++17 is enabled changed to match "
"C++14 %{in GCC 10.1%}",
TYPE_MAIN_VARIANT (type), url);
- free (url);
}
if (is_ha != NULL) *is_ha = true;
&& ((alt = aapcs_vfp_sub_candidate (type, &new_mode, NULL))
!= ag_count))
{
- char *url = get_changes_url ("gcc-10/changes.html#empty_base");
+ const char *url
+ = CHANGES_ROOT_URL "gcc-10/changes.html#empty_base";
gcc_assert (alt == -1);
last_reported_type_uid = uid;
/* Use TYPE_MAIN_VARIANT to strip any redundant const
"type %qT when C++17 is enabled changed to match "
"C++14 %{in GCC 10.1%}",
TYPE_MAIN_VARIANT (type), url);
- free (url);
}
*count = ag_count;
}
unsigned uid = TYPE_UID (TYPE_MAIN_VARIANT (type));
if (uid != last_reported_type_uid)
{
- char *url
- = get_changes_url ("gcc-10/changes.html#empty_base");
+ const char *url
+ = CHANGES_ROOT_URL "gcc-10/changes.html#empty_base";
if (empty_base_seen & 1)
inform (input_location,
"parameter passing for argument of type %qT "
"with %<[[no_unique_address]]%> members "
"changed %{in GCC 10.1%}", type, url);
last_reported_type_uid = uid;
- free (url);
}
}
return true;
unsigned uid = TYPE_UID (TYPE_MAIN_VARIANT (orig_type));
if (uid != last_reported_type_uid)
{
- char *url = get_changes_url ("gcc-10/changes.html#empty_base");
+ const char *url = CHANGES_ROOT_URL "gcc-10/changes.html#empty_base";
last_reported_type_uid = uid;
if (empty_base_seen & 1)
inform (input_location,
"parameter passing for argument of type %qT with "
"%<[[no_unique_address]]%> members changed "
"%{in GCC 10.1%}", orig_type, url);
- free (url);
}
}
return true;
unsigned uid = TYPE_UID (TYPE_MAIN_VARIANT (orig_type));
if (uid != last_reported_type_uid)
{
- char *url = get_changes_url ("gcc-10/changes.html#empty_base");
+ const char *url = CHANGES_ROOT_URL "gcc-10/changes.html#empty_base";
last_reported_type_uid = uid;
if (empty_base_seen & 1)
inform (input_location,
"parameter passing for argument of type %qT with "
"%<[[no_unique_address]]%> members changed "
"%{in GCC 10.1%}", orig_type, url);
- free (url);
}
}
real_target_noncanonical
enable_as_accelerator
gnat_install_lib
-CHANGES_ROOT_URL
-DOCUMENTATION_ROOT_URL
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
withval=$with_documentation_root_url; case "$withval" in
yes) as_fn_error $? "documentation root URL not specified" "$LINENO" 5 ;;
no) as_fn_error $? "documentation root URL not specified" "$LINENO" 5 ;;
- *) DOCUMENTATION_ROOT_URL="$withval"
- ;;
+ */) DOCUMENTATION_ROOT_URL="$withval" ;;
+ *) as_fn_error $? "documentation root URL does not end with /" "$LINENO" 5 ;;
esac
else
DOCUMENTATION_ROOT_URL="https://gcc.gnu.org/onlinedocs/"
fi
+cat >>confdefs.h <<_ACEOF
+#define DOCUMENTATION_ROOT_URL "$DOCUMENTATION_ROOT_URL"
+_ACEOF
+
# Allow overriding the default URL for GCC changes
withval=$with_changes_root_url; case "$withval" in
yes) as_fn_error $? "changes root URL not specified" "$LINENO" 5 ;;
no) as_fn_error $? "changes root URL not specified" "$LINENO" 5 ;;
- *) CHANGES_ROOT_URL="$withval"
- ;;
+ */) CHANGES_ROOT_URL="$withval" ;;
+ *) as_fn_error $? "changes root URL does not end with /" "$LINENO" 5 ;;
esac
else
CHANGES_ROOT_URL="https://gcc.gnu.org/"
fi
+cat >>confdefs.h <<_ACEOF
+#define CHANGES_ROOT_URL "$CHANGES_ROOT_URL"
+_ACEOF
+
# Sanity check enable_languages in case someone does not run the toplevel
# configure # script.
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19012 "configure"
+#line 19018 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19118 "configure"
+#line 19124 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
[case "$withval" in
yes) AC_MSG_ERROR([documentation root URL not specified]) ;;
no) AC_MSG_ERROR([documentation root URL not specified]) ;;
- *) DOCUMENTATION_ROOT_URL="$withval"
- ;;
+ */) DOCUMENTATION_ROOT_URL="$withval" ;;
+ *) AC_MSG_ERROR([documentation root URL does not end with /]) ;;
esac],
DOCUMENTATION_ROOT_URL="https://gcc.gnu.org/onlinedocs/"
)
-AC_SUBST(DOCUMENTATION_ROOT_URL)
+AC_DEFINE_UNQUOTED(DOCUMENTATION_ROOT_URL,"$DOCUMENTATION_ROOT_URL",
+ [Define to the root for documentation URLs.])
# Allow overriding the default URL for GCC changes
AC_ARG_WITH(changes-root-url,
[case "$withval" in
yes) AC_MSG_ERROR([changes root URL not specified]) ;;
no) AC_MSG_ERROR([changes root URL not specified]) ;;
- *) CHANGES_ROOT_URL="$withval"
- ;;
+ */) CHANGES_ROOT_URL="$withval" ;;
+ *) AC_MSG_ERROR([changes root URL does not end with /]) ;;
esac],
CHANGES_ROOT_URL="https://gcc.gnu.org/"
)
-AC_SUBST(CHANGES_ROOT_URL)
+AC_DEFINE_UNQUOTED(CHANGES_ROOT_URL,"$CHANGES_ROOT_URL",
+ [Define to the root for URLs about GCC changes.])
# Sanity check enable_languages in case someone does not run the toplevel
# configure # script.
The default value refers to the FSF's GCC bug tracker.
+@item --with-documentation-root-url=@var{url}
+Specify the URL root that contains GCC option documentation. The @var{url}
+should end with a @code{/} character.
+
+The default value is @uref{https://gcc.gnu.org/onlinedocs/,,https://gcc.gnu.org/onlinedocs/}.
+
+@item --with-changes-root-url=@var{url}
+Specify the URL root that contains information about changes in GCC
+releases like @code{gcc-@var{version}/changes.html}.
+The @var{url} should end with a @code{/} character.
+
+The default value is @uref{https://gcc.gnu.org/,,https://gcc.gnu.org/}.
+
@end table
@heading Target specification
return NULL;
}
-/* Given "gcc-10/changes.html#foobar", return that URL under
- CHANGES_ROOT_URL (see --with-changes-root-url).
- The caller is responsible for freeing the returned string. */
-
-char *
-get_changes_url (const char *str)
-{
- return concat (CHANGES_ROOT_URL, str, NULL);
-}
-
#if CHECKING_P
namespace selftest {
int *);
extern void prepend_xassembler_to_collect_as_options (const char *, obstack *);
-extern char *get_changes_url (const char *);
/* Set OPTION in OPTS to VALUE if the option is not set in OPTS_SET. */