Skip to content

Commit

Permalink
Merge pull request #12 from jrtc27/ppc64
Browse files Browse the repository at this point in the history
Added support for 64-bit PowerPC
  • Loading branch information
dcjm committed Jan 7, 2016
2 parents 8592e2a + d0644fb commit 80bc444
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,9 @@
/* Define if the host is a Power PC (32 bit) */
#undef HOSTARCHITECTURE_PPC

/* Define if the host is a Power PC (64 bit) */
#undef HOSTARCHITECTURE_PPC64

/* Define if the host is a Sparc (32 bit) */
#undef HOSTARCHITECTURE_SPARC

Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ case "${host_cpu}" in
AC_DEFINE([HOSTARCHITECTURE_SPARC], [1], [Define if the host is a Sparc (32 bit)])
polyarch=interpret
;;
powerpc64* | ppc64*)
AC_DEFINE([HOSTARCHITECTURE_PPC64], [1], [Define if the host is a Power PC (64 bit)])
polyarch=interpret
;;
power* | ppc*)
AC_DEFINE([HOSTARCHITECTURE_PPC], [1], [Define if the host is a Power PC (32 bit)])
polyarch=interpret
Expand Down
4 changes: 4 additions & 0 deletions libpolyml/elfexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ void ELFExport::exportStore(void)
fhdr.e_machine = EM_PPC;
directReloc = R_PPC_ADDR32;
useRela = true;
#elif defined(HOSTARCHITECTURE_PPC64)
fhdr.e_machine = EM_PPC64;
directReloc = R_PPC64_ADDR64;
useRela = true;
#elif defined(HOSTARCHITECTURE_SPARC)
fhdr.e_machine = EM_SPARC;
directReloc = R_SPARC_32;
Expand Down

0 comments on commit 80bc444

Please sign in to comment.