X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=Makefile;h=bb0860b8a3642562d701575ff9a3128ac1a29a16;hp=22b56bb0ee411d3b82cd3fcada1ac7f4f452b7d2;hb=4e43946f01f687361197dc9571b7df02ae20de30;hpb=fc840af877d7b069a007fcc1eca88e31f5ec86f6 diff --git a/Makefile b/Makefile index 22b56bb..bb0860b 100644 --- a/Makefile +++ b/Makefile @@ -298,7 +298,14 @@ V3_INCLUDE := -Ipalacios/include \ CPPFLAGS := $(V3_INCLUDE) -D__V3VEE__ +# +# We want no-strict-aliasing here whether or not the target kernel +# has it configued. See Linus's rant about gcc's "if the standard +# says we can do anything, we will do the wrong thing" behavior with +# regard to this option +# CFLAGS := -fno-stack-protector -Wall -Werror -mno-red-zone -fno-common \ + -fno-strict-aliasing -ffreestanding \ $(call cc-option, -Wno-unused-but-set-variable,) @@ -438,6 +445,7 @@ devices-y := palacios/src/devices/ interfaces-y := palacios/src/interfaces/ extensions-y := palacios/src/extensions/ vnet-y := palacios/src/vnet/ +gears-y := palacios/src/gears/ modules-y := modules/ @@ -513,6 +521,8 @@ NOSTDINC_FLAGS += # disable pointer signedness warnings in gcc 4.0 CFLAGS += $(call cc-option,-Wno-pointer-sign,) +CFLAGS += -O2 + # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or # set in the environment @@ -530,7 +540,7 @@ export INSTALL_PATH ?= /build palacios-dirs := $(patsubst %/,%,$(filter %/, \ - $(core-y) $(devices-y) $(interfaces-y) $(extensions-y) $(vnet-y) $(libs-y)) $(modules-y)) + $(core-y) $(devices-y) $(interfaces-y) $(extensions-y) $(vnet-y) $(gears-y) $(libs-y)) $(modules-y)) @@ -541,7 +551,7 @@ palacios-dirs := $(patsubst %/,%,$(filter %/, \ palacios-cleandirs := $(sort $(palacios-dirs) $(patsubst %/,%,$(filter %/, \ $(core-n) $(core-) $(devices-n) $(devices-) \ - $(interfaces-n) $(interfaces-) $(extensions-n) $(extensions-) $(vnet-n) $(vnet-) $(modules-n) $(modules-)))) + $(interfaces-n) $(interfaces-) $(extensions-n) $(extensions-) $(vnet-n) $(vnet-) $(gears-n) $(gears-) $(modules-n) $(modules-)))) @@ -551,6 +561,7 @@ interfaces-y := $(patsubst %/, %/built-in.o, $(interfaces-y)) extensions-y := $(patsubst %/, %/built-in.o, $(extensions-y)) libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) vnet-y := $(patsubst %/, %/built-in.o, $(vnet-y)) +gears-y := $(patsubst %/, %/built-in.o, $(gears-y)) modules-y := $(patsubst %/, %/built-in.o, $(modules-y)) #lnxmod-y := $(patsubst %/, %/built-in.o, $(lnxmod-y)) @@ -576,7 +587,7 @@ modules-y := $(patsubst %/, %/built-in.o, $(modules-y)) -palacios := $(core-y) $(devices-y) $(interfaces-y) $(extensions-y) $(vnet-y) $(libs-y) $(modules-y) +palacios := $(core-y) $(devices-y) $(interfaces-y) $(extensions-y) $(vnet-y) $(gears-y) $(libs-y) $(modules-y) # Rule to link palacios - also used during CONFIG_CONFIGKALLSYMS @@ -622,7 +633,7 @@ palacios: libv3vee.a linux_module/v3vee.ko: linux_module/*.c linux_module/*.h libv3vee.a - cd linux_module/ && make + cd linux_module/ && make -j 8 cp linux_module/v3vee.ko v3vee.ko