From b1eba81b9d28f806683a7c3f662c5e6ddad43792 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Sun, 23 Oct 2011 23:53:30 +0000 Subject: [PATCH] simplify build logic a bit . always compile acpi, with clang, so never have build/clean inconsistencies; can be enabled (i.e. run at boot time) by setting acpi variable in the boot monitor . always strip binaries with the right strip cmd, so never have ack/elf strip inconsistencies --- drivers/Makefile | 6 +----- drivers/acpi/Makefile | 10 ++++------ drivers/ramdisk/Makefile | 13 ++----------- drivers/ramdisk/rc | 5 +++-- 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/Makefile b/drivers/Makefile index 9c3e31674..8183e9105 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -10,14 +10,10 @@ SUBDIR= at_wini bios_wini floppy log tty pci .WAIT ramdisk .WAIT memory .else -.if ${COMPILER_TYPE} == "gnu" -SUBDIR = acpi -.endif - # memory driver must be last for ramdisk image SUBDIR+= ahci amddev atl2 at_wini audio bios_wini dec21140A dp8390 dpeth \ e1000 filter floppy fxp hello lance log orinoco pci printer \ - random readclock rtl8139 rtl8169 ti1225 tty \ + random readclock rtl8139 rtl8169 ti1225 tty acpi \ .WAIT ramdisk .WAIT memory .endif diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index c05037485..11beadb54 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -1,8 +1,8 @@ -.if ${COMPILER_TYPE} == "ack" -all: - echo "Skipping ACPI driver, ACK compiler in use" -.else # The ACPI driver is compilable only with a "gnu" type compiler +.if ${COMPILER_TYPE} != "gnu" +CC:=clang +COMPILER_TYPE:=gnu +.endif PROG= acpi @@ -150,5 +150,3 @@ MAN= BINDIR?= /usr/sbin .include - -.endif diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index 1dcbcfad1..f96f35cd3 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -10,8 +10,7 @@ SCRIPTS=newroot PROGRAMS+= ahci ext2 .endif -# acpi is not compiled with ack -.if ${COMPILER_TYPE} == "gnu" && ${MKACPI} != "no" +.if ${MKACPI} != "no" PROGRAMS+= acpi .endif @@ -166,15 +165,7 @@ rs.single: ../../etc/rs.single install ${STRIPFLAG} ../../etc/$@ $@ proto.gen: $(PROGRAMS) $(SCRIPTS) proto.sh ${PROTO} + for p in $(PROGRAMS); do file $$p | grep -q ELF && strip -s $$p; done sh -e proto.sh ${PROTO} >proto.gen -.if ${OBJECT_FMT} == "ELF" -proto.gen: elfstrip - -.PHONY: elfstrip - -elfstrip: $(PROGRAMS) - strip -s $(PROGRAMS) -.endif - .include diff --git a/drivers/ramdisk/rc b/drivers/ramdisk/rc index f0eeee9a4..1ea5d8ad2 100644 --- a/drivers/ramdisk/rc +++ b/drivers/ramdisk/rc @@ -5,9 +5,10 @@ exec >/dev/log exec 2>/dev/log exec