Skip to content

Commit

Permalink
clib: Tell gcc to compile for a base i386 target
Browse files Browse the repository at this point in the history
Only benefits Linux targets; Windows is still lower bound to 686-cmov by MinGW's crt0.
  • Loading branch information
richardg867 committed Oct 26, 2024
1 parent aba2c77 commit aef2d14
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion clib/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
#

VPATH = . ../clib
CC ?= "gcc"
CC ?= "gcc"
ifneq "$(shell $(CC) -dumpmachine | grep -w i.86)" ""
CFLAGS += -march=i386
else
ifneq "$(shell $(CC) -dumpmachine | grep -w x86_64)" ""
CFLAGS += -march=x86-64
endif
endif

all: $(DEST)

Expand Down

0 comments on commit aef2d14

Please sign in to comment.