On Sat, 2021-11-27 at 16:27 +0800, chenglulu wrote:
> +++ b/gcc/config/loongarch/loongarch-opts.h
/* snip */
> +#ifdef IN_LIBGCC2
> +#include "loongarch-def.h"
> +#else
> +extern "C" {
> +#include "loongarch-def.h"
> +}
> +
> +/* Handler for "-m" option combinations,
> + shared by the driver and the compiler proper. */
> +void
> +loongarch_config_target (struct loongarch_target *target,
> + HOST_WIDE_INT opt_switches,
> + int opt_arch, int opt_tune, int opt_fpu,
> + int opt_abi_base, int opt_abi_ext,
> + int opt_cmodel, int follow_multilib_list);
> +#endif
This is causing failures building libobjc (complaining that `extern "C"`
can't be used in C code, and HOST_WIDE_INT is not defined).
I think
#ifdef IN_LIBGCC2
should be replaced with
#if defined(IN_LIBGCC2) || defined(IN_TARGET_LIBS)
--
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University