Skip to content

Commit

Permalink
Merge pull request #3363 from BsAtHome/fix_Os-to-O2
Browse files Browse the repository at this point in the history
Change optimize -Os to -O2
  • Loading branch information
andypugh authored Mar 3, 2025
2 parents 4dd98d4 + 6f1cba9 commit a34ba59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ INCLUDE += $(LIBTIRPC_CFLAGS)

# Compilation options. Perhaps some of these should come from Makefile.inc? (CXXFLAGS now does)
INTEGER_OVERFLOW_FLAGS := -fwrapv
OPT := -Os $(INTEGER_OVERFLOW_FLAGS)
OPT := -O2 $(INTEGER_OVERFLOW_FLAGS)
DEBUG := $(DEBUG) -g -Wall -D_FORTIFY_SOURCE=2
CFLAGS := $(INCLUDE) $(OPT) $(DEBUG) -DULAPI -std=gnu11 -Werror=implicit-function-declaration $(CFLAGS) $(CPPFLAGS) $(EXTRA_DEBUG)
CXXFLAGS := $(INCLUDE) $(OPT) $(DEBUG) -DULAPI -Werror=overloaded-virtual $(CXXFLAGS) $(CPPFLAGS) $(EXTRA_DEBUG)
Expand Down Expand Up @@ -1240,7 +1240,7 @@ tpmod-objs += libnml/posemath/sincos.o $(MATHSTUB)

TORTOBJS = $(foreach file,$($(patsubst %.o,%,$(1))-objs), objects/rt$(file))
ifeq ($(BUILD_SYS),uspace)
EXTRA_CFLAGS += -fPIC -Os
EXTRA_CFLAGS += -fPIC -O2 $(filter -Wextra,$(CFLAGS)) $(filter -Werror,$(CFLAGS))
RTOBJS := $(sort $(foreach mod,$(obj-m),$(call TORTOBJS,$(mod))))
RTDEPS := $(sort $(RTOBJS:.o=.d))

Expand Down

0 comments on commit a34ba59

Please sign in to comment.