diff options
Diffstat (limited to 'com32')
-rw-r--r-- | com32/lib/MCONFIG | 7 | ||||
-rw-r--r-- | com32/libutil/Makefile | 2 | ||||
-rw-r--r-- | com32/modules/Makefile | 2 | ||||
-rw-r--r-- | com32/samples/Makefile | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG index 39b62db1..461ada44 100644 --- a/com32/lib/MCONFIG +++ b/com32/lib/MCONFIG @@ -1,5 +1,10 @@ # -*- makefile -*- +gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ + then echo $(1); else echo $(2); fi) + +GCCOPT := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,) + CC = gcc LD = ld INCLUDE = -I. @@ -21,7 +26,7 @@ LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \ # fallback anyway, just use that on old machines... # LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED -REQFLAGS = -g -m32 -mregparm=3 -DREGPARM=3 -D__COM32__ -I. -I./sys -I../include +REQFLAGS = $(GCCOPT) -g -mregparm=3 -DREGPARM=3 -D__COM32__ -I. -I./sys -I../include OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \ -falign-labels=0 -ffast-math -fomit-frame-pointer WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile index 9adeec66..8976ebd8 100644 --- a/com32/libutil/Makefile +++ b/com32/libutil/Makefile @@ -32,7 +32,7 @@ gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ then echo $(1); else echo $(2); fi) -M32 := $(call gcc_ok,-m32,) +M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno_stack_protector,) CC = gcc LD = ld -m elf_i386 diff --git a/com32/modules/Makefile b/com32/modules/Makefile index 3c272f26..877ce399 100644 --- a/com32/modules/Makefile +++ b/com32/modules/Makefile @@ -17,7 +17,7 @@ gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ then echo $(1); else echo $(2); fi) -M32 := $(call gcc_ok,-m32,) +M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,) CC = gcc LD = ld -m elf_i386 diff --git a/com32/samples/Makefile b/com32/samples/Makefile index 213ae1a3..291413a6 100644 --- a/com32/samples/Makefile +++ b/com32/samples/Makefile @@ -17,7 +17,7 @@ gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ then echo $(1); else echo $(2); fi) -M32 := $(call gcc_ok,-m32,) +M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,) CC = gcc LD = ld -m elf_i386 |