X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3a60a9f5b85abb8c2cf24e1926c5c7b3f608a5e2..060df5ea7c632b1ac8cc8aac1fb59758165c2084:/osfmk/conf/Makefile.ppc?ds=sidebyside diff --git a/osfmk/conf/Makefile.ppc b/osfmk/conf/Makefile.ppc index 80f3bd542..35d7f0dd2 100644 --- a/osfmk/conf/Makefile.ppc +++ b/osfmk/conf/Makefile.ppc @@ -2,12 +2,61 @@ #BEGIN Machine dependent Makefile fragment for ppc ###################################################################### +# +# ppc should be (mostly) warning free +# +CFLAGS+= $(WERROR) +CWARNFLAGS= $(filter-out -Wbad-function-cast, $(CWARNFLAGS_STD)) + +# Objects that don't compile cleanly: +OBJS_NO_WERROR= \ + UNDRequest.o \ + machine_routines.o \ + db_examine.o \ + db_macro.o \ + db_print.o \ + db_sym.o \ + db_variables.o \ + ppc_disasm.o \ + db_disasm.o \ + db_trace.o \ + db_low_trace.o \ + gssd_mach.o \ + kdp_machdep.o + +OBJS_WERROR=$(filter-out $(OBJS_NO_WERROR),$(OBJS)) + +$(OBJS_WERROR): WERROR=-Werror + +export bsd_vm.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export device_vm.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export memory_object.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm32_user.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_apple_protect.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_debug.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_external.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_fault.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_init.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_kern.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_map.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_object.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_pageout.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_purgeable.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_resident.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_shared_region.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_swapfile_pager.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export vm_user.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 + +export default_pager.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export dp_backing_store.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 +export dp_memory_object.o_CFLAGS_ADD=-Werror -Wshorten-64-to-32 + # # KDB support # makedis: $(SRCROOT)/osfmk/ddb/makedis.c - $(CC) -o $@ $< + $(HOST_CC) -Werror -Wall -o $@ $< ppc_disasm.o_CFLAGS_ADD = -Dperror=db_printf -Dexit=db_error -Dmalloc=db_disasm_malloc @@ -18,8 +67,9 @@ ppc_disasm.c ppc_disasm.h : $(SRCROOT)/osfmk/ppc/ppc_disasm.i makedis db_disasm.o : ppc_disasm.h # Files that must go in the __HIB segment: -HIB_FILES= \ +UNCONFIGURED_HIB_FILES= \ hibernate_restore.o +HIB_FILES=$(filter $(UNCONFIGURED_HIB_FILES),$(OBJS)) ###################################################################### #END Machine dependent Makefile fragment for ppc