diff --git a/Makefile b/Makefile index 50948787a..84fc0841f 100644 --- a/Makefile +++ b/Makefile @@ -129,9 +129,10 @@ ifeq ($(GMON),1) export GMON GMONLDOPT endif +AFLAGS += -D__ASSEMBLY__ CFLAGS += $(USERCFLAGS) $(WARNINGS) $(DEFINES) -iquote include/ HOSTCFLAGS += $(WARNINGS) $(DEFINES) -iquote include/ -export CFLAGS USERCLFAGS HOSTCFLAGS +export AFLAGS CFLAGS USERCLFAGS HOSTCFLAGS # Default target all: criu lib crit diff --git a/compel/plugins/Makefile b/compel/plugins/Makefile index 60b78473c..8f44ba86d 100644 --- a/compel/plugins/Makefile +++ b/compel/plugins/Makefile @@ -29,7 +29,7 @@ asflags-y += -iquote $(PLUGIN_ARCH_DIR) # General flags for assembly asflags-y += -fpie -Wstrict-prototypes -asflags-y += -D__ASSEMBLY__ -nostdlib -fomit-frame-pointer +asflags-y += -nostdlib -fomit-frame-pointer asflags-y += -fno-stack-protector ldflags-y += -z noexecstack diff --git a/criu/arch/aarch64/Makefile b/criu/arch/aarch64/Makefile index 49ef6a480..fd721d12f 100644 --- a/criu/arch/aarch64/Makefile +++ b/criu/arch/aarch64/Makefile @@ -3,7 +3,6 @@ builtin-name := crtools.built-in.o ccflags-y += -iquote $(obj)/include -iquote criu/include ccflags-y += -iquote include ccflags-y += $(COMPEL_UAPI_INCLUDES) -asflags-y += -D__ASSEMBLY__ ldflags-y += -r obj-y += cpu.o diff --git a/criu/arch/arm/Makefile b/criu/arch/arm/Makefile index d01c69a16..5142fbe12 100644 --- a/criu/arch/arm/Makefile +++ b/criu/arch/arm/Makefile @@ -4,7 +4,6 @@ ccflags-y += -iquote $(obj)/include ccflags-y += -iquote criu/include -iquote include ccflags-y += $(COMPEL_UAPI_INCLUDES) -asflags-y += -D__ASSEMBLY__ ldflags-y += -r -z noexecstack obj-y += cpu.o diff --git a/criu/arch/x86/Makefile b/criu/arch/x86/Makefile index 20a40e4ae..ca92a241c 100644 --- a/criu/arch/x86/Makefile +++ b/criu/arch/x86/Makefile @@ -5,7 +5,7 @@ ccflags-y += -iquote criu/include -iquote include ccflags-y += $(COMPEL_UAPI_INCLUDES) asflags-y += -Wstrict-prototypes -asflags-y += -D__ASSEMBLY__ -nostdlib -fomit-frame-pointer +asflags-y += -nostdlib -fomit-frame-pointer asflags-y += -iquote $(obj)/include ldflags-y += -r -z noexecstack diff --git a/criu/pie/Makefile b/criu/pie/Makefile index c9e8a3d82..5c0606786 100644 --- a/criu/pie/Makefile +++ b/criu/pie/Makefile @@ -17,8 +17,6 @@ ifneq ($(filter-out clean mrproper,$(MAKECMDGOALS)),) compel_plugins := $(shell $(COMPEL_BIN) plugins) endif -asflags-y += -D__ASSEMBLY__ - LDS := compel/arch/$(SRCARCH)/scripts/compel-pack.lds.S restorer-obj-y += ./$(ARCH_DIR)/restorer.o diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library index b7918438b..577497f5a 100644 --- a/criu/pie/Makefile.library +++ b/criu/pie/Makefile.library @@ -35,6 +35,5 @@ endif CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS)) -asflags-y := -D__ASSEMBLY__ ccflags-y += $(COMPEL_UAPI_INCLUDES) ccflags-y += $(CFLAGS_PIE)