From 72e332f767a2278860633c5b66b02efab143116a Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Sun, 22 May 2016 17:44:49 +0900 Subject: [PATCH] configure: Add -mstackrealign flags to CFLAGS on OS/2 Many codes require -mstackrealign flags. Although -mstackrealign has been already added to CFLAGS of some modules, SIGSEGV occurs in other modules than those modules. The best way may be to find causes and to fix them. However, we cannot know those causes until SIGSEGV occur really. In addition, if SIGSEGV occurs in other programs, it will be fatal. So adding -mstackrealign flags to CFLAGS unconditionally is reasonable. Change-Id: I999ef597a6afe97f5e7cc7bffaa866537c3eedd2 --- build/make/Makefile | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/build/make/Makefile b/build/make/Makefile index 3081a9268..3e8c02490 100644 --- a/build/make/Makefile +++ b/build/make/Makefile @@ -119,29 +119,25 @@ utiltest: test-no-data-check:: exampletest-no-data-check utiltest-no-data-check: -# Add compiler flags for intrinsic files +# Force to realign stack always on OS/2 ifeq ($(TOOLCHAIN), x86-os2-gcc) -STACKREALIGN=-mstackrealign -else -STACKREALIGN= +CFLAGS += -mstackrealign endif $(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx $(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx -$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 $(STACKREALIGN) -$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 $(STACKREALIGN) -$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 $(STACKREALIGN) -$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 $(STACKREALIGN) -$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 $(STACKREALIGN) -$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 $(STACKREALIGN) -$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 $(STACKREALIGN) -$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 $(STACKREALIGN) -$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN) -$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN) -$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN) -$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN) -$(BUILD_PFX)%vp9_reconintra.c.d: CFLAGS += $(STACKREALIGN) -$(BUILD_PFX)%vp9_reconintra.c.o: CFLAGS += $(STACKREALIGN) +$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 +$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 +$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 +$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 +$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 +$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 +$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 +$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 +$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx +$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx +$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 +$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(BUILD_PFX)%.c.d: %.c $(if $(quiet),@echo " [DEP] $@")