• R/O
  • HTTP
  • SSH
  • HTTPS

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


ファイル情報

Rev. c4df5bbeb87a445dbc84b9ed677b2c721e5051b5
サイズ 1,634 バイト
日時 2020-07-04 04:03:47
作者 Sebastian Huber
ログメッセージ

sim/igen: Fix linker error with -fno-common

GCC 10 enables -fno-common by default. This resulted in multiple
definition linker errors since a global variable was declared and
defined in a header file:

ld: libsim.a(idecode.o):sim/v850/idecode.h:71: multiple definition of
idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined
here
ld: libsim.a(engine.o):sim/v850/idecode.h:71: multiple definition of
idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined
here
ld: libsim.a(support.o):sim/v850/idecode.h:71: multiple definition of
idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first defined
here
ld: libsim.a(semantics.o):sim/v850/idecode.h:71: multiple definition
of idecode_issue'; libsim.a(irun.o):sim/v850/idecode.h:71: first
defined here

sim/igen

PR sim/26194

* lf.h (lf_get_file_type): Declare.
* lf.c (lf_get_file_type): Define.
* gen-idecode.c (print_idecode_issue_function_header): Use
lf_get_file_type() to issue an extern variable declaration in
case of header files.

内容

dnl
dnl Check if the assembler used supports disabling generation of hardware
dnl capabilities.  This is only supported by Solaris as at the moment.
dnl
dnl Defines:
dnl  HWCAP_CFLAGS='-Wa,-nH' if possible.
dnl
AC_DEFUN([GCC_CHECK_ASSEMBLER_HWCAP], [
  test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS=''

  # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH
  # with a different meaning.
  case ${target_os} in
    solaris2*)
      ac_save_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS -Wa,-nH"

      AC_MSG_CHECKING([for as that supports -Wa,-nH])
      AC_TRY_COMPILE([], [return 0;], [ac_hwcap_flags=yes],[ac_hwcap_flags=no])
      if test "$ac_hwcap_flags" = "yes"; then
	HWCAP_CFLAGS="-Wa,-nH $HWCAP_CFLAGS"
      fi
      AC_MSG_RESULT($ac_hwcap_flags)

      CFLAGS="$ac_save_CFLAGS"
      ;;
  esac

  AC_SUBST(HWCAP_CFLAGS)
])


dnl
dnl Check if the linker used supports linker maps to clear hardware
dnl capabilities.  This is only supported on Solaris at the moment.
dnl
dnl Defines:
dnl  HWCAP_LDFLAGS=-mclear-hwcap if possible
dnl  LD (as a side effect of testing)
dnl
AC_DEFUN([GCC_CHECK_LINKER_HWCAP], [
  test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
  AC_REQUIRE([AC_PROG_LD])

  ac_save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LFLAGS -mclear-hwcap"

  AC_MSG_CHECKING([for -mclear-hwcap])
  AC_TRY_LINK([], [return 0;], [ac_hwcap_ldflags=yes],[ac_hwcap_ldflags=no])
  if test "$ac_hwcap_ldflags" = "yes"; then
    HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS"
  fi
  AC_MSG_RESULT($ac_hwcap_ldflags)

  LDFLAGS="$ac_save_LDFLAGS"

  AC_SUBST(HWCAP_LDFLAGS)

  AM_CONDITIONAL(HAVE_HWCAP, test $ac_hwcap_ldflags != no)
])