os161.config-mips.mk 957 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # OS/161 build environment extra definitions for MIPS.
  3. # This is included by os161.config.mk.
  4. #
  5. #
  6. # The MIPS toolchain for OS/161 is an ELF toolchain that by default
  7. # generates SVR4 ELF ABI complaint code. This means that by default
  8. # all code is PIC (position-independent code), which is all very well
  9. # but not something we need or want in the kernel. So we use -fno-pic
  10. # to turn this behavior off.
  11. #
  12. # We turn it off for userland too because we don't support shared
  13. # libraries. Before trying to implement shared libraries, these
  14. # options need to be taken out of CFLAGS.
  15. #
  16. # It turns out you also need -mno-abicalls to turn it off completely.
  17. #
  18. CFLAGS+=-mno-abicalls -fno-pic
  19. KCFLAGS+=-mno-abicalls -fno-pic
  20. #
  21. # Extra stuff required for the kernel.
  22. #
  23. # -ffixed-23 reserves register 23 (s7) to hold curthread. This register
  24. # number must match the curthread definition in mips/thread.h and the
  25. # code in trap.S.
  26. #
  27. KCFLAGS+=-ffixed-23
  28. KLDFLAGS+=