patch-EnginePl_machine_h 979 B

12345678910111213141516171819202122232425262728
  1. $OpenBSD: patch-EnginePl_machine_h,v 1.2 2017/06/08 15:25:57 espie Exp $
  2. XXX not quite sure why this is needed as it's built without PIE anyway, but
  3. this fixes a segfault on i386 during build following the switch to PIE by
  4. default.
  5. ===
  6. gplc -c --fast-math fd2c.pl
  7. Fatal Error: Segmentation Violation
  8. compilation failed
  9. *** Error 1 in Fd2C (Makefile:10 'fd2c.o')
  10. *** Error 1 in /tmp_ports/gprolog-1.3.1/gprolog-1.3.1/src (Makefile:47 'all')
  11. ===
  12. Index: EnginePl/machine.h
  13. --- EnginePl/machine.h.orig
  14. +++ EnginePl/machine.h
  15. @@ -124,7 +124,7 @@ void M_Check_Magic_Words(void); /* not compiled if not
  16. # define M_USED_REGS {"$9", "$10", "$11", "$12", "$13", "$14", 0}
  17. /* on M_ix86_darwin : %ebx is used by gcc for pic base */
  18. -#elif defined(M_ix86) && !defined(_MSC_VER) && !defined(M_ix86_darwin)
  19. +#elif defined(M_ix86) && !defined(_MSC_VER) && !defined(M_ix86_darwin) && !defined(__OpenBSD__)
  20. #ifdef NO_USE_EBP
  21. # define M_USED_REGS {"ebx", 0}