Skip to content

Commit

Permalink
Fix x86_64-pc-linux-gnu and aarch64-pc-linux-gnu build (gcc-mirror#8)
Browse files Browse the repository at this point in the history
* * fix undefined references in libgfortran

* * fix internal compiler error in gfortran

* Revert "* fix internal compiler error in gfortran"

This reverts commit 4c81782ca9e75120eb91e1b6b89559f277233621.

* * revert changes for undefined references in gfortran

* Fix build on x86_64-pc-linux-gnu when host is aarch64-w64-mingw32 (gcc-mirror#6)

* Fix x86_64-pc-linux-gnu and aarch64-pc-linux-gnu build

---------

Co-authored-by: Evgeny Karpov <eukarpov@gmail.com>
  • Loading branch information
Blackhex and eukarpov committed May 21, 2024
1 parent 9fb1dbd commit 7100393
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gcc/common/config/aarch64/aarch64-common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ aarch64_rewrite_mcpu (int argc, const char **argv)
return aarch64_rewrite_selected_cpu (argv[argc - 1]);
}

#if TARGET_64BIT_MS_ABI

/* Implement TARGET_EXCEPT_UNWIND_INFO. */

static enum unwind_info_type
Expand All @@ -465,6 +467,8 @@ aarch64_except_unwind_info (struct gcc_options *opts)
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO aarch64_except_unwind_info

#endif // TARGET_64BIT_MS_ABI

struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;

#undef AARCH64_CPU_NAME_LENGTH
Expand Down
6 changes: 5 additions & 1 deletion gcc/config/aarch64/aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,9 @@ get_dllimport_decl (tree decl, bool beimport)
if (!beimport)
{
SYMBOL_REF_FLAGS (rtl) |= SYMBOL_FLAG_EXTERNAL;
#if defined(TARGET_64BIT_MS_ABI)
i386_pe_record_stub (name);
#endif // TARGET_64BIT_MS_ABI
}

rtl = gen_const_mem (Pmode, rtl);
Expand Down Expand Up @@ -18454,8 +18456,10 @@ aarch64_override_options_after_change_1 (struct gcc_options *opts)
flag_mrecip_low_precision_sqrt = true;

/* Enable unwind tables for MS */
if (TARGET_64BIT_MS_ABI && opts->x_flag_unwind_tables == 0)
#if defined(TARGET_64BIT_MS_ABI)
if (opts->x_flag_unwind_tables == 0)
opts->x_flag_unwind_tables = 1;
#endif // TARGET_64BIT_MS_ABI
}

/* 'Unpack' up the internal tuning structs and update the options
Expand Down

0 comments on commit 7100393

Please sign in to comment.