Skip to content

Commit 645045a

Browse files
committed
py/mkrules.mk: Don't pass COPT to linker.
Oftentimes, libc, libm, etc. don't come compiled with CPU compressed code option (Thumb, MIPS16, etc.), but we may still want to use such compressed code for MicroPython itself.
1 parent d288ae8 commit 645045a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

py/mkrules.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ all: $(PROG)
8181

8282
$(PROG): $(OBJ)
8383
$(ECHO) "LINK $@"
84-
$(Q)$(CC) $(COPT) -o $@ $^ $(LIB) $(LDFLAGS)
84+
# Do not pass COPT here - it's *C* compiler optimizations. For example,
85+
# we may want to compile using Thumb, but link with non-Thumb libc.
86+
$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
8587
ifndef DEBUG
8688
$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
8789
endif

0 commit comments

Comments
 (0)