Skip to content

Commit e8d8218

Browse files
committed
prevent absurd optimization techniques from breaking our code
1 parent 75d244a commit e8d8218

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
DEBUG_FLAGS = -DDEBUG -O0 -g3
2-
RELEASE_FLAGS = -O2 -g3
2+
RELEASE_FLAGS = -O3 -g3
3+
COMMON_FLAGS = -fno-strict-overflow -fno-strict-aliasing -fno-delete-null-pointer-checks -fno-trapping-math -fno-math-errno -fno-signed-zeros -fno-exceptions
34

45
all: testbed.out gdb-module.so
56
.PHONY: all
67

78
gdb-module.so: gdb-module.c emacs-module.h gdbwire.c
8-
$(CC) -Wall -Wextra -Wno-unused-parameter $(RELEASE_FLAGS) -fPIC -shared $< -o $@
9+
$(CC) -Wall -Wextra -Wno-unused-parameter $(RELEASE_FLAGS) $(COMMON_FLAGS) -fPIC -shared $< -o $@
910

1011
testbed.out: testbed.c
1112
$(CC) $(DEBUG_FLAGS) $< -lpthread -o $@

0 commit comments

Comments
 (0)